public void InitializeNew()
 {
     _currentControl.EnableButton("_nextbutton");
     _currentControl.setQuestionString(QABot.GetQuestion(QABot.ExerciseCount, QABot.QuestionCount));
     _currentControl.DisableButton("_submitBtn");
     _currentControl.setAnswerString(QABot.GetCorrectAnswer(QABot.ExerciseCount, QABot.QuestionCount));//remember to remove.
 }
Esempio n. 2
0
        /// <summary>
        /// Generic method for simulating both the next and prev button clicks
        /// </summary>
        private bool LoadNewQuestion(int nextQuestionNumber)
        {
            string questionString = QABot.GetQuestion(QABot.ExerciseCount, nextQuestionNumber);

            if (nextQuestionNumber > 0 && !String.IsNullOrEmpty(questionString))
            {
                _currentControl.ClearControls();
                _currentControl.setQuestionString(questionString);
                _currentControl.EnableButton("_nextbutton");
                _currentControl.setAnswerString(QABot.GetUserAnswer(nextQuestionNumber));
                return(true);
            }
            //else
            //{
            //    //QABot.DecrementQuestionCount(); //This takes care of the "EOF" null value returned
            //    _currentControl.DisableButton("_nextbutton");
            //    _currentControl.EnableButton("_submitBtn");
            return(false);
            //}
        }