private void btnNextQuestion_Click_1(object sender, EventArgs e) { if (rb3.Checked) { 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 Answer, your score is still" + GlobalQuizValues.playerScoreDuringQuiz; SoundMethodSpeech.speech(output); } } this.Hide(); frmBeginner3 myNextScreen = new frmBeginner3(); myNextScreen.Show(); }
void timer1_Tick(object sender, EventArgs e) { if (progressBar1.Value != 10) { progressBar1.Value++; } else { timer1.Stop(); MessageBox.Show("You ran out of time. Your Score is still: " + GlobalQuizValues.playerScoreDuringQuiz); this.Hide(); frmBeginner3 mynextscreen = new frmBeginner3(); 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); } } }
void timer1_Tick(object sender, EventArgs e) { /*checks that if the progress bar is full it tells the user they have ran out of time and displays there current score * if the progress bar value is below the max value it adds 1 on to it*/ if (progressBar1.Value != 20) { progressBar1.Value++; } else { timer1.Stop(); MessageBox.Show("You ran out of time. Your Score is still: " + GlobalQuizValues.playerScoreDuringQuiz); this.Hide(); frmBeginner3 mynextscreen = new frmBeginner3(); 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); } } }
private void btnNextQuestion_Click_1(object sender, EventArgs e) { timer1.Stop(); //Checks if selected answer is correct and adds 1 to score and displays the new current score in a message box if (rb1.Checked && rb1.Text == "Universal Serial Bus" || rb2.Checked && rb2.Text == "Universal Serial Bus" || rb3.Checked && rb3.Text == "Universal Serial Bus" || rb4.Checked && rb4.Text == "Universal Serial Bus") { GlobalQuizValues.playerScoreDuringQuiz += 1; pctCorrect.Visible = true; pctIncorrect.Visible = false; MessageBox.Show("Correct\n Your New Score is \t" + GlobalQuizValues.playerScoreDuringQuiz); //if user wants the result spoken back to them it outputs a string message to the speech synthesiser if (playerDetails.activesound == true) { string output = "That Was the correct Answer, Your New Score is" + GlobalQuizValues.playerScoreDuringQuiz; SoundMethodSpeech.speech(output); } } //if answer is not right it keeps the score the same, displays incorrect image and displays a message box containing relevant info else { GlobalQuizValues.playerScoreDuringQuiz += 0; pctCorrect.Visible = false; pctIncorrect.Visible = true; MessageBox.Show("Incorrect\n Youre Score is still \t" + GlobalQuizValues.playerScoreDuringQuiz); //if user wants the result spoken back to them it outputs a string message to the speech synthesiser if (playerDetails.activesound == true) { string output = "That was the wrong Answer, your score is still" + GlobalQuizValues.playerScoreDuringQuiz; SoundMethodSpeech.speech(output); } } //Hides current form and opens the next question this.Hide(); frmBeginner3 myNextScreen = new frmBeginner3(); myNextScreen.Show(); }