private void nextButton_Click(object sender, RoutedEventArgs e)
        {
            okButton.Visibility        = System.Windows.Visibility.Visible;
            clearButton.Visibility     = System.Windows.Visibility.Visible;
            backspaceButton.Visibility = System.Windows.Visibility.Visible;

            nextButton.Visibility = System.Windows.Visibility.Collapsed;

            CombineWordsController.GetNext(combineButtonsGrid.Children.Count);

            foreach (Button b in selectedButtons)
            {
                b.Background = normalBrush;
            }

            foreach (Button b in correctButtons)
            {
                b.Background = normalBrush;
            }

            selectedButtons.Clear();
            correctButtons.Clear();

            showAnswer = false;

            UpdateView();
        }
        private void okButton_Click(object sender, RoutedEventArgs e)
        {
            okButton.Visibility        = System.Windows.Visibility.Collapsed;
            clearButton.Visibility     = System.Windows.Visibility.Collapsed;
            backspaceButton.Visibility = System.Windows.Visibility.Collapsed;

            nextButton.Visibility = System.Windows.Visibility.Visible;

            CombineWordsController.CheckAnswer(targetWordTextbox.Text);

            showAnswer = true;

            UpdateView();
        }
        public PracticeCombinePage()
        {
            InitializeComponent();

            CombineWordsController.GetNext(combineButtonsGrid.Children.Count);

            normalBrush        = new SolidColorBrush(Colors.White);
            selectedBrush      = new SolidColorBrush(Color.FromArgb(0xff, 0x33, 0x66, 0xcc));
            correctBrush       = new SolidColorBrush(Color.FromArgb(0xff, 0x55, 0xcc, 0x77));
            correctAnswerBrush = new SolidColorBrush(Color.FromArgb(0xff, 0x77, 0xff, 0xaa));
            wrongBrush         = new SolidColorBrush(Color.FromArgb(0xff, 0xdd, 0x55, 0x33));

            UpdateView();
        }
Ejemplo n.º 4
0
        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);
                }

                CombineWordsController.LoadLessons(selectedLessons);

                NavigationService.Navigate(new Uri("/Pages/PracticeCombinePage.xaml", UriKind.Relative));

                setsListbox.SelectedItems.Clear();
            }
            else
            {
                MessageBox.Show("Keine Lektion ausgewählt!");
            }
        }