private void exitMenu_click(object sender, EventArgs e) { if (currentBalance > 0) { WithdrawMenu wm = new WithdrawMenu(this); MessageBox.Show("You must withdraw before closing!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand); wm.Show(); } else { this.Close(); } }
private void signOutToolStripMenuItem1_Click(object sender, EventArgs e) { if (currentBalance > 0) { WithdrawMenu wm = new WithdrawMenu(this); MessageBox.Show("You must withdraw before closing!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand); wm.Show(); } else { LoginWindow lw = new LoginWindow(); this.Hide(); lw.FormClosed += Lw_FormClosed; lw.Show(); } }
private void withdrawToolStripMenuItem1_Click(object sender, EventArgs e) { WithdrawMenu wm = new WithdrawMenu(this); wm.Show(); }