Ejemplo n.º 1
0
 public QuestionForm(QUESTION Q, ANSWER A1, ANSWER A2, ANSWER A3, ANSWER A4, StudentForm stu, int qusCount, Wait W)
 {
     InitializeComponent();
     Qu       = Q;
     An1      = A1;
     An2      = A2;
     An3      = A3;
     An4      = A4;
     Stu      = stu;
     QusCount = qusCount;
     w        = W;
 }
Ejemplo n.º 2
0
        private void StartExam()
        {
            try
            {
                QUESTION Question = new QUESTION()
                {
                    Id = reader.ReadInt32(), Question1 = reader.ReadString()
                };
                ANSWER Ans1 = new ANSWER()
                {
                    Id = reader.ReadInt32(), Answer1 = reader.ReadString()
                };
                ANSWER Ans2 = new ANSWER()
                {
                    Id = reader.ReadInt32(), Answer1 = reader.ReadString()
                };
                ANSWER Ans3 = new ANSWER()
                {
                    Id = reader.ReadInt32(), Answer1 = reader.ReadString()
                };
                ANSWER Ans4 = new ANSWER()
                {
                    Id = reader.ReadInt32(), Answer1 = reader.ReadString()
                };

                QuestionForm dd = new QuestionForm(Question, Ans1, Ans2, Ans3, Ans4, this, QuestionCount, w);
                dd.ShowDialog();
                QuestionCount++;
            }
            catch (Exception ex)
            {
                groupBox1.Invoke((MethodInvoker)(() => groupBox1.Visible = false));
                this.Show();
                MessageBox.Show("Error: >> " + ex.Message);
            }
        }