コード例 #1
0
ファイル: Page1.xaml.cs プロジェクト: brekooname/QuizzingFun
 /*The selected answer is compared to the actual correct answer from the question set. If the answer is correct, it pops up
  * a dialogue box indicating so, and if the option selected is wrong , it pops up a dialogue box indicating that and also gives
  * the correct answer*/
 private void DisplayMessageforSelectedAnswer(string selectedAnswer)
 {
     if (quizPageViewModel.AnswerIsCorrect(selectedAnswer))
     {
         DisplayAlert("CORRECT !", "\n YOUR ANSWER : " + selectedAnswer.ToUpper(), "OK");
     }
     else
     {
         DisplayAlert("WRONG !", "\n YOURANSWER : " + selectedAnswer.ToUpper() +
                      "\n\n CORRECT ANSWER : " + quizPageViewModel.CorrectAnswer.ToUpper(), "OK");
     }
 }