private void fillBetFields(Guys guy)
 {
     if (guy.bet != null)
     {
         edtBetDog.Text  = guy.bet.dog.lane;
         edtBetCash.Text = guy.bet.money.ToString();
     }
     else
     {
         edtBetDog.Text  = "";
         edtBetCash.Text = "";
     }
 }
        private void placeBet(Guys guy)
        {
            int dogSelected = Convert.ToInt32(edtBetDog.Text);
            int betSelected = Convert.ToInt32(edtBetCash.Text);

            if ((dogSelected >= 1) && (dogSelected <= 4) && (betSelected >= 0) && (guy.cashRepository(betSelected)))
            {
                guy.bet       = new Bet();
                guy.bet.dog   = dogs[dogSelected - 1];
                guy.bet.money = betSelected;
            }
            else
            {
                MessageBox.Show("Bet not valid.");
            }
        }
        public MainWindow()
        {
            InitializeComponent();

            guys[0] = new Guys("Joe", 100);
            guys[1] = new Guys("Bob", 85);
            guys[2] = new Guys("Jim", 66);

            refreshRadioButtons();

            dogLeft  = (int)Canvas.GetLeft(imgDog1);
            dogWidth = (int)imgDog1.Width;

            dogs[0] = new Dog("1", imgDog1, dogWidth, dogLeft);
            dogs[1] = new Dog("2", imgDog2, dogWidth, dogLeft);
            dogs[2] = new Dog("3", imgDog3, dogWidth, dogLeft);
            dogs[3] = new Dog("4", imgDog4, dogWidth, dogLeft);

            timer.Tick += timer_Tick;
        }