Beispiel #1
0
 private void showSimpleQuestion()
 {
     AnswersgroupBox.Hide();
     q = Question[i_Simple];
     labelQues.Text = q.QuestionText;
     i_Simple++;
 }
Beispiel #2
0
        private void showAmericanQuestion()
        {
            textBoxAnsw.Hide();
            q = AmericanQuestion[i_American];
            var y = 0;

            labelQues.Text = q.QuestionText.ToString();
            AnswersList    = BL.GetAnswers(q.ID);
            AnswersgroupBox.Show();
            AnswersgroupBox.Controls.Clear();

            foreach (var answer in AnswersList)
            {
                RadioButton newRadio = new RadioButton();
                newRadio.Text     = answer.AnswerValue.ToString();
                newRadio.Font     = new Font("Microsoft YaHei UI", 18);
                newRadio.Location = new Point(0, y);
                AnswersgroupBox.Controls.Add(newRadio);
                y += 30;
            }
            i_American++;
        }
Beispiel #3
0
        private void buttonNext_Click(object sender, EventArgs e)
        {
            CheckAns();
            if (err == 1)
            {
                error.Text = "עליך להקיש ספרות";
                AnswersgroupBox.Hide();
                q = Question[i_Simple - 1];
                labelQues.Text = q.QuestionText;
                err            = 0;
                return;
            }
            error.Text = "";
            if (AmericanQuestion.Count() > i_American)
            {
                textBoxAnsw.Hide();
                showAmericanQuestion();
            }
            else
            {
                textBoxAnsw.Show();
                textBoxAnsw.Text = "";

                if (Question.Count() > i_Simple)
                {
                    showSimpleQuestion();
                }
                else
                {
                    BL.EndTest(points);
                    End end = new End();
                    this.Hide();
                    end.Show();
                }
                return;
            }
        }