Esempio n. 1
0
        /// <summary>
        /// Method for updating each Guy's radio button with his name and amount of cash.
        /// Also updates the Guy's bet description, if he has placed a bet and MyBet is not null.
        /// </summary>
        public void UpdateLabels()
        {
            MyRadioButton.Text = Name + " has " + Cash + " bucks";

            if (MyBet != null)
            {
                MyLabel.Text = MyBet.GetDescription();  //MyBet.GetDescription() returns a string with the bet description.
            }
        }
Esempio n. 2
0
 public void UpdateLabels()
 {
     MyRadioButton.Text = Name + " has " + Cash.ToString() + " bucks";
     if (MyBet != null && MyBet.Amount > 0)
     {
         MyLabel.Text = MyBet.GetDescription();
     }
     else
     {
         MyLabel.Text = Name + " hasn't placed a bet.";
     }
 }
Esempio n. 3
0
        public Label MyLabel;             //MyLabel

        public void UpdateLabels()
        {
            if (MyBet == null)
            {
                MyLabel.Text = Name + " hasn't placed a bet";
            }
            else
            {
                MyLabel.Text = MyBet.GetDescription();
            }
            MyRadioButton.Text = Name + " has " + Cash + " bucks";
        }
Esempio n. 4
0
        public void UpdateLabel()
        {
            // Set my label to my bet's description, and the label on my
            // radio button to show my cash ("Joe has 43 bucks")
            if (MyBet != null)
            {
                MyLabel.Text = MyBet.GetDescription();
            }
            else
            {
                MyLabel.Text = Name + " hasn't placed a bet";
            }

            MyRadioButton.Text = Name + " has " + Cash + " bucks";
        }
Esempio n. 5
0
        //Update labels on form, depends if a bet has been placed or not.
        public void UpdateLabels()
        {
            //set my label to my bets desc
            if (MyBet != null)
            {
                MyLabel.Text = MyBet.GetDescription();

                //radio button to show my cash ("Joe has 43 bucks")
                MyRadioButton.Text = Name + " has " + (Cash - MyBet.Amount).ToString() + " bucks";
            }
            else
            {
                MyLabel.Text = Name + " hasn't placed a bet";
                //radio button to show my cash ("Joe has 43 bucks")
                MyRadioButton.Text = Name + " has " + Cash.ToString() + " bucks";
            }
        }
Esempio n. 6
0
 public void UpdateLabels()
 {
     _myLabel.Text       = _myBet.GetDescription();
     _myRadioButton.Text = $"{_name} has {_cash} bucks.";
 }
Esempio n. 7
0
 //my method to update the guys' labels
 public void UpdateLabels()
 {
     MyBet.Bettor       = this;
     MyLabel.Text       = MyBet.GetDescription();
     MyRadioButton.Text = Name + " has $" + Cash;
 }
Esempio n. 8
0
 public void UpdateLabels()
 {
     MyRadioButton.Text = Name + " has " + Cash + " bucks";
     MyLabel.Text       = Name + " " + MyBet.GetDescription();
 }