Пример #1
0
        public OrganizerTrailSS(PageSymmSpan _page, bool isPractise,
                                List <TrailsGroupSS> content, ref List <AnswerSSST> answer)
        {
            mContent   = content;
            mPage      = _page;
            mPractise  = isPractise;
            mCurAnswer = new AnswerSSST();

            if (mPractise)
            {
                mfRoute = showSymmPage;
            }
            else
            {
                mfRoute = showTitlePage;
            }

            mAnswer = answer;

            mOrderPage = new SubPageOrderSS(ref mPage, this);

            mCurSpanGroupsCount = getCurSpanGroupsCount();
        }
Пример #2
0
        public void groupIterate()
        {
            mGrpAt++;
            mItemAt                 = 0;
            mSymmCorrectCount       = 0;
            mSymmCorrectWarningMark = 0;
            mOrderCorrectCount      = 0;

            if (mCurSpanAt == mCurSpanGroupsCount - 1)//end of span
            {
                if (!mPractise)
                {
                    if (mOrderErrorACC > 1 && mGrpAt - 1 >= 4)
                    {
                        mbDead = true;
                    }
                    else if (mOrderErrorACC > 3 && mGrpAt - 1 < 4)
                    {
                        mbDead = true;
                    }

                    if ((((float)mSymmErrorACC /
                          (float)(mCurSpanGroupsCount * mPage.mTestGroupScheme[mGrpAt - 1])) > 0.2) &&
                        mGrpAt - 1 >= 4)
                    {
                        mbDead = true;
                    }
                }

                mCurSpanGroupsCount = getCurSpanGroupsCount();
                mOrderErrorACC      = 0;
                //mSymmErrorACC = 0;
                mCurSpanAt = 0;
            }
            else
            {
                mCurSpanAt++;
            }



            //length2 addtional 2 items
            if (mGrpAt == 2 && !mPractise)
            {
                /*int posErrCount = 0;
                 * for (int i = 0; i < mPage.mRecorder.posCorrectness.Count; i++)
                 * {
                 *  if (mPage.mRecorder.posCorrectness[i] == false)
                 *      posErrCount++;
                 * }*/

                /*int symmErrCount = 0;
                 * for (int j = 0; j < mRecorder.symmJudgeCorrectness.Count; j++)
                 * {
                 *  if (mRecorder.symmJudgeCorrectness[j] == false)
                 *      symmErrCount++;
                 * }*/

                if (mPage.mRecorder.posCorrectness[2] == true ||
                    mPage.mRecorder.posCorrectness[3] == true)//not gonna have extra
                {
                    mGrpAt += 2;
                    mCurSpanGroupsCount = getCurSpanGroupsCount();
                    mCurSpanAt          = 0;
                    mOrderErrorACC      = 0;
                    //mSymmErrorACC = 0;
                }
            }

            if (mGrpAt == mContent.Count && !mPractise)
            {
                mfRoute = testEnd;
            }
            else if (mGrpAt == mContent.Count && mPractise)
            {
                mfRoute = mPage.nextStep;
            }

            if (mbDead)
            {
                mfRoute = testEnd;
            }

            //new answer struct
            mAnswer.Add(mCurAnswer);
            mCurAnswer = new AnswerSSST();

            mOrderPage.mCheckComponent.reset();
        }