private void LoadPronunQuest()
        {
            actualQuest = QuestControl.GetRandomAvailableQuestion(Model.Pron, passedQuestIds);

            while (cb_justTH.IsChecked.Value &&
                   (!(actualQuest as PronVM).Phonemes.Contains("θ") && !(actualQuest as PronVM).Phonemes.Contains("ð")))
            {
                actualQuest = QuestControl.GetRandomAvailableQuestion(Model.Pron, passedQuestIds);
            }

            lblWord.Content     = actualQuest.Text;
            lblPhonemes.Content = (actualQuest as PronVM).Phonemes;

            FileHtmlControls.PlayPronunciation(actualQuest.Text);
            passedQuestIds.Add(actualQuest.Id);
        }
 private void BtnListenAgain_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     FileHtmlControls.PlayPronunciation(actualQuest.Text);
 }
        private static Control CreateSentence(ChalLine line, StackPanel parent, Microsoft.Office.Interop.Word.Application wordApp)
        {
            var ctrl = new Control();

            string sentence = Sentences.GetSentenceToQuestion(line.Quest);

            var invalid_synonyms = GetInvalidSynonyms(line.Quest);

            //Console.WriteLine(sentence);

            var found = false;

            foreach (var word in sentence.SplitSentence())
            {
                if (found)
                {
                    CreateDefaultLabel(line, parent, word);
                    continue;
                }

                if (line.Quest.Type == Model.Voc)
                {
                    string answer = (line.Quest as VocVM).Answer;
                    var    answers_compatibility = Sentences.GetCompatibleWord(answer, word);

                    if (answers_compatibility.Length > 0)
                    {
                        ctrl = new ComboChallenge();
                        MyCbBxs.BuildSynonyms(answers_compatibility, invalid_synonyms, ctrl as ComboChallenge,
                                              parent, char.IsUpper(word[1]), wordApp);
                        found = true;
                    }
                    else
                    {
                        CreateDefaultLabel(line, parent, word);
                    }
                }
                else if (line.Quest.Type == Model.Spell)
                {
                    string text = (line.Quest as SpellVM).Text;


                    if (word.ContainsInsensitive(text))
                    {
                        ctrl = new TextBox();
                        ctrl.VerticalContentAlignment = VerticalAlignment.Center;
                        ctrl.Margin = new Thickness(1, 0, 1, 0);
                        ctrl.Width  = text.Length * 5 + 26;

                        ctrl.GotFocus += (source, e) => FileHtmlControls.PlayPronunciation(text, ctrl);
                        ctrl.KeyDown  += (source, e) =>
                        {
                            if (e.Key == System.Windows.Input.Key.Enter && line.Quest.Type == Model.Spell)
                            {
                                FileHtmlControls.PlayPronunciation(text, ctrl);
                            }
                        };

                        if (!text.EqualsNoCase(word))
                        {
                            //Console.WriteLine("answer was " + text);
                            var dif = word.ReplaceIgnoreCase(text, "");
                            (ctrl as TextBox).Text = dif;
                        }

                        parent.Children.Add(ctrl);
                        found = true;
                    }
                    else
                    {
                        CreateDefaultLabel(line, parent, word);
                    }
                }
            }

            return(ctrl);
        }