예제 #1
0
        public Label MyLabel;               // My Label

        public void UpdateLabels()
        {
            // Set my label to my bet's description, and the label on
            // my RadioButton to show my cash ("Joe has 43 bucks")
            this.MyLabel.Text       = MyBet.GetDescription();
            this.MyRadioButton.Text = this.Name + " has " + this.Cash + " bucks";
        }
예제 #2
0
 public void UpdateLabels()
 {
     if (MyBet != null)
     {
         MyLabel.Text = MyBet.GetDescription();
     }
     else
     {
         MyLabel.Text = Name + " hasn't placed a bet";
     }
     MyRadioButton.Text = Name + " has " + Cash + " bucks";;
 }
예제 #3
0
파일: Guy.cs 프로젝트: dmaulikr/chickenRun
 public void UpdateLabels()
 {
     //set mylabel to my bet's description and the label on my radio button to show cash
     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";
 }