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); } }
// Reset binded variables public void Reset() { UserResult = 0; VerificationCode = VerificationCodeList.RESULT_IDLE; _generateRandomNumbers(); }