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);
                }

                SaveOptions();

                FlashcardsController.LoadLessons(selectedLessons);

                if (FlashcardsData.ActiveKanjis.Count == 0)
                {
                    MessageBox.Show(AppResources.NoKanjisLeft);
                    FlashcardsController.Deinitialize();
                }
                else
                {
                    NavigationService.Navigate(new Uri("/Pages/PracticeFlashcardsPage.xaml", UriKind.Relative));
                }

                setsListbox.SelectedItems.Clear();
            }
            else
            {
                MessageBox.Show("Keine Lektion ausgewählt!");
            }
        }
Exemplo n.º 2
0
        public void RoundFinished()
        {
            if (MessageBox.Show(AppResources.Again, AppResources.RoundFinished, MessageBoxButton.OKCancel) == MessageBoxResult.OK)
            {
                FlashcardsController.LoadLessons();
            }
            else
            {
                NavigationService.Navigate(new Uri("/Pages/SelectFlashcardsPage.xaml", UriKind.Relative));

                NavigationService.RemoveBackEntry();
                NavigationService.RemoveBackEntry();
            }
        }