public AccentWordInfo(AccentWordInfo otherInfo) { id = otherInfo.id; section = otherInfo.section; word = otherInfo.word; accentPosition = otherInfo.accentPosition; }
public void showNextWord() { if (_accentWords.Count > 0) { _currentWord = _accentWords.Dequeue(); bool haveWordInVocabulary = _vocabulary.Contains(_currentWord); _window.showWord(_currentWord, haveWordInVocabulary); } }
private void reset(bool fullReset = false) { _window = null; _currentWord = null; _completedWordsCount = 0; _skippedWordsCount = 0; if (fullReset) { _currentSection = 0; _accentWords.Clear(); _mistakes.Clear(); } }
public void showExerciseResults() { _currentWord = null; new ui.ExerciseResultWindow(getLocalizedNameForSection(_currentSection), _completedWordsCount, _mistakes.Count, _skippedWordsCount, () => { finishExercise(); }, () => { startMistakesCorrection(); }).Show(); }
public List <AccentWordInfo> prepareMaterial() { List <AccentWordInfo> ret = new List <AccentWordInfo>(); JObject config = SharedLocator.getStaticInfo().getAccentsExerciseConfig(); JArray wordsArray = (JArray)config[KEY_CONTENTS]; ret.Capacity = wordsArray.Count; foreach (JObject obj in wordsArray) { AccentWordInfo wordInfo = new AccentWordInfo(obj); ret.Add(wordInfo); if (!_sectionsList.ContainsKey(wordInfo.section)) { _sectionsList.Add(wordInfo.section, Properties.Strings.ResourceManager.GetString(string.Format(ACCENTS_SECTION_NAME_TEMPLATE, wordInfo.section))); } } _sectionsList.Add(Constants.EXERCISE_SECTION_EVERYTHING, Properties.Strings.section_name_shuffle); return(ret); }
public bool isWordInVocabulary(AccentWordInfo info) { return(_vocabulary.Contains(info)); }
public void addWordToVocabulary(AccentWordInfo info) { _vocabulary.Add(info); }