Esempio n. 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (bank >= 10)
     {
         bank -= joe.ReceiveCash(10);
         UpdateForm();
     }
     else
     {
         MessageBox.Show("The bank is out of money.");
     }
 }
Esempio n. 2
0
 private void btnGIveCashToJoe_Click(object sender, EventArgs e)
 {
     if (bank >= 10)
     {
         bank -= joe.ReceiveCash(10);
         UpdateForm();
     }
     else
     {
         MessageBox.Show("The bank is out of money‼",
                         "Bank Run", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
Esempio n. 3
0
 private void joeGivesToBob_Click(object sender, EventArgs e)
 {
     bob.ReceiveCash(joe.GiveCash(10));
     UpdateForm();
 }