예제 #1
0
        public PageGraphicRecog(MainWindow _mainWindow)
        {
            InitializeComponent();
            mMainWindow = _mainWindow;

            itemFileAddr     = FEITStandard.BASE_FOLDER + TEST_FOLDER + "items.csv";
            learningFileAddr = FEITStandard.BASE_FOLDER + TEST_FOLDER + "instruct.csv";

            mLearnList  = GRFormReader.GetList(learningFileAddr, GRFormReader.SCRIPT_TYPE.LEARNING);
            mDoList     = GRFormReader.GetList(itemFileAddr, GRFormReader.SCRIPT_TYPE.TEST);
            mUserAnswer = new List <String>();

            mLayout = new LayoutGFR(this);

            mImageGroup =
                new UIImageGroup(saveUserSelection, Next);

            mLearnImage1 = new CompImage(0);
            mLearnImage2 = new CompImage(0);
            mTargetImage = new CompImage(0);

            mTimer = new FEITTimer();

            mDoubleArrow        = new Image();
            mDoubleArrow.Width  = 90;
            mDoubleArrow.Height = 31;
            System.Drawing.Bitmap bmp = FiveElementsIntTest.Properties.Resources.DOUBLE_ARROW;
            mDoubleArrow.Source = BitmapSourceFactory.GetBitmapSource(bmp, out mIntPtr);

            if (!mMainWindow.mDB.TableExists(Names.GRAPH_ASSO_TABLENAME))
            {
                mMainWindow.mDB.CreateGraphAssoTable(GRFormReader.TOTAL_ITEM);
            }
        }
예제 #2
0
        public TestRunner(String srcPath, MainWindow mw)
        {
            //folderWork();

            mMainWindow = mw;
            mSrcPath    = srcPath;

            mAnswers = new List <StAnswer>();

            mTimer = new FEITTimer();

            startItemFileSystem();
        }
예제 #3
0
        public PageSymmSpan(MainWindow _mainWindow)
        {
            InitializeComponent();
            mMainWindow        = _mainWindow;
            mLayoutInstruction = new LayoutInstruction(ref mBaseCanvas);
            mTestGroupScheme   = new int[] { 2, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8 };
            mPracGroupScheme   = new int[] { 2, 2 };

            interFilename    = "inter_" + mMainWindow.mDemography.GenBriefString() + ".txt";
            posFilename      = "pos_" + mMainWindow.mDemography.GenBriefString() + ".txt";
            pracPosFilename  = "prac_pos_" + mMainWindow.mDemography.GenBriefString() + ".txt";
            pracSymmFilename = "prac_symm_" + mMainWindow.mDemography.GenBriefString() + ".txt";

            LoaderSymmSpan    loader = new LoaderSymmSpan("SYMM\\sourceIndex.txt", "SYMM\\fixedItems.txt", "SYMM\\locationExe.txt", "SYMM\\fixedSymmExeBaseline.txt");
            List <TrailSS_ST> rList  = loader.GetResourceList();

            if (!mbFixedItems)
            {
                RandomSelector testRanSel = new RandomSelector(rList, mTestGroupScheme);
                mTest = testRanSel.Get();

                RandomSelector pracRanSel = new RandomSelector(rList, mPracGroupScheme);
                mPrac = pracRanSel.Get();
            }
            else
            {
                mTest         = loader.GetFixedItemGroups(mTestGroupScheme);
                mPrac         = loader.GetFixedComprehExe(mPracGroupScheme);
                mPracLocation = loader.GetFixedLocationExe();
                mPractiseSymm = loader.GetFixedSymmExe();
            }

            mGroupsAnswer = new List <AnswerSSST>();

            mStatus = StatusSS.main_title;//test could be from here

            mTimer = new FEITTimer();
            mTimer.Start();

            mRecorder = new RecorderSymSpan(this);

            /*if (!mMainWindow.mDB.TableExists(Names.SYMSPAN_POS_TABLENAME))
             * {
             *  mMainWindow.mDB.CreateSymSpanPosTable(mTestGroup.Length);
             * }
             *
             * if (!mMainWindow.mDB.TableExists(Names.SYMSPAN_SYMM_TABLENAME))
             * {
             *  mMainWindow.mDB.CreateSymSpanSymmTable(trails.Count);
             * }*/
        }
예제 #4
0
        public PageOpSpan(MainWindow mainWindow)
        {
            InitializeComponent();
            mMainWindow           = mainWindow;
            mGroupArrangement     = new int[] { 2, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8 };
            mGroupArrangementPrac = new int[] { 2, 2 };

            mLayoutInstruction = new LayoutInstruction(ref mBaseCanvas);

            mRecorder = new RecorderOpSpan(this);
            mTimer    = new FEITTimer();

            interFilename     = "inter_" + mMainWindow.mDemography.GenBriefString() + ".txt";
            orderFilename     = "order_" + mMainWindow.mDemography.GenBriefString() + ".txt";
            pracMathFilename  = "pracMath_" + mMainWindow.mDemography.GenBriefString() + ".txt";
            pracOrderFilename = "pracOrder_" + mMainWindow.mDemography.GenBriefString() + ".txt";
        }
예제 #5
0
        public PageVocabCommon(MainWindow _mainWindow, TestType type)
        {
            InitializeComponent();
            mMainWindow = _mainWindow;
            mTestType   = type;

            checkOutputFolder();

            mSelections = new List <CompSeniorWords>();
            mResults    = new StVCResult[40];
            prefillExtraItemzResult();
            mTimer = new FEITTimer();

            /*if (!mMainWindow.mDB.TableExists(Names.VOCAB_TABLENAME))
             * {
             *  mMainWindow.mDB.CreateVocabTable(SHEET_LENGTH);
             * }*/

            mCountDown                 = new CompCountDown();
            mCountDown.Duration        = 30;
            mCountDown.FunctionElapsed = nextBtnDownCore;
        }
예제 #6
0
        public PageCube(MainWindow _mainWindow)
        {
            InitializeComponent();
            mMainWindow = _mainWindow;
            this.Focus();
            mLayoutInstruction = new LayoutInstruction(ref mBaseCanvas);

            mLines = new List <List <string> >();//存放一套测试结果
            //   mLines.Capacity = line_num;
            resline = new List <string>();

            mTimer = new FEITTimer();
            rtime  = new Stopwatch();
            tf.Open();

            //set record location and file name
            file_Loca   = "Report\\CubeTest_result_file\\" + mMainWindow.mDemography.GenBriefString() + ".txt";
            mTabCharter = new TabCharter(file_Loca);//写入硬盘

            mCountDownUI = new CompCountDown();
            mCountDownUI.FunctionElapsed = goNextQuestion;
        }
예제 #7
0
        void begin_test_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) //开始测验按钮事件
        {
            ClearAll();                                                          //清除原来的控件
            mPaperReadFile = new PaperReadFile(this);

            mPaperWriteFile = new PaperWriteFile(this, mMainWindow);
            mPaperWriteFile.mLines_Head(mPaperReadFile.Surface);

            recede_pro();             //隐藏2道题

            mTimer = new FEITTimer(); //整体时间
            rtime  = new Stopwatch(); //每题时间

            mPaperReadFile.loadTableContent();

            mPaperTestControl = new PaperTestControl(mPaperReadFile.image_name, mPaperReadFile.item_num, line_num - 1, line_num_count, this);


            correct_ans = mPaperReadFile.line[mPaperReadFile.line.Count - 4];
            nextQuestionLabel();
            mBaseCanvas.Children.Add(mPaperTestControl);
            Canvas.SetLeft(mPaperTestControl, FEITStandard.PAGE_BEG_X - 45);
            Canvas.SetTop(mPaperTestControl, FEITStandard.PAGE_BEG_Y - 80);

            //startCompel();

            rtime.Start();
            mTimer.Start();

            tipDisplay();//提示代码 nov.12
            //Display_Timer();
            // t_Display.Stop();
            // flash_Time();
            //_flash_Display.Start();
            // t_Display.Start();

            setCountDownUITIck();
        }
예제 #8
0
        public PageITFigure(MainWindow _mainwindow)
        {
            InitializeComponent();
            mMainWindow = _mainwindow;
            PageCommon.InitCommonPageElements(ref amBaseCanvas);
            screenReady();
            mFlipper = new FEITCentralFlipper(ref amBaseCanvas, this);

            mItFreePrac    = new ITFFreePrac(this);
            mItPrac8       = new ITFPrac8(this);
            mItRealTest    = new ITFRealTest(this);
            mItInstruction = new ITFInstruction(this);

            mTimer = new FEITTimer();

            //undefined
            //mCurStage = ITF_STATES.STA_FREEPRAC;

            // if(mMainWindow.mDB.TableExists(Names.))

            this.Focus();
            nextStage();
        }
예제 #9
0
        public PageSybSrh(MainWindow mw)
        {
            InitializeComponent();
            mMainWindow = mw;
            mImages     = new List <CompImage>();
            mResult     = new List <SybSrhResult>();
            //mSpanResult = new List<SybSrhResult>();
            if (!mbFixedMode)
            {
                mGen = new SybSrhItemGenerator();
            }
            else
            {
                mFixedReader = new SybSrhFixedReader();
                getFixedDataReady();
            }

            mTimer      = new FEITTimer();
            mWasteIPtrs = null;

            if (DEV_MODE)
            {
                MAXTRAILCOUNT = 12;
            }

            m2Minute = new Stopwatch();

            /* if (mMainWindow.mDB != null)
             * {
             *   if (!mMainWindow.mDB.TableExists(Names.SYMBOL_SEARCH_TABLENAME))
             *   {
             *       mMainWindow.mDB.CreateSymbolSearchTable(mItems.Count);
             *   }
             * }*/

            Cursor = Cursors.None;
        }