Esempio n. 1
0
        private void TimerVisitable_Tick(object sender, EventArgs e)
        {
            TimerVisitable.Stop();
            this.btnSpeaker2.Visible = false;
            int temp = BackEnd.getQuestion();

            if (temp != -1)
            {
                this.Questions.Text  = Data.newWord[temp % 5].question.ToString();
                Data.currentQuestion = Data.newWord[temp % 5];
                loadAnswer();
            }
            else
            {
                this.btnSpeaker2.Visible = true;
                this.btnSpeaker2.Text    = "Congratulation !\n You have learn 5 new words!";
                timerOutOfTime.Stop();
                this.lblTime.Hide();
                this.LearnSuccess();
                Data.XONG                = true;
                this.btnDone.Visible     = true;
                this.btnHome.Visible     = true;
                this.btnSpeaker2.Visible = this.AnswerA.Visible = this.AnswerB.Visible = this.AnswerC.Visible = this.AnswerD.Visible = this.Questions.Visible = false;
                Questions.Enabled        = false;
            }
        }
Esempio n. 2
0
        private void AnswerA_Click(object sender, EventArgs e)
        {
            string s = AnswerA.Text.Remove(0, 3);

            if (s == Data.currentQuestion.answer)
            {
                voice.Read(Data.currentQuestion.question);
                TimerVisitable.Start();
                this.btnSpeaker2.Text = "Correct!";
                score                   += 4;
                btnScore.Text            = score.ToString();
                this.btnSpeaker2.Visible = true;
            }
            else
            {
                WrongAnswer();
            }
        }