Ejemplo n.º 1
1
        public bool NextWord(bool isRemember)
        {
            IsHiddenAnswer = true;
            if (CurrentWordPosition != -1)
            {
                CurrentWord.IsRemember = isRemember;
                if (isRemember)
                {
                    CurrentWord.RememberCount++;
                }
                else
                {
                    CurrentWord.NoRememberCount++;
                }
            }
            CurrentWordPosition++;
            if (CurrentWordPosition >= WordList.Count)
            {
                CurrentFileName = string.Empty;
                TopNoRememberList.Clear();
                var list = WordList.OrderBy(q => q.RememberRate).Take(5).ToList();
                foreach (var item in list)
                {
                    TopNoRememberList.Add(item);
                    UpdateLiveTileForText(item.Word, item.Mean, "正答率 = " + ((int)(item.RememberRate * 100)) + "%");
                }

                if (RecentlyFileList.Count > 5)
                {
                    RecentlyFileList.RemoveAt(RecentlyFileList.Count - 1);
                }
                RecentlyFileList.Insert(0, this.CurrentWordFile);

                var temp = new List <WordFile>(RecentlyFileList.OrderByDescending(q => q.LastLearnDate));
                RecentlyFileList.Clear();
                foreach (var item in temp)
                {
                    RecentlyFileList.Add(item);
                }


                IsStudying = false;
                return(false);
            }
            else
            {
                CurrentWord = WordList.ElementAt(CurrentWordPosition);

                return(true);
            }
        }
Ejemplo n.º 2
0
        public void checkNAdd(Word word)
        {
            Word word2BChanged = new Word();

            if (WordList.Contains(word))
            {
                WordList.ElementAt <Word>(WordList.IndexOf(word)).AdditionalInfo = word.AdditionalInfo;
                WordDaoImpl dao = new WordDaoImpl();
                dao.updateNote(word);
            }
        }