/// <summary> /// It populates the next word question in the current view. /// </summary> /// <param name="sender">Object Sender is a parameter called Sender that contains a reference to the control/object that raised the event.</param> /// <param name="e">RoutedEventArgs e is a parameter called e that contains the event data, see the RoutedEventArgs MSDN page for more information.</param> private void Next_Click(object sender, RoutedEventArgs e) { if (puzzle.getActiveCount() + 1 == puzzle.getSpellingsList().Count) { Frame.Navigate(typeof(ScorePage)); } puzzle.setActiveCount(puzzle.getActiveCount() + 1); Frame.GoBack(); }
/// <summary> /// It populates the next question into the current view. /// </summary> /// <param name="sender">Object Sender is a parameter called Sender that contains a reference to the control/object that raised the event.</param> /// <param name="e">RoutedEventArgs e is a parameter called e that contains the event data, see the RoutedEventArgs MSDN page for more information.</param> private void Next_Click(object sender, RoutedEventArgs e) { if (puzzle.getActiveCount() == puzzle.getSpellingsList().Count - 1) { Frame.Navigate(typeof(ScorePage)); } puzzle.setActiveCount(puzzle.getActiveCount() + 1); PuzzleNumber.Text = "Word #" + (puzzle.getActiveCount() + 1) + " out of " + puzzle.getSpellingsList().Count; Next.IsEnabled = false; Spell.IsEnabled = false; }