Exemple #1
0
 public ReviewPageViewModel(Game game)
 {
     this.game          = game;
     QuestionViewModels = new List <QuizQuestionViewModel>();
     for (int index = 0; index < game.NumberOfQuestions; index++)
     {
         var question  = game.Questions[index];
         var response  = game.Responses[index];
         var viewModel = new QuizQuestionViewModel(question, response);
         QuestionViewModels.Add(viewModel);
     }
 }
Exemple #2
0
 public ReviewPage(ReviewPageViewModel viewModel)
 {
     InitializeComponent();
     this.BindingContext       = viewModel;
     listQuestions.ItemTapped += async(sender, args) =>
     {
         QuizQuestionViewModel qqvm = args.Item as QuizQuestionViewModel;
         if (qqvm != null)
         {
             await this.DisplayAlert("Explanation", qqvm.Explanation, "Ok");
         }
     };
 }