Exemple #1
0
        /// <summary>
        /// This event register the guy Joe for the races and he can deposit
        /// and place bets on his favourite dog.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void radioButtonJoe_CheckedChanged(object sender, EventArgs e)
        {
            //This option creates the guy Joe and add him to the guys list
            bool joeCheckedTrue = radioButtonJoe.Checked;

            if (joeCheckedTrue)
            {
                labelGuyPlacingBet.Text = radioButtonJoe.Text;

                string guyName = labelGuyPlacingBet.Text;
                guy.SetName(guyName);
                //We add the guy to the list
                guy.AddToGuysList();
            }

            //we update the list
            guy.UpdateLabel(guy);
            guy.GetGuysAtTheRaceList();

            //We update the labels
            labelJoeSituation.Text  = guy.MyLabel.Text;
            labelGuyPlacingBet.Text = radioButtonJoe.Text;
        }