private void btnNextQuestion_Click(object sender, EventArgs e) { timer1.Stop(); if (rb1.Checked && rb1.Text == "Micro SD" || rb2.Checked && rb2.Text == "Micro SD" || rb3.Checked && rb3.Text == "Micro SD" || rb4.Checked && rb4.Text == "Micro SD") { GlobalQuizValues.playerScoreDuringQuiz += 1; pctCorrect.Visible = true; pctIncorrect.Visible = false; MessageBox.Show("Correct\n Your New Score is \t" + GlobalQuizValues.playerScoreDuringQuiz); if (playerDetails.activesound == true) { string output = "That Was the correct Answer, Your New Score is" + GlobalQuizValues.playerScoreDuringQuiz; SoundMethodSpeech.speech(output); } } else { GlobalQuizValues.playerScoreDuringQuiz += 0; pctCorrect.Visible = false; pctIncorrect.Visible = true; MessageBox.Show("Incorrect\n Youre Score is still \t" + GlobalQuizValues.playerScoreDuringQuiz); if (playerDetails.activesound == true) { string output = "That was the wrong awnser, your score is still" + GlobalQuizValues.playerScoreDuringQuiz; SoundMethodSpeech.speech(output); } } this.Hide(); frmIntermediate4 myNextScreen = new frmIntermediate4(); myNextScreen.Show(); }
void timer1_Tick(object sender, EventArgs e) { if (progressBar1.Value != 20) { progressBar1.Value++; } else { timer1.Stop(); MessageBox.Show("You ran out of time. Your Score is still: " + GlobalQuizValues.playerScoreDuringQuiz); this.Hide(); frmIntermediate4 mynextscreen = new frmIntermediate4(); mynextscreen.ShowDialog(); GlobalQuizValues.playerScoreDuringQuiz = GlobalQuizValues.playerScoreDuringQuiz += 0; if (playerDetails.activesound == true) { string output = "That was the wrong Answer, your score is still" + GlobalQuizValues.playerScoreDuringQuiz; SoundMethodSpeech.speech(output); } } }