Example #1
0
        public void VerifyResult()
        {
            // Verify if value was entered correctly
            if (UserResult == 0)
            {
                VerificationCode = VerificationCodeList.RESULT_ERROR_INVALID_ENTRY;
            }
            else
            {
                AdditionQuestion addQuestion = new AdditionQuestion(FirstNumber, SecondNumber, UserResult);

                if (addQuestion.Result)
                {
                    VerificationCode = VerificationCodeList.RESULT_OK;
                }
                else
                {
                    VerificationCode = VerificationCodeList.RESULT_WRONG;
                }

                HistoryFile histfile = new HistoryFile();
                histfile.AddItem(addQuestion);
            }
        }
Example #2
0
 // Reset binded variables
 public void Reset()
 {
     UserResult       = 0;
     VerificationCode = VerificationCodeList.RESULT_IDLE;
     _generateRandomNumbers();
 }