Beispiel #1
0
 public void showNextWord()
 {
     if (_workingQueue.Count > 0)
     {
         _currentWord = _workingQueue.Dequeue();
         bool haveWordInVocabulary = _vocabulary.Contains(_currentWord);
         _window.showWord(_currentWord, haveWordInVocabulary);
     }
 }
Beispiel #2
0
 public void showExerciseResults()
 {
     _currentWord = null;
     new ExerciseResultWindow(getLocalizedNameForSection(_currentSection), _completedWordsCount, _mistakesQueue.Count, _skippedWordsCount,
                              () =>
     {
         finishExercise();
     },
                              () =>
     {
         startMistakesCorrection();
     }).Show();
 }
Beispiel #3
0
        private List <SpellingWordInfo> prepareMaterial()
        {
            JObject config     = SharedLocator.getStaticInfo().getSpellingExerciseConfig();
            JArray  wordsArray = (JArray)config[SpellingWordInfo.KEY_CONTENTS];

            List <SpellingWordInfo> ret = new List <SpellingWordInfo>(wordsArray.Count);

            foreach (JObject obj in wordsArray)
            {
                SpellingWordInfo info = SpellingWordInfo.createFromDict(obj);
                if (!_sectionsList.ContainsKey(info.section))
                {
                    _sectionsList.Add(info.section, Properties.Strings.ResourceManager.GetString(string.Format(SPELLING_SECTION_NAME_TEMPLATE, info.section)));
                }
                ret.Add(info);
            }

            return(ret);
        }
Beispiel #4
0
 public void addWordToVocabulary(SpellingWordInfo info)
 {
     _vocabulary.Add(info);
 }