public void Collect(int Winner) { if (MyBet != null) { Cash += MyBet.PayOut(Winner); } ClearBet(); UpdateLabels(); }
/// <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}."; }
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); }
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); }
public void Insert(MyBet entity) { throw new NotImplementedException(); }
public bool Delete(MyBet entity) { throw new NotImplementedException(); }
// method to update the bet description on buttons and labels public void UpdateLabels() { MyLabel.Text = MyBet.GetDescription(); }
/// <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); }