Exemplo n.º 1
0
        void t_mask_Elapsed(object sender, ElapsedEventArgs e)
        {
            switch (mBasePage.mStage)
            {
            case Stage.InterPrac:
                //iter & go out
                mBasePage.DoCursorIteration();
                if (mBasePage.mCurInGrpAt != mBasePage.mInterPrac.Count)
                {
                    mBasePage.Dispatcher.Invoke(new TimeDele(mBasePage.ShowEquationPage));
                }
                else
                {
                    //go to compreh practise
                    mBasePage.Dispatcher.Invoke(new TimeDele(mBasePage.ShowInstructionComprehPrac));
                }
                break;

            case Stage.ComprehPrac:
                if (mBasePage.SchemeReturned())    //end of span && end of scheme
                {
                    //go to order UI
                    mBasePage.Dispatcher.Invoke(new TimeDele(mBasePage.ShowOrderSelectPage));
                }
                else
                {
                    //go to next animal
                    mBasePage.Dispatcher.Invoke(new TimeDele(mBasePage.ShowBoardAnimal));
                }
                break;

            case Stage.Formal:
                if (mBasePage.SchemeReturned() || mBasePage.SchemeIterated())    //end of span || end of scheme
                {
                    //go to order UI
                    mBasePage.Dispatcher.Invoke(new TimeDele(mBasePage.ShowOrderSelectPage));
                }
                else
                {
                    //go to next animal
                    mBasePage.Dispatcher.Invoke(new TimeDele(mBasePage.ShowBoardAnimal));
                }
                break;
            }
        }
Exemplo n.º 2
0
        private void formalGoOut(int schemeID2Check, string userOrder, long offtime)
        {
            mBasePage.ResetSchemeIterationStatus();
            saveComprehForamlOutTime(offtime);
            string realOrder = mBasePage.GetFormalAnimalRealOrder(schemeID2Check);

            mBasePage.mRecorder.rightOrder.Add(realOrder);
            mBasePage.mRecorder.userInputOrder.Add(userOrder);
            mBasePage.mRecorder.isExtraG.Add(mIsExtra);
            mBasePage.mRecorder.isPractiseG.Add(false);

            if (mBasePage.IfGroupPassed(getSchemeID2Check(), BasePage.mTestScheme))
            {
                if (!mIsExtra || mBasePage.mCurSchemeAt == 2)
                {
                    if (getSchemeID2Check() != BasePage.mTestScheme.Length - 2)//not the last span
                    {
                        fillJumpedAllOK(mBasePage.mCurSchemeAt);
                        mBasePage.mCurSchemeAt++;//jump

                        if (mBasePage.mCurSchemeAt == 2)
                        {
                            fillJumpedAllOK(mBasePage.mCurSchemeAt);
                            mBasePage.mCurSchemeAt++;//jump over 222
                        }

                        mBasePage.ShowGroupTitle();
                    }
                    else//is last span and pass
                    {
                        //finish
                        mBasePage.mSecondFormal = false;
                        mBasePage.ShowFinishPage(mBasePage);
                    }
                }
                else//is extra
                {
                    if (!mBasePage.SchemeReturned())
                    {
                        mBasePage.ShowGroupTitle();
                    }
                    else
                    {
                        //finish
                        mBasePage.mSecondFormal = false;
                        mBasePage.ShowFinishPage(mBasePage);
                    }
                }

                mBasePage.mSecondFormal = false;
            }
            else//not pass
            {
                if (!mIsExtra)//one more chance
                {
                    mBasePage.mSecondFormal = true;
                    mBasePage.ShowGroupTitle();
                }
                else
                {
                    if (mBasePage.mCurSchemeAt != 2)
                    {
                        //output, save,
                        //quit
                        mBasePage.mSecondFormal = false;
                        mBasePage.ShowFinishPage(mBasePage);
                    }
                    else//==2
                    {
                        //one more chance
                        mBasePage.mSecondFormal = true;
                        mBasePage.ShowGroupTitle();
                    }
                }
            }
        }