public void ConfgureViewModel() { _vocabs = _vocabularyParserService.GetRandomizedVocabDictionary(_chapterPath); _selGermanVocabGroup = GetGermanVocabGroup(_routine); _selEnglishVocabGroup = GetEnglishVocabGroup(_routine); this.OutputLabel = _selGermanVocabGroup.ToString(); this.StatsTotalVocabs = _vocabs.Count; }
private GermanVocabGroup GetGermanVocabGroup(string line) { var temp = line.Split("::".ToCharArray())[2]; // get right side of "::" var germanVocabs = temp.Split("/".ToCharArray()); GermanVocabGroup vocabGroup = new GermanVocabGroup(germanVocabs); return(vocabGroup as GermanVocabGroup); }
private async Task SelectNextVocabs() { _routine++; if (_routine >= _vocabs.Count) { await _pageService.DisplayAlert("Status", "You completed the quiz!", "ok"); await _navigatorService.PushWithParametersAsync <DisplayVocabsLVPageVM>(new NamedParameter("vocabs", _wrongVocabs)); } _selEnglishVocabGroup = this.GetEnglishVocabGroup(_routine); _selGermanVocabGroup = this.GetGermanVocabGroup(_routine); this.InputEntry = ""; this.StatsFinishedVocabs++; }
private GermanVocabGroup GetGermanVocabGroup(int elementAt) { GermanVocabGroup vocabGroup = _vocabs.ElementAt(elementAt).Value; return(vocabGroup); }