示例#1
0
        private void ChangeToNext()
        {
            if (string.IsNullOrWhiteSpace(TxtInput.Trim()))
            {
                Messenger.Default.Send("数字输入框不允许为空!");
                return;
            }
            Article[Index - 1].StrInput = TxtInput;
            Index++;

            TxtInput = string.Empty;
            if (Index == Exam.NI_F_CRITERIA + 1)
            {
                Messenger.Default.Send("您已经达到满分标准!");
            }
            if (Index >= Article.Count + 1)
            {
                foreach (var item in Article)
                {
                    if (item.StrOri.Equals(item.StrInput))
                    {
                        item.IsAllRight = true;
                    }
                }
                int rightAmount = Article.Where(x => x.IsAllRight == true).Count();
                Messenger.Default.Send("已经是最后一条了!");
                SaveScore();
                return;
            }
            TxtOri = Article[Index - 1].StrOri;
        }
        private void ChangeToNext()
        {
            if (string.IsNullOrWhiteSpace(TxtInput.Trim()))
            {
                Messenger.Default.Send("文本输入框不允许为空!");
                return;
            }
            Article[Index - 1].StrInput = TxtInput;
            Index++;

            TxtInput = string.Empty;
            if (Index >= Article.Count + 1)
            {
                Messenger.Default.Send("恭喜您已输入完毕所有内容!");
                SaveScore();
                return;
            }
            TxtOri = Article[Index - 1].StrOri;
        }