Exemple #1
0
        private void btnNextQuestion_Click(object sender, EventArgs e)
        {
            timer1.Stop();

            if (txtAwnser.Text == "Bitcoin" || txtAwnser.Text == "bitcoin")
            {
                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 Your 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();
            frmAdvanced3 myNextScreen = new frmAdvanced3();

            myNextScreen.Show();
        }
        private void btnNextQuestion_Click(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 (txtAwnser.Text == "Bitcoin" || txtAwnser.Text == "bitcoin")
            {
                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 Your 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);
                }
            }

            this.Hide();
            frmAdvanced3 myNextScreen = new frmAdvanced3();

            myNextScreen.Show();
        }