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 <VariantWordInfo> prepareMaterial()
        {
            JObject config     = SharedLocator.getStaticInfo().getVariantExerciseConfig();
            JArray  wordsArray = (JArray)config[VariantWordInfo.KEY_CONTENTS];

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

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

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