Пример #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            FormUserAnswer fua = new FormUserAnswer(this, idExam, idUser);

            this.Visible  = false;
            fua.MdiParent = Form;
            fua.Dock      = DockStyle.Fill;
            fua.Show();
        }
 public FormExamResult(FormUserAnswer fua, int total, int toPass, int answered)
 {
     InitializeComponent();
     form            = fua;
     totalQuestions  = total;
     numToPass       = toPass;
     numRightAnswers = answered;
     Text            = "Итоговый результат";
     label1.Text     = "Количество вопросов: " + total;
     label2.Text     = "Количество ответов для прохождения: " + numToPass;
     label3.Text     = "Количество правильных ответов: " + numRightAnswers;
     if (numToPass > numRightAnswers)
     {
         label4.Text      = "ТЕСТ НЕ ПРОЙДЕН!";
         label4.ForeColor = Color.Red;
     }
     else
     {
         label4.Text      = "ТЕСТ ПРОЙДЕН!";
         label4.ForeColor = Color.Green;
     }
 }