예제 #1
0
        private void ReviewForm_Load(System.Object sender, System.EventArgs e)
        {
            FixtureBuilder fb = new FixtureBuilder();

            fixtures = fb.getBet();

            this.ReviewBetsFlowLayoutPanel.Enabled = true;
            this.ReviewBetsFlowLayoutPanel.Visible = true;
            this.FinishReviewGroupBox.Visible      = true;
            this.MainMenuButton.Visible            = true;

            foreach (Fixture fixture in fixtures)
            {
                FixtureReviewUserControl review = new FixtureReviewUserControl(fixture.Home_Team, fixture.Away_Team);
                this.ReviewBetsFlowLayoutPanel.Controls.Add(review);

                if (fixture.Prediction == 1)
                {
                    review.homeFixtureLabel.BackColor = Color.LightGreen;
                }
                if (fixture.Prediction == 2)
                {
                    review.awayFixtureLabel.BackColor = Color.LightGreen;
                }
                if (fixture.Prediction == 3)
                {
                    review.drawLabel.BackColor = Color.LightGreen;
                }
            }
        }
예제 #2
0
        private void betSlipButton_Click_1(System.Object sender, System.EventArgs e)
        {
            this.MainFlowLayoutPanel.Controls.Clear();
            FixtureBuilder fb = new FixtureBuilder();

            fixtures = fb.getBet();

            this.submitGroupBox.Visible = false;

            try {
                foreach (Fixture fixture in fixtures)
                {
                    FixtureReviewUserControl review = new FixtureReviewUserControl(fixture.Home_Team, fixture.Away_Team);
                    this.MainFlowLayoutPanel.Controls.Add(review);

                    if (fixture.Prediction == 1)
                    {
                        review.homeFixtureLabel.BackColor = Color.LightGreen;
                    }
                    if (fixture.Prediction == 2)
                    {
                        review.awayFixtureLabel.BackColor = Color.LightGreen;
                    }
                    if (fixture.Prediction == 3)
                    {
                        review.drawLabel.BackColor = Color.LightGreen;
                    }
                }
            } catch (NullReferenceException ex) {
                Interaction.MsgBox("Not enough users have entered their predictions yet. Please try later");
            }
        }
예제 #3
0
        private void betSlipButton_Click_1(System.Object sender, System.EventArgs e)
        {
            this.MainFlowLayoutPanel.Controls.Clear();
            FixtureBuilder fb = new FixtureBuilder();
            fixtures = fb.getBet();

            this.submitGroupBox.Visible = false;

            try {
                foreach (Fixture fixture in fixtures) {
                    FixtureReviewUserControl review = new FixtureReviewUserControl(fixture.Home_Team, fixture.Away_Team);
                    this.MainFlowLayoutPanel.Controls.Add(review);

                    if (fixture.Prediction == 1) {
                        review.homeFixtureLabel.BackColor = Color.LightGreen;
                    }
                    if (fixture.Prediction == 2) {
                        review.awayFixtureLabel.BackColor = Color.LightGreen;
                    }
                    if (fixture.Prediction == 3) {
                        review.drawLabel.BackColor = Color.LightGreen;
                    }
                }

            } catch (NullReferenceException ex) {
                Interaction.MsgBox("Not enough users have entered their predictions yet. Please try later");
            }
        }