It is model for the Quiz App-Template.
 /// <summary>
 /// The methods provided in this section are simply used to allow
 /// NavigationHelper to respond to the page's navigation methods.
 /// <para>
 /// Page specific logic should be placed in event handlers for the  
 /// <see cref="NavigationHelper.LoadState"/>
 /// and <see cref="NavigationHelper.SaveState"/>.
 /// The navigation parameter is available in the LoadState method 
 /// in addition to page state preserved during an earlier session.
 /// </para>
 /// </summary>
 /// <param name="e">Provides data for navigation methods and event
 /// handlers that cannot cancel the navigation request.</param>
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     Frame.BackStack.RemoveAt(Frame.BackStackDepth - 1);
     Apps app = AppInstance.app;
     if (app.Type.Contains("Spellings"))
     {
         puzzle = SpellingsModel.getInstance();
         ScoreText.Text = "You have completed the Spellings Puzzle: "+puzzle.getPuzzleName();
         TotalCorrect.Text = "Total Correct: " + puzzle.getTotalCorrect();
         TotalWrong.Text = "Total Wrong: " + puzzle.getTotalWrong();
         TotalUnanswered.Text = "Total Unanswered: " + (puzzle.getSpellingsList().Count - (puzzle.getTotalWrong()+puzzle.getTotalCorrect()));
         SpellingsModel.clearInstance();
     }
     else if (app.Type.Contains("Quiz"))
     {
         quiz = QuizModel.getInstance();
         ScoreText.Text = "You have completed the Quiz: "+quiz.getQuizName();
         TotalCorrect.Text = "Total Correct: " + quiz.getTotalCorrect();
         TotalWrong.Text = "Total Wrong: " + quiz.getTotalWrong();
         TotalUnanswered.Text = "Total Unanswered: " + (quiz.getQueAnsList().Count - (quiz.getTotalWrong() + quiz.getTotalCorrect()));
         QuizModel.clearInstance();
     }
     this.navigationHelper.OnNavigatedTo(e);
 }
Esempio n. 2
0
 /// <summary>
 /// Gets the Instance of the Quiz App-Template.
 /// </summary>
 /// <returns></returns>
 public static QuizModel getInstance()
 {
     if (mQuizModel == null)
         mQuizModel = new QuizModel();
     return mQuizModel;
 }