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

StartGame() публичный Метод

public StartGame ( ) : void
Результат void
        public void StartGame()
        {
            //Rungame.IdContest = iDContest;
            audience.IdContest = iDContest;
            if (step == 1)
            {
                pb_EndGame.Visible = true;
                //this.SuspendLayout();
                audience.SuspendLayout();
                lblHint.Text = guideline[1].ToString();
                loadMap();
                Contest.Run_I = 1;
                ContestBL.CheckRunContestbyID(Contest);
                //Sound
                if (SoundWelcome == true)
                {
                    try
                    {
                        axWindowsMediaPlayer1.URL = (Directory.GetCurrentDirectory()) + "\\Sound\\ChaoMung.wav";
                        axWindowsMediaPlayer1.Ctlcontrols.play();
                        SoundWelcome = false;
                    }
                    catch (Exception)
                    {
                    }
                }
                audience.ResumeLayout();
                //this.ResumeLayout();

            }
            else if (step == 2)
            {
                //sound to player's turn
                try
                {
                    axWindowsMediaPlayer1.URL = (Directory.GetCurrentDirectory()) + "\\Sound\\Click.wav";
                    axWindowsMediaPlayer1.Ctlcontrols.play();
                }
                catch (Exception)
                {
                }

                lblHint.Text = guideline[2].ToString();
                GoPlayer();
            }
            else if (step == 3)
            {
                lblHint.Text = guideline[3].ToString();
                ShowQuestion();
            }
            else if (step == 4)
            {
                //sound enter answer
                try
                {
                    axWindowsMediaPlayer1.URL = (Directory.GetCurrentDirectory()) + "\\Sound\\CapNhatDiem.wav";
                    axWindowsMediaPlayer1.Ctlcontrols.play();
                }
                catch (Exception)
                {
                }

                lblHint.Text = guideline[4].ToString();
                EnterAnswer();
                //turn off  time
                //lbl_Time.Text = "1";
                //audience.lbl_TimeShowQuestion.Text = "1";
                //Hide table answer
                foreach (Team teamCS in flp_Team.Controls)
                {
                    teamCS.flp_Answer.Visible = false;
                }
            }
            else if (step == 5)
            {
                //Sound show corect answer when challenged
                if (CheckChallengeChoice == true)
                {
                    try
                    {
                        axWindowsMediaPlayer1.URL = (Directory.GetCurrentDirectory()) + "\\Sound\\DapAnDung.wav";
                        axWindowsMediaPlayer1.Ctlcontrols.play();
                    }
                    catch (Exception)
                    {
                    }
                }
                lblHint.Text = guideline[5].ToString();
                ShowCorrectAnswer();
            }
            else if (step == 6)
            {
                step++;
                loadNumberQuestionInPhase();
                UpdateScreenAfterChallenge();
                audience.tbc_ShowGame.SelectedTab = audience.tab_Map;
                lblHint.Text = guideline[6].ToString();
                DisplayScorePlayerGet();
                //hide check correct
                foreach (Team teamCS in flp_Team.Controls)
                {
                    teamCS.chk_Correct.Visible = false;
                }
            }
            else if (step == 7)
            {
                //sound check score
                try
                {
                    axWindowsMediaPlayer1.URL = (Directory.GetCurrentDirectory()) + "\\Sound\\CapNhatDiem.wav";
                    axWindowsMediaPlayer1.Ctlcontrols.play();
                }
                catch (Exception)
                {
                }

                lblHint.Text = guideline[0].ToString();
                UpdateScreenAfterChallenge();
                CalculteScore();
                audience.tbc_ShowGame.SelectedTab = audience.tab_Map;
                foreach (Team_AudienceScreeen teamAS in audience.flp_Team.Controls)
                {
                    teamAS.lbl_Score.Text = "";
                    teamAS.lbl_Score.Visible = false;
                }
            }
        }