Beispiel #1
0
        public void ShowJudge()
        {
            mCurRT = mWatch.ElapsedMilliseconds;
            mRTs.Add(mCurRT);
            mRecorder.pracSymmRTs.Add(mCurRT);
            mPage.ClearAll();
            CompDualDetermine dualPad = new CompDualDetermine();

            dualPad.setButtonText("是", "否");
            //dualPad.setCorrectness(mSymmItems[mAt].IsSymm);
            dualPad.setResult("");
            dualPad.HideCorrecteness(true);
            dualPad.mConfirmMethod = confirmPressed;
            dualPad.mDenyMethod    = denyPressed;

            //dualPad.BorderThickness = new Thickness(1.0);
            mPage.mBaseCanvas.Children.Add(dualPad);
            Canvas.SetTop(dualPad, FEITStandard.PAGE_BEG_Y +
                          (FEITStandard.PAGE_HEIGHT - CompDualDetermine.OUTHEIGHT) / 2 + 65);
            Canvas.SetLeft(dualPad, FEITStandard.PAGE_BEG_X +
                           (FEITStandard.PAGE_WIDTH - CompDualDetermine.OUTWIDTH) / 2);

            CompCentralText ct = new CompCentralText();

            ct.PutTextToCentralScreen("是否对称", "KaiTi", 45,
                                      ref mPage.mBaseCanvas, 0, Color.FromRgb(255, 255, 255));
        }
        public void showAnswer()
        {
            mPage.ClearAll();

            mRDM = new Random();
            int falseAnswer       = -1;
            CompDualDetermine cdd = new CompDualDetermine();

            cdd.HideCorrecteness(true);

            if (mPage.mbFixedItemMode)
            {
                mShowAnswerzCorrectness = mEquations[mPosMark].Answer;
                cdd.setResult(mResult.ToString());
            }
            else
            {
                if (mRDM.Next(0, 2) == 0)
                {
                    mShowAnswerzCorrectness = false;
                    while ((falseAnswer = mRDM.Next(0, 100)) == mResult)
                    {
                        falseAnswer = mRDM.Next(0, 100);
                    }

                    cdd.setResult(falseAnswer.ToString());
                }
                else
                {
                    mShowAnswerzCorrectness = true;
                    cdd.setResult(mResult.ToString());
                }
            }

            cdd.mConfirmMethod = positiveChoiceMadeReaction;
            cdd.mDenyMethod    = negativeChoiceMadeReaction;

            mPage.mBaseCanvas.Children.Add(cdd);
            Canvas.SetTop(cdd, FEITStandard.PAGE_BEG_Y +
                          (FEITStandard.PAGE_HEIGHT - CompDualDetermine.OUTHEIGHT) / 2);
            Canvas.SetLeft(cdd, FEITStandard.PAGE_BEG_X +
                           (FEITStandard.PAGE_WIDTH - CompDualDetermine.OUTWIDTH) / 2);
        }
Beispiel #3
0
        public void showDualDeterPage()
        {
            Mouse.OverrideCursor = Cursors.Hand;
            //record
            mPage.mRecorder.symmOffTime.Add(mPage.mTimer.GetElapsedTime());

            mPage.ClearAll();
            CompDualDetermine dualPad = new CompDualDetermine();

            dualPad.setButtonText("是", "否");
            dualPad.setCorrectness(mContent[mGrpAt].Trails[mItemAt].IsSymm);
            dualPad.setResult("");
            dualPad.HideCorrecteness(true);
            dualPad.mConfirmMethod = DualDeterConfirmMethod;
            dualPad.mDenyMethod    = DualdeterDenyMethod;

            if (mPage.mMainWindow.mbEngiMode)
            {
                dualPad.BorderBrush = new SolidColorBrush(Color.FromRgb(50, 50, 50));
            }

            dualPad.BorderThickness = new Thickness(1.0);
            mPage.mBaseCanvas.Children.Add(dualPad);
            Canvas.SetTop(dualPad, FEITStandard.PAGE_BEG_Y +
                          (FEITStandard.PAGE_HEIGHT - CompDualDetermine.OUTHEIGHT) / 2 + 65);
            Canvas.SetLeft(dualPad, FEITStandard.PAGE_BEG_X +
                           (FEITStandard.PAGE_WIDTH - CompDualDetermine.OUTWIDTH) / 2);

            CompCentralText ct = new CompCentralText();

            ct.PutTextToCentralScreen("是否对称", "KaiTi", 45,
                                      ref mPage.mBaseCanvas, 0, Color.FromRgb(255, 255, 255));

            mfRoute = showBlackPageAndGo2Pos;

            //record
            mPage.mRecorder.choiceShownTime.Add(mPage.mTimer.GetElapsedTime());
        }
Beispiel #4
0
 public void setResult(string num)
 {
     mDualDeter.setResult(num);
 }