Example #1
0
        public void UpdateLabels()
        {
            if (MyBet != null)
            {
                MyLabel.Text = MyBet.GetDescription();
            }

            MyRadioButton.Text = Name + " has " + Cash + " bucks";
        }
Example #2
0
        public Label MyLabel;             //My Label

        public void UpdateLabels()
        {
            //Set my label to my bet's description, and the label on my
            //radio button to show my cash ("Joe has 43 bucks")
            MyRadioButton.Text = Name + " has " + Cash + " bucks";

            if (MyBet != null)
            {
                MyLabel.Text = MyBet.GetDescription();
            }
        }
Example #3
0
 /// <summary>
 /// Updates GUI labels.
 /// </summary>
 public void UpdateLabel()
 {
     MyRadioButton.Text = Name + " has £" + Cash;
     if (MyBet != null)
     {
         MyLabel.Text = MyBet.GetDescription();
     }
     else
     {
         MyLabel.Text = Name + " hasn't placed a bet";
     }
 }
Example #4
0
        public bool PlaceBet(int BetAmount, int DogToWin)
        {
            if (Cash > BetAmount)
            {
                MyBet = new Bet() { Amount = BetAmount, Dog = DogToWin, Bettor = this };
                MyLabel.Text = MyBet.GetDescription();
                return true;
            }
            else
            {
                return false;
            }

            // Place a new bet and store it in my bet field
            // Return true if the guy had enough money to start
        }
Example #5
0
 public void UpdateLabels()
 {
     MyLabel.Text       = MyBet.GetDescription(this);
     MyRadioButton.Text = $@"{Name} has ${Cash} dollars";
 }