コード例 #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 <RepeatingWordInfo> prepareMaterial()
        {
            JObject config     = SharedLocator.getStaticInfo().getRepeatingExerciseConfig();
            JArray  wordsArray = (JArray)config[RepeatingWordInfo.KEY_CONTENTS];

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

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

            return(ret);
        }
コード例 #4
0
 public void addWordToVocabulary(RepeatingWordInfo info)
 {
     _vocabulary.Add(info);
 }