public AccentWordInfo(AccentWordInfo otherInfo)
 {
     id             = otherInfo.id;
     section        = otherInfo.section;
     word           = otherInfo.word;
     accentPosition = otherInfo.accentPosition;
 }
Exemple #2
0
 public void showNextWord()
 {
     if (_accentWords.Count > 0)
     {
         _currentWord = _accentWords.Dequeue();
         bool haveWordInVocabulary = _vocabulary.Contains(_currentWord);
         _window.showWord(_currentWord, haveWordInVocabulary);
     }
 }
Exemple #3
0
 private void reset(bool fullReset = false)
 {
     _window              = null;
     _currentWord         = null;
     _completedWordsCount = 0;
     _skippedWordsCount   = 0;
     if (fullReset)
     {
         _currentSection = 0;
         _accentWords.Clear();
         _mistakes.Clear();
     }
 }
Exemple #4
0
 public void showExerciseResults()
 {
     _currentWord = null;
     new ui.ExerciseResultWindow(getLocalizedNameForSection(_currentSection), _completedWordsCount, _mistakes.Count, _skippedWordsCount,
                                 () =>
     {
         finishExercise();
     },
                                 () =>
     {
         startMistakesCorrection();
     }).Show();
 }
Exemple #5
0
        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);
        }
Exemple #6
0
 public bool isWordInVocabulary(AccentWordInfo info)
 {
     return(_vocabulary.Contains(info));
 }
Exemple #7
0
 public void addWordToVocabulary(AccentWordInfo info)
 {
     _vocabulary.Add(info);
 }