Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                saveAnswer();
                Unchecked();
                questions.Text    = ques[j++];
                optionA.Text      = ques[j++];
                optionB.Text      = ques[j++];
                optionC.Text      = ques[j++];
                radioButton4.Text = ques[j++];
                countQues++;

                RemaingingQuestions.Text = QNumber.ToString();
                qNo.Text = QNumber.ToString();

                if (countQues == addQues)
                {
                    tabControl1.SelectedTab = tabPage3;
                }
                QNumber++;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #2
0
 public Test(string roll)
 {
     try
     {
         InitializeComponent();
         readData();
         questions.Text    = ques[j++];
         optionA.Text      = ques[j++];
         optionB.Text      = ques[j++];
         optionC.Text      = ques[j++];
         radioButton4.Text = ques[j++];
         Unchecked();
         label2.Text = addQues.ToString();
         RemaingingQuestions.Text = QNumber.ToString();
         qNo.Text = QNumber.ToString();
         RNumber  = roll;
         table.Hide();
         QNumber++;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }