Пример #1
0
        public StartLearningWindow(Lesson lesson)
        {
            InitializeComponent();

            _lesson = lesson;

            Word word = _lesson.RetriveDrawnWord();

            _word            = word;
            drawnWord.Text   = word.Meaning;
            description.Text = StringHandler.RetrivAndHideWordInDescription(
                word.Foreign, word.Notes);
            _meaning = word.Foreign;
        }
Пример #2
0
        private void NextWord_Button(object sender, RoutedEventArgs e)
        {
            Word word = _lesson.RetriveDrawnWord();

            _word = word;
            if (word != null)
            {
                drawnWord.Text   = word.Meaning;
                description.Text = StringHandler.RetrivAndHideWordInDescription(
                    word.Foreign, word.Notes);
                _meaning = word.Foreign;
            }
            else
            {
                MessageBox.Show("The lesson was finished.");
                Close();
            }
            enteredWord.Text     = "";
            trueImg.Visibility   = Visibility.Collapsed;
            falseImg.Visibility  = Visibility.Collapsed;
            checkWord.Visibility = Visibility.Visible;
            nextWord.Visibility  = Visibility.Collapsed;
        }