示例#1
0
        private void onSubmitExercise(object sender, EventArgs e)
        {
            _currentAppState.SubmitButtonClicked(_answerRichTextBox.Text);
            DialogResult dr = MessageBoxHelper.QuestionYesNo(this, "Do you want to Submit now?");

            if (dr == DialogResult.No)
            {
                return;
            }
            DisplayExerciseResult();
            //QABot.SaveCurrentAnswer(_answerRichTextBox.Text, QABot.QuestionCount);
            this.ClearControls();
            QABot.ResetQuestionCount();
            QABot.ResetFailedQuestionCount();
            _currentAppState.InitializeNew();
        }
 private void onLoad(object sender, EventArgs e)
 {
     Application.Idle += onIdle;
     AppStateInfo _savedStateData = StatusMgr.LoadSavedStateVariables();
     if (_savedStateData != null)
     {
         InitializeLoadedState(_savedStateData);
     }
     else
     {
         _currentAppState = new NormalState(this);//Application starts in the normal state for new user.
         _currentAppState.InitializeNew();
     }
 }
示例#3
0
        private void onLoad(object sender, EventArgs e)
        {
            Application.Idle += onIdle;
            AppStateInfo _savedStateData = StatusMgr.LoadSavedStateVariables();

            if (_savedStateData != null)
            {
                InitializeLoadedState(_savedStateData);
            }
            else
            {
                _currentAppState = new NormalState(this);//Application starts in the normal state for new user.
                _currentAppState.InitializeNew();
            }
        }