示例#1
0
 public void showNextWord()
 {
     if (_workingQueue.Count > 0)
     {
         _currentWord = _workingQueue.Dequeue();
         bool haveWordInVocabulary = _vocabulary.Contains(_currentWord);
         _window.showWord(_currentWord, haveWordInVocabulary);
     }
 }
示例#2
0
 public void showExerciseResults()
 {
     _currentWord = null;
     new ExerciseResultWindow(getLocalizedNameForSection(_currentSection), _completedWordsCount, _mistakesQueue.Count, _skippedWordsCount,
                              () =>
     {
         finishExercise();
     },
                              () =>
     {
         startMistakesCorrection();
     }).Show();
 }
示例#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);
        }
示例#4
0
 public void addWordToVocabulary(VariantWordInfo info)
 {
     _vocabulary.Add(info);
 }