public void UpdateLabels()//this function is for update the vales of the labels { if (MyBet == null) { MyLabel.Text = String.Format("{0} hasn't placed any bets", Name); } else { MyLabel.Text = MyBet.GetDescription(); } MyRadioButton.Text = Name + " has " + Cash + " bucks"; if (Cash == 0)//Code When bettor has no money to bet then it gets destroy { MyLabel.Text = String.Format("BUSTED"); MyLabel.ForeColor = System.Drawing.Color.Red; MyRadioButton.Enabled = false; } }
public void UpdateLabels() { if (bet == null) { statusLabel.Text = String.Format("{0} has not placed any bets", Name); } else { statusLabel.Text = bet.GetDescription(); } if (Cash == 0) { busted = true; statusLabel.Text = String.Format("BUSTED!"); statusLabel.ForeColor = System.Drawing.Color.Red; } MaximumBet.Text = String.Format("Maximum Bet: ${0}", Cash); }