Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- //
- //
- //
- //
- // Detta är inloggningsmetoden.
- //
- //
- //
- //
- //
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WindowsFormsApplication14
- {
- public partial class Bankomat : Form
- {
- public Bankomat()
- {
- InitializeComponent();
- txtKod.PasswordChar = '*';
- }
- private void btn_Click(object sender, EventArgs e)
- {
- Button btn = (Button)sender;
- txtKod.Text = txtKod.Text + btn.Text;
- }
- private void txtKod_TextChanged(object sender, EventArgs e)
- {
- }
- private void btn_Clear(object sender, EventArgs e)
- {
- txtKod.Clear();
- }
- private void btn_ok(object sender, EventArgs e)
- {
- if (txtKod.Text == "1234")
- {
- MessageBox.Show("Du har loggat in.");
- Uttag Uttag = new Uttag();
- this.Hide();
- Uttag.Show();
- }
- }
- }
- }
- //
- //
- //
- //
- //
- //Detta är motoden för att ta ut pengar, den fungerar inte än.
- //
- //
- //
- //
- //
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WindowsFormsApplication14
- {
- public partial class Uttag : Form
- {
- public Uttag()
- {
- InitializeComponent();
- }
- private void Uttag_Load(object sender, EventArgs e)
- {
- }
- private void btn_uttag_premade(object sender, EventArgs e)
- {
- PENGAR_UTTAG.Clear();
- Button btn_Two = (Button)sender;
- PENGAR_UTTAG.Text = PENGAR_UTTAG.Text + btn_Two.Text;
- }
- private void PENGAR_TextChanged(object sender, EventArgs e)
- {
- int pengar = 1000;
- String pengarValue = Convert.ToString(pengar);
- PENGAR.Text = (pengarValue);
- }
- private void PENGAR_UTTAG_TextChanged(object sender, EventArgs e)
- {
- }
- private void btn_ok2(object sender, EventArgs e)
- {
- Button b = (Button)sender;
- PENGAR.Text = PENGAR.Text + b.Text;
- }
- private void btn_cancel(object sender, EventArgs e)
- {
- Button b = (Button)sender;
- PENGAR_UTTAG.Clear();
- }
- }
- }
Add Comment
Please, Sign In to add comment