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