示例#1
0
        private void enterPredictionsButton_Click(System.Object sender, System.EventArgs e)
        {
            fixtureBoxList.Clear();
            this.MainFlowLayoutPanel.Controls.Clear();
            FixtureBuilder fb = new FixtureBuilder();

            fixtures = fb.getFixtures();
            fix      = 0;


            try {
                foreach (Fixture Fixture in fixtures)
                {
                    FixtureBox usercontrol = new FixtureBox(Fixture.Home_Team, Fixture.Away_Team, Fixture.Date, getTeamBadge(fixtures[fix].Home_Team), getTeamBadge(fixtures[fix].Away_Team));
                    MainFlowLayoutPanel.Controls.Add(usercontrol);
                    usercontrol.Dock    = DockStyle.Fill;
                    usercontrol.Visible = false;
                    fixtureBoxList.Add(usercontrol);
                    fix = fix + 1;
                }

                fixtureBoxList[0].Visible            = true;
                fixtureBoxList[0].backButton.Enabled = false;
                this.submitButton.Visible            = false;
                this.editButton.Visible = false;
            } catch (NullReferenceException ex) {
                Interaction.MsgBox("No fixtures available");
            }

            if (fix != 10)
            {
                this.MainFlowLayoutPanel.Controls.Clear();
                fixtureBoxList.Clear();
                Interaction.MsgBox("There are currently no fixtures to display");
            }
        }
示例#2
0
        private void enterPredictionsButton_Click(System.Object sender, System.EventArgs e)
        {
            fixtureBoxList.Clear();
            this.MainFlowLayoutPanel.Controls.Clear();
            FixtureBuilder fb = new FixtureBuilder();
            fixtures = fb.getFixtures();
            fix = 0;

            try {
                foreach (Fixture Fixture in fixtures) {
                    FixtureBox usercontrol = new FixtureBox(Fixture.Home_Team, Fixture.Away_Team, Fixture.Date, getTeamBadge(fixtures[fix].Home_Team), getTeamBadge(fixtures[fix].Away_Team));
                    MainFlowLayoutPanel.Controls.Add(usercontrol);
                    usercontrol.Dock = DockStyle.Fill;
                    usercontrol.Visible = false;
                    fixtureBoxList.Add(usercontrol);
                    fix = fix + 1;

                }

                fixtureBoxList[0].Visible = true;
                fixtureBoxList[0].backButton.Enabled = false;
                this.submitButton.Visible = false;
                this.editButton.Visible = false;

            } catch (NullReferenceException ex) {
                Interaction.MsgBox("No fixtures available");
            }

            if (fix != 10) {
                this.MainFlowLayoutPanel.Controls.Clear();
                fixtureBoxList.Clear();
                Interaction.MsgBox("There are currently no fixtures to display");
            }
        }