Exemple #1
0
        //click on the radiobutton to select a bettor
        private void AllRB_CheckedChanged(object sender, EventArgs e)
        {
            RadioButton fakeRB = (RadioButton)sender;

            if (fakeRB.Checked == true)
            {
                //look for the anme of the person your clicked on
                switch (fakeRB.Text)
                {
                //instantiate that punter
                case "Howard":
                    singlePunter = Factory.GetAPunter(0);
                    break;

                case "Susan":
                    singlePunter = Factory.GetAPunter(1);
                    break;

                case "John":
                    singlePunter = Factory.GetAPunter(2);
                    break;
                }

                SinglePunterSetup();
            }
        }
Exemple #2
0
        //Checks which punter is selected
        private void AllRB_CheckedChanged(object sender, EventArgs e)
        {
            RadioButton fakeRB = new RadioButton();

            fakeRB = (RadioButton)sender;

            if (fakeRB.Checked == true)
            {
                //Look for the name of the person we have clicked on
                switch (fakeRB.Text)
                {
                //Instantiate that punter
                case "Howard":

                    CurrentPunter = myPunter[0];
                    break;

                case "Susan":

                    CurrentPunter = myPunter[1];
                    break;

                case "John":

                    CurrentPunter = myPunter[2];
                    break;
                }
                udBet.Maximum = (decimal)CurrentPunter.Cash;
            }
        }
Exemple #3
0
        /// <summary>
        /// We need to crate a current punter to hold the class of the selected punter
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AllRB_CheckedChanged(object sender, EventArgs e)
        {
            RadioButton fakeRB = new RadioButton();

            fakeRB = (RadioButton)sender;

            if (fakeRB.Checked == true)
            {
                switch (fakeRB.Text)
                {
                case "Howard":
                    CurrentPunter = new Howard();
                    break;

                case "Jack":
                    CurrentPunter = new Jack();
                    break;

                case "Weed":
                    CurrentPunter = new Weed();
                    break;

                default:
                    break;
                }

                udBet.Maximum = (decimal)CurrentPunter.Cash;
            }
        }
Exemple #4
0
        private void AllRB_CheckedChanged(object sender, EventArgs e)
        {
            RadioButton fakeRb = new RadioButton();

            fakeRb = (RadioButton)sender;



            if (fakeRb.Checked == true)
            {
                this.Text = fakeRb.Text;
                // look for the name of the person we have clicked on

                // pass the data across to currentPunter.
                switch (fakeRb.Text)
                {
                case "Howard":

                    CurrantPunter = myPunters[0];
                    break;

                case "Susan":
                    CurrantPunter = myPunters[1];
                    break;

                case "John":
                    CurrantPunter = myPunters[2];
                    break;
                    //case "Howard":
                    //    CurrantPunter = new Howard();
                    //    break;
                }

                this.Text = CurrantPunter.PunterName + " is the currant Punter";
            }

            udBet.Maximum = (decimal)CurrantPunter.Cash;
        }