//Load all Setup
        public void LoadAll()
        {
            Setting_Game sg = new Setting_Game();
            sg.flp_Game.Controls.Clear();
            ContestBL ContestBL = new ContestBL();
            List<Contest> ListContest;
            ListContest = ContestBL.GetAllSetup();

            if (ListContest != null)
            {
                for (int i = 0; i < ListContest.Count; i++)
                {
                    //New_Game game = new New_Game();
                    lbl_CompetitionName.Text = ListContest.ElementAt(i).Competition.NameCompetition;
                    lbl_RoundName.Text = ListContest.ElementAt(i).Round.NameRound;
                    lbl_ContestName.Text = ListContest.ElementAt(i).NameContest;
                    lbl_IDContest.Text = ListContest.ElementAt(i).IDContest.ToString();
                    //lbl_Number.Text = (i + 1).ToString();
                    if (ListContest.ElementAt(i).NumberChallenge > 0)
                    {
                        lbl_Status.Text = "Hoàn tất";
                        lbl_Status.ForeColor = Color.LightGreen;
                    }
                    else
                    {
                        lbl_Status.Text = "Chưa hoàn Tất";
                        lbl_Status.ForeColor = Color.Red;
                    }
                    sg.flp_Game.Controls.Add(this);
                }
            }
        }
Exemple #2
0
        private void btn_GameSetting_Click(object sender, EventArgs e)
        {
            if (this.onSetup != null)
                this.onSetup(this, e);

            pnl_Setting.Visible = true;
            pnl_Setting.Controls.Clear();
            Setting_Game sg = new Setting_Game();
            pnl_Setting.Controls.Add(sg);
        }