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

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

public EnterAnswerNotChallenge ( ) : void
Результат void
        public void EnterAnswerNotChallenge()
        {
            foreach (Team teamCS in flp_Team.Controls)
            {
                if (Convert.ToInt32(teamCS.lbl_Sequence.Text) == sequenceplayer(records.ElementAt(team).IDPlayer))
                {
                    if (typequestion == "onechoice")
                    {
                        foreach (ShowAnswer showAnswer in audience.flp_AnswerQuiz.Controls)
                        {
                            foreach (RadioButton oneChoice in teamCS.flp_Answer.Controls)
                            {
                                if (oneChoice.Checked == true)
                                {
                                    if (oneChoice.Text == showAnswer.rdb1.Text)
                                    {
                                        showAnswer.rdb1.Checked = true;
                                        showAnswer.BackgroundImage = Properties.Resources.chon;

                                        foreach (PlayerAnswer playerAnswer in audience.flp_PlayerAnswers.Controls)
                                        {
                                            //check team on controller screen and TeamAnswer on audience screen is equal
                                            if (teamCS.lbl_IDPlayer.Text == playerAnswer.lbl_IDPlayer.Text)
                                            {
                                                playerAnswer.lbl_TeamAnswer.Text = oneChoice.Text;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                    else
                    {
                        if (typequestion == "multichoice")
                        {
                            //string[] multianswer;
                            foreach (ShowAnswer showAnswer in audience.flp_AnswerQuiz.Controls)
                            {
                                foreach (CheckBox multiChoice in teamCS.flp_Answer.Controls)
                                {
                                    if (multiChoice.Checked == true)
                                    {
                                        if (multiChoice.Text == showAnswer.chk1.Text)
                                        {
                                            showAnswer.chk1.Checked = true;
                                            showAnswer.BackgroundImage = Properties.Resources.chon;

                                            foreach (PlayerAnswer playerAnswer in audience.flp_PlayerAnswers.Controls)
                                            {
                                                if (teamCS.lbl_IDPlayer.Text == playerAnswer.lbl_IDPlayer.Text)
                                                {
                                                    playerAnswer.lbl_TeamAnswer.Text += multiChoice.Text + " ";
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        else
                        {
                            foreach (TextBox shortanswer in teamCS.flp_Answer.Controls)
                            {
                                PlayerAnswerShortQuestion = shortanswer.Text;

                                foreach (PlayerAnswer playerAnswer in audience.flp_PlayerAnswers.Controls)
                                {
                                    //check team on controller screen and TeamAnswer on audience screen is equal
                                    if (teamCS.lbl_IDPlayer.Text == playerAnswer.lbl_IDPlayer.Text)
                                    {
                                        playerAnswer.lbl_TeamAnswer.Text = shortanswer.Text;

                                        if (playerAnswer.lbl_TeamAnswer.Text.Count() > 8)
                                        {
                                            if (playerAnswer.lbl_TeamAnswer.Text.Count() <= 10)
                                            {
                                                playerAnswer.lbl_TeamAnswer.Font = new Font(playerAnswer.lbl_TeamAnswer.Font.FontFamily, 18.0f, playerAnswer.lbl_TeamAnswer.Font.Style);
                                            }
                                            else
                                            {
                                                if (playerAnswer.lbl_TeamAnswer.Text.Count() <= 13)
                                                {
                                                    playerAnswer.lbl_TeamAnswer.Font = new Font(playerAnswer.lbl_TeamAnswer.Font.FontFamily, 14.0f, playerAnswer.lbl_TeamAnswer.Font.Style);
                                                }
                                                else
                                                {
                                                    playerAnswer.lbl_TeamAnswer.Font = new Font(playerAnswer.lbl_TeamAnswer.Font.FontFamily, 12.0f, playerAnswer.lbl_TeamAnswer.Font.Style);
                                                }
                                                //playerAnswer.lbl_TeamAnswer.Font = new Font(playerAnswer.lbl_TeamAnswer.Font.FontFamily, 10.0f, playerAnswer.lbl_TeamAnswer.Font.Style);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                    teamCS.gb_team.Visible = false;
                }
                else
                {
                    teamCS.gb_team.Visible = false;
                }
            }
        }