Example #1
0
 private void btnPause_Click(object sender, EventArgs e)
 {
     if (pressedfirsttime == true)
     {
         QuestionTimer.Stop();
         pressedfirsttime = false;
     }
     else
     {
         QuestionTimer.Start();
         pressedfirsttime = true;
     }
 }
Example #2
0
 private void QuestionTimer_Tick(object sender, EventArgs e)
 {
     if (Timer > 0)
     {
         Timer         = Timer - 1;
         LblTimer.Text = Timer + " seconds";
     }
     else
     {
         QuestionTimer.Stop();
         if (QuestionsLeft == 0)
         {
         }
         else
         {
             NextQuestion();
             QuestionTimer.Start();
         }
     }
 }
Example #3
0
 public void Quiz()
 {
     QuestionTimer.Start();
     GenerateQuestion(Subject);
 }