Exemplo n.º 1
0
        public async Task Check(bool toNext)
        {
            if (!IsTestMode)
            {
                var b = true;
                if (Options.Mode == ReviewMode.ReviewManual && !WordInputString.IsEmpty() && WordInputString != CurrentWord)
                {
                    b = false;
                    IncorrectVisible = true;
                }
                if (b)
                {
                    Move(toNext);
                    await DoTest();
                }
            }
            else if (!CorrectVisible && !IncorrectVisible)
            {
                WordInputString   = vmSettings.AutoCorrectInput(WordInputString);
                WordTargetVisible = true;
                NoteTargetVisible = true;
                if (WordInputString == CurrentWord)
                {
                    CorrectVisible = true;
                }
                else
                {
                    IncorrectVisible = true;
                }
                WordHintVisible = false;
                CheckNextString = "Next";
                CheckPrevString = "Next";
                if (!HasCurrent)
                {
                    return;
                }
                var o         = CurrentItem;
                var isCorrect = o.WORD == WordInputString;
                if (isCorrect)
                {
                    CorrectIDs.Add(o.ID);
                }
                var o2 = await wordFamiDS.Update(o.WORDID, isCorrect);

                o.CORRECT      = o2.CORRECT;
                o.TOTAL        = o2.TOTAL;
                AccuracyString = o.ACCURACY;
            }
            else
            {
                Move(toNext);
                await DoTest();

                CheckNextString = "Check";
                CheckPrevString = "Check";
            }
        }
Exemplo n.º 2
0
 public void Check(bool toNext)
 {
     if (!IsTestMode)
     {
         var b = true;
         if (Options.Mode == ReviewMode.ReviewManual && !PhraseInputString.IsEmpty() && PhraseInputString != CurrentPhrase)
         {
             b = false;
             IncorrectVisible = true;
         }
         if (b)
         {
             Move(toNext);
             DoTest();
         }
     }
     else if (!CorrectVisible && !IncorrectVisible)
     {
         PhraseInputString   = vmSettings.AutoCorrectInput(PhraseInputString);
         PhraseTargetVisible = true;
         if (PhraseInputString == CurrentPhrase)
         {
             CorrectVisible = true;
         }
         else
         {
             IncorrectVisible = true;
         }
         CheckNextString = "Next";
         CheckPrevString = "Next";
         if (!HasCurrent)
         {
             return;
         }
         var o         = CurrentItem;
         var isCorrect = o.PHRASE == PhraseInputString;
         if (isCorrect)
         {
             CorrectIDs.Add(o.ID);
         }
     }
     else
     {
         Move(toNext);
         DoTest();
         CheckNextString = "Check";
         CheckPrevString = "Check";
     }
 }