public void ProcessPoints(EQuestionType questionType, bool result) { switch (questionType) { case EQuestionType.QueryFirstQuestion: Settings.Default.QueryFirstQuestion = result; Settings.Default.QueryFirstQuestionTry++; break; case EQuestionType.FastestORM: Settings.Default.FastestORM = result; Settings.Default.FastestORMTry++; break; case EQuestionType.QueryFirstOrDefaultQuestion: Settings.Default.QueryFirstOrDefaultQuestion = result; Settings.Default.QueryFirstOrDefaultQuestionTry++; break; case EQuestionType.QuerySingleQuestion: Settings.Default.QuerySingleQuestion = result; Settings.Default.QuerySingleQuestionTry++; break; case EQuestionType.QuerySingleOrDefaultQuestion: Settings.Default.QuerySingleOrDefaultQuestion = result; Settings.Default.QuerySingleOrDefaultQuestionTry++; break; } Settings.Default.Save(); UpdatePointsState(); Settings.Default.Save(); }
private void PrintAnswerInterpretation(EQuestionType questionType, bool result) { Console.WriteLine(); Console.WriteLine(result ? "Good answer" : "Wrong answer"); using (PointsProcessor processor = new PointsProcessor()) { processor.ProcessPoints(questionType, result); processor.PrintPointsState(); } }
public QuestionAnswerHandler(EQuestionType questionType) { _questionType = questionType; }