Ejemplo n.º 1
0
        public void checkAnswer(string buttonText, int whichButton)
        {
            currentQuestion.chosenAnswer = new ChosenAnswer(buttonText);

            if (currentQuestion.IsAnswerRight())
            {
                whichBlink = whichButton;
                playAnswerSong(AnswerSongMode.Right, currentQuestion.level);
            }

            else   //ako ne e tocen selektiraniot odgovor da pocne da trepka (zeleno) tocniot odgovor

            {
                if (button1.Text == currentQuestion.correctAnswer.correctAnswer)
                {
                    whichBlink = 1;
                }
                else
                if (button2.Text == currentQuestion.correctAnswer.correctAnswer)
                {
                    whichBlink = 2;
                }
                else
                if (button3.Text == currentQuestion.correctAnswer.correctAnswer)
                {
                    whichBlink = 3;
                }
                else
                if (button4.Text == currentQuestion.correctAnswer.correctAnswer)
                {
                    whichBlink = 4;
                }


                nextQ = false;
                playAnswerSong(AnswerSongMode.Wrong, currentQuestion.level);
            }

            counter = 0;
            timer1.Start();
            timer1.Enabled = true;
        }
Ejemplo n.º 2
0
        public void checkAnswer(string buttonText, int whichButton)
        {
            q.chosenAnswer = new ChosenAnswer(buttonText);

            if (q.IsAnswerRight())
            {
                whichBlink = whichButton;
            }
            //ako ne e tocen selektiraniot odgovor da pocne da trepka (zeleno) tocniot odgovor
            else
            {
                if (button1.Text == q.correctAnswer.correctAnswer)
                {
                    whichBlink = 1;
                }
                else
                if (button2.Text == q.correctAnswer.correctAnswer)
                {
                    whichBlink = 2;
                }
                else
                if (button3.Text == q.correctAnswer.correctAnswer)
                {
                    whichBlink = 3;
                }
                else
                if (button4.Text == q.correctAnswer.correctAnswer)
                {
                    whichBlink = 4;
                }


                nextQ = false;
            }

            counter = 0;
            timer1.Start();
            timer1.Enabled = true;
        }