Esempio n. 1
0
 public void Collect(int Winner)
 {
     if (MyBet != null)
     {
         Cash += MyBet.PayOut(Winner);
     }
     ClearBet();
     UpdateLabels();
 }
Esempio n. 2
0
 /// <summary>
 /// Assign my bet description to my label, and my money to my radio button label ("John has
 /// 43 dollars").
 /// </summary>
 public void UpdateLabels()
 {
     if (MyBet == null)
     {
         MyBet = new Bet(0, 0, this);
     }
     MyLabel.Text       = MyBet.GetDescription();
     MyRadioButton.Text = $"{Name} {Resources.has} {Cash} {Resources.dollars}.";
 }
Esempio n. 3
0
 public void UpdateLabels()
 {
     if (MyBet != null)
     {
         MyLabel.Text = MyBet.GetDescription();
     }
     else
     {
         MyLabel.Text = Name + " hasn't placed a bet.";
     }
     MyRadioButton.Text = string.Format("{0:s} has {1:c}.", Name, Cash);
 }
Esempio n. 4
0
 public void UpdateLabels() // Set my label to my bets description and the label on the radio button to show the punters cash
 {
     if (MyBet == null)
     {
         MyLabel.Text = string.Format("{0} hasn't placed any bets", PunterName);
     }
     else
     {
         MyLabel.Text = MyBet.GetDescription();
     }
     if (Cash == 0)
     {
         Busted                = true;
         MyLabel.Text          = string.Format("BUSTED!");
         MyRadioButton.Enabled = false;
         MyLabel.ForeColor     = Color.Red;
     }
     MyRadioButton.Text = String.Format("{0} has ${1}", PunterName, Cash);
     MaxBet.Text        = string.Format("Max bet ${0}", Cash);
 }
Esempio n. 5
0
 public void Insert(MyBet entity)
 {
     throw new NotImplementedException();
 }
Esempio n. 6
0
 public bool Delete(MyBet entity)
 {
     throw new NotImplementedException();
 }
Esempio n. 7
0
 // method to update the bet description on buttons and labels
 public void UpdateLabels()
 {
     MyLabel.Text = MyBet.GetDescription();
 }
Esempio n. 8
0
 /// <summary>
 /// Charge my bet if I won. Key: use the Bet object.
 /// </summary>
 /// <param name="winner"></param>
 public void Collect(int winner)
 {
     Cash += MyBet.PayOut(winner);
 }