private void btnNextQuestion_Click(object sender, EventArgs e)
        {
            timer1.Stop();
            if (rb1.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();
            frmIntermediate2 myNextScreen = new frmIntermediate2();

            myNextScreen.Show();
        }
Esempio n. 2
0
        private void btnNextQuestion_Click(object sender, EventArgs e)
        {
            timer1.Stop();
            if (rb1.Checked && rb1.Text == "Graphical User Interface" || rb2.Checked && rb2.Text == "Graphical User Interface" || rb3.Checked && rb3.Text == "Graphical User Interface" || rb4.Checked && rb4.Text == "Graphical User Interface")
            {
                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);
                }
            }
            //frmQuestion6 mycurrentscreen = new frmQuestion6();
            //mycurrentscreen.Close();
            this.Hide();
            frmIntermediate3 myNextScreen = new frmIntermediate3();

            myNextScreen.Show();
        }
        private void btnNextQuestion_Click(object sender, EventArgs e)
        {
            //Stops The Timer
            timer1.Stop();
            if (rb1.Checked && rb1.Text == "Data Protection Act 1998" || rb2.Checked && rb2.Text == "Data Protection Act 1998" || rb3.Checked && rb3.Text == "Data Protection Act 1998" || rb4.Checked && rb4.Text == "Data Protection Act 1998")
            {
                //Adds 1 on to the score
                GlobalQuizValues.playerScoreDuringQuiz += 1;
                //Shows the pctcorrect and hides the pctincorrect
                pctCorrect.Visible   = true;
                pctIncorrect.Visible = false;
                //Shows a message box displaying the users score
                MessageBox.Show("Correct\n Your New Score is \t" + GlobalQuizValues.playerScoreDuringQuiz);
                //checks if the user has enabled speech and if true plays a message
                if (playerDetails.activesound == true)
                {
                    string output = "That Was the correct answer, Your New Score is" + GlobalQuizValues.playerScoreDuringQuiz;
                    SoundMethodSpeech.speech(output);
                }
            }
            else
            {
                //Adds 0 on to the score of the user
                GlobalQuizValues.playerScoreDuringQuiz += 0;
                //Displays the incorrect image and hides the correct image
                pctCorrect.Visible   = false;
                pctIncorrect.Visible = true;
                //Shows a Message box telling them they got it incorrect and what there score was
                MessageBox.Show("Incorrect\n Youre Score is still \t" + GlobalQuizValues.playerScoreDuringQuiz);
                //checks if the user has enabled speech and if true plays a message
                if (playerDetails.activesound == true)
                {
                    string output = "That was the wrong answer, your score is still" + GlobalQuizValues.playerScoreDuringQuiz;
                    SoundMethodSpeech.speech(output);
                }
            }
            //Hides The Form
            this.Hide();
            //Opens the finish form
            frmFinish myNextScreen = new frmFinish();

            myNextScreen.Show();
        }
Esempio n. 4
0
 void timer1_Tick(object sender, EventArgs e)
 {
     if (progressBar1.Value != 15)
     {
         progressBar1.Value++;
     }
     else
     {
         timer1.Stop();
         MessageBox.Show("You ran out of time. Your Score is still: " + GlobalQuizValues.playerScoreDuringQuiz);
         this.Hide();
         frmAdvanced3 mynextscreen = new frmAdvanced3();
         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);
         }
     }
 }
Esempio n. 5
0
        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 (rb1.Checked && rb1.Text == "1 PetaByte" || rb2.Checked && rb2.Text == "1 PetaByte" || rb3.Checked && rb3.Text == "1 PetaByte" || rb4.Checked && rb4.Text == "1 PetaByte")
            {
                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);
                }
            }

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

            myNextScreen.Show();
        }
 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 != 25)
     {
         progressBar1.Value++;
     }
     else
     {
         timer1.Stop();
         MessageBox.Show("You ran out of time. Your Score is still: " + GlobalQuizValues.playerScoreDuringQuiz);
         this.Hide();
         frmAdvanced3 mynextscreen = new frmAdvanced3();
         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);
         }
     }
 }