private void btnPause_Click(object sender, EventArgs e) { if (pressedfirsttime == true) { QuestionTimer.Stop(); pressedfirsttime = false; } else { QuestionTimer.Start(); pressedfirsttime = true; } }
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(); } } }
public void Quiz() { QuestionTimer.Start(); GenerateQuestion(Subject); }