private void AvaaTalletus(object sender, EventArgs e) { if (talletus.IsDisposed) { talletus = new TalletusIkkuna(); } talletus.Show(); }
public Form1() { InitializeComponent(); nosto = new NostoIkkuna(); talletus = new TalletusIkkuna(); double saldo = LueSaldo(); label1.Text = "Tilin saldo: " + saldo + " euroa"; button1.Click += AvaaNosto; button2.Click += AvaaTalletus; }