CapDemo.Open_Game.pb_SubContest_Click C# (CSharp) Метод

pb_SubContest_Click() приватный Метод

private pb_SubContest_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void
        private void pb_SubContest_Click(object sender, EventArgs e)
        {
            lblHint.Visible = true;
            if (step_1 == 1)
            {
                //sound to player's turn
                try
                {
                    axWindowsMediaPlayer1.URL = (Directory.GetCurrentDirectory()) + "\\Sound\\Click.wav";
                    axWindowsMediaPlayer1.Ctlcontrols.play();
                }
                catch (Exception)
                {
                }

                ShowTeamsChallenged_1();
                foreach (Team teamControllerScreen in flp_Team.Controls)
                {
                    teamControllerScreen.flp_Answer.Controls.Clear();
                    teamControllerScreen.flp_Answer.Visible = true;
                }
                audience.flp_PlayerAnswers.Controls.Clear();
                //Clear panel
                audience.flp_AnswerQuiz.Controls.Clear();
                audience.lbl_QuestionContent.Text = "";
                audience.lbl_Phase.Text = "";
                audience.lbl_typeQ.Text = "";
                audience.lbl_Point.Text = "";

                audience.progressBarControl1.Value = 1;
                typequestion = "";
                countTime = 0;
                CorrectShortAnswer_1 = "";
                CorrectAnswerChallenge_1 = "";
                CorrectAnswer_1 = 0;
                PlayerCheck_1 = 0;

                audience.tbc_ShowGame.SelectedTab = audience.tab_Map;
                step_1++;
                lblHint.Text = guideline_1[1].ToString();
            }
            else if (step_1 == 2)
            {
                int sub_team = 0;
                foreach (Team teamCS in flp_Team.Controls)
                {
                    if (teamCS.chk_Challenged.Checked == true)
                    {
                        sub_team++;
                    }
                }

                if (sub_team >= 2)
                {
                    if (ShowQuestionByIDPhase_1() == true)
                    {
                        //sound show question
                        try
                        {
                            axWindowsMediaPlayer1.URL = (Directory.GetCurrentDirectory()) + "\\Sound\\HienThiCauHoi.wav";
                            axWindowsMediaPlayer1.Ctlcontrols.play();
                        }
                        catch (Exception)
                        {
                        }
                        audience.tbc_ShowGame.SelectedTab = audience.tab_ShowQuestion;
                        step_1++;
                        lblHint.Text = guideline_1[2].ToString();
                        foreach (Team teamCS in flp_Team.Controls)
                        {
                            teamCS.chk_Challenged.Visible = false;
                        }
                    }
                    else
                    {
                        MessageBox.Show("Run Out of Question");
                    }
                }
                else
                {
                    MessageBox.Show("Please select more 1 team for sub question.");
                    sub_team = 0;
                }

            }
            else if (step_1 == 3)
            {
                //sound enter answer
                try
                {
                    axWindowsMediaPlayer1.URL = (Directory.GetCurrentDirectory()) + "\\Sound\\CapNhatDiem.wav";
                    axWindowsMediaPlayer1.Ctlcontrols.play();
                }
                catch (Exception)
                {
                }

                EnterAnswerChallenge_1();
                foreach (Team teamControllerScreen in flp_Team.Controls)
                {
                    teamControllerScreen.flp_Answer.Visible = false;
                }
                audience.tbc_ShowGame.SelectedTab = audience.tab_ShowQuestion;
                step_1++;
                lblHint.Text = guideline_1[3].ToString();
            }
            else if (step_1 == 4)
            {
                //Sound show correct answer
                try
                {
                    axWindowsMediaPlayer1.URL = (Directory.GetCurrentDirectory()) + "\\Sound\\DapAnDung.wav";
                    axWindowsMediaPlayer1.Ctlcontrols.play();
                }
                catch (Exception)
                {
                }

                ShowCorrectAnswer_1();
                audience.tbc_ShowGame.SelectedTab = audience.tab_ShowQuestion;
                step_1++;
                lblHint.Text = guideline_1[4].ToString();
            }
            else if (step_1 == 5)
            {
                //Sound check score
                try
                {
                    axWindowsMediaPlayer1.URL = (Directory.GetCurrentDirectory()) + "\\Sound\\CapNhatDiem.wav";
                    axWindowsMediaPlayer1.Ctlcontrols.play();
                }
                catch (Exception)
                {
                }

                UpdatePlayerChallengeInPM_1();

                audience.tbc_ShowGame.SelectedTab = audience.tab_Map;
                foreach (Team teamCS in flp_Team.Controls)
                {
                    teamCS.chk_Challenged.Checked = false;
                }
                step_1 = 1;
                lblHint.Text = guideline_1[0].ToString();
            }
        }