Пример #1
0
 //Tested
 public IList <Choice> UpdateChoices(IList <Choice> choices, IProblemAddEdit bindingModel)
 {
     choices[0].Content = bindingModel.AnswerA;
     choices[1].Content = bindingModel.AnswerB;
     choices[2].Content = bindingModel.AnswerC;
     choices[3].Content = bindingModel.AnswerD;
     return(choices);
 }
Пример #2
0
        //Tested
        public IList <Choice> AddChoices(IProblemAddEdit bindingModel, GameProblem problem)
        {
            var list = new List <Choice>();
            var a    = AddChoice(bindingModel.AnswerA, problem);
            var b    = AddChoice(bindingModel.AnswerB, problem);
            var c    = AddChoice(bindingModel.AnswerC, problem);
            var d    = AddChoice(bindingModel.AnswerD, problem);

            list.Add(a);
            list.Add(b);
            list.Add(c);
            list.Add(d);
            return(list);
        }
Пример #3
0
        //Tested
        public string GetRightAnswerString(IProblemAddEdit bindingModel)
        {
            switch (bindingModel.RightAnswer)
            {
            case ChoiceEnum.A:
                return(bindingModel.AnswerA);

            case ChoiceEnum.B:
                return(bindingModel.AnswerB);

            case ChoiceEnum.C:
                return(bindingModel.AnswerC);

            case ChoiceEnum.D:
                return(bindingModel.AnswerD);
            }
            return(null);
        }