private void loadLessonsButton_Click(object sender, RoutedEventArgs e) { if (setsListbox.SelectedItems.Count > 0) { List <Lesson> selectedLessons = new List <Lesson>(); foreach (Lesson lesson in setsListbox.SelectedItems) { selectedLessons.Add(lesson); } ConjugationController.LoadLessons(selectedLessons); if (ConjugationData.Words.Count == 0) { MessageBox.Show(AppResources.NoWordsLeft); ConjugationController.Deinitialize(); return; } NavigationService.Navigate(new Uri("/Pages/PracticeConjugationPage.xaml", UriKind.Relative)); setsListbox.SelectedItems.Clear(); } else { MessageBox.Show("Keine Lektion ausgewählt!"); } }
public void RoundFinished() { if (MessageBox.Show(AppResources.Again, AppResources.RoundFinished, MessageBoxButton.OKCancel) == MessageBoxResult.OK) { ConjugationController.LoadLessons(); ConjugationController.GetNextWords(); } else { NavigationService.Navigate(new Uri("/Pages/SelectConjugationPage.xaml", UriKind.Relative)); NavigationService.RemoveBackEntry(); NavigationService.RemoveBackEntry(); } }