Ejemplo n.º 1
0
        private void testEnd()
        {
            //PCATDataSaveReport();
            mCountDown.Stop();
            new VCReportWriter(getOutputPath(), mResults, mItems);

            mOrganizer.EndPage();

            //quit timer
            Timer t = new Timer();

            t.Elapsed  += new ElapsedEventHandler(t_Elapsed);
            t.Interval  = 3000;
            t.AutoReset = false;
            t.Enabled   = true;
        }
Ejemplo n.º 2
0
        void setCountDownUITIck()
        {
            mCountDown.Stop();

            if (line_num_count > 0 && line_num_count <= 5)
            {
                mCountDown.Duration = 45;
            }
            else if (line_num_count > 5 && line_num_count <= 13)
            {
                mCountDown.Duration = 75;
            }
            else
            {
                mCountDown.Duration = 120;
            }

            if (!mBaseCanvas.Children.Contains(mCountDown))
            {
                mBaseCanvas.Children.Add(mCountDown);
            }

            Canvas.SetTop(mCountDown, FEITStandard.PAGE_BEG_Y + 550);
            Canvas.SetLeft(mCountDown, (SystemParameters.PrimaryScreenWidth - 300) / 2);

            mCountDown.Start();
        }
Ejemplo n.º 3
0
        private void next()
        {
            if (!mPage.mFreeze)
            {
                if (mWatch.IsRunning)
                {
                    mPage.mRTs.Add(mWatch.ElapsedMilliseconds);
                    mWatch.Stop();
                    mWatch.Reset();
                }

                mCountDown.Stop();
                mCountDown.Duration = 30;

                if (mtFlipper != null && mtFlipper.Enabled)
                {
                    mtFlipper.Enabled = false;
                }


                if (mCurAt == mSource.Count)
                {
                    mPage.next();
                }
                else
                {
                    show9CellsPad();
                    mCurAt++;
                }
            }
            else
            {
                mWatch.Stop();
            }
        }
Ejemplo n.º 4
0
        void _nextQuestion_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            if (e.LeftButton == MouseButtonState.Released && _IsOption)
            {
                _tip_display.Visibility = System.Windows.Visibility.Hidden;
                _tip_display.Content    = " ";
                //_flash_Display.Stop();
                //_t_Display.Stop();

                if (!_remember)
                {
                    _line_num++;
                    if (_line_num < mTestReader._TestList.Count / 2)
                    {
                        if (_line_num == mTestReader._TestList.Count / 2 - 1)
                        {
                            _nextQuestion.Content = "下 一 题";

                            lastQuestionLabel();

                            _remember = true;
                        }
                        //_t_Nest_Question.Stop();//自动翻页加
                        //_tip_display.Content = " ";
                        //_flash_Display.Stop();
                        //_t_Display.Stop();



                        _rtime.Stop();

                        optionAnswerRecord();

                        _NameAnswer = "";
                        _JobAnswer  = "";
                        _LikeAnswer = "";
                        _rtime.Reset();
                        mPortrailtMemoryTestControl.ClearLists();

                        mPortrailtMemoryTestControl.LayoutTestPage(mTestReader._TestList[_line_num]);

                        _tip_display.Visibility = System.Windows.Visibility.Hidden;

                        _nextQuestion.Visibility = System.Windows.Visibility.Hidden;

                        mPortrailtMemoryTestControl.HideComponent();


                        testBlankTime();

                        _time_blank.Start();
                    }
                }
                else if (_remember && _line_num == mTestReader._TestList.Count / 2 - 1)
                {
                    //_tip_display.Content = " ";
                    //_t_Nest_Question.Stop();//自动翻页加
                    _time_blank.Stop();

                    PortCanvas.Children.Remove(_tip_display);
                    PortCanvas.Children.Remove(mCountDown);
                    mCountDown.Stop();
                    //_flash_Display.Stop();
                    //_t_Display.Stop();


                    _rtime.Stop();

                    optionAnswerRecord();

                    _NameAnswer = "";
                    _JobAnswer  = "";
                    _LikeAnswer = "";
                    _rtime.Reset();
                    mPortrailtMemoryTestControl.ClearLists();
                    _tip_display.Visibility = System.Windows.Visibility.Hidden;

                    _nextQuestion.Visibility = System.Windows.Visibility.Hidden;
                    PortCanvas.Children.Remove(mPortrailtMemoryTestControl);
                    PortCanvas.Background = Brushes.Black;
                    _line_num++;
                    _promptlabel.Visibility = System.Windows.Visibility.Visible;

                    loadSecondPage();
                }
                else if (_remember && _line_num <= mTestReader._TestList.Count - 1 && colTestTwo == 0)
                {
                    _line_num++;

                    if (_line_num == mTestReader._TestList.Count - 1)
                    {
                        _nextQuestion.Content = "下 一 题";

                        lastQuestionLabel();

                        colTestTwo = -1;
                    }
                    //_t_Nest_Question.Stop();//自动翻页加
                    //_tip_display.Content = " ";
                    //_flash_Display.Stop();
                    //_t_Display.Stop();

                    _rtime.Stop();

                    optionAnswerRecord();
                    _NameAnswer = "";
                    _JobAnswer  = "";
                    _LikeAnswer = "";
                    _rtime.Reset();
                    mPortrailtMemoryTestControl.ClearLists();
                    mPortrailtMemoryTestControl.LayoutTestPage(mTestReader._TestList[_line_num]);

                    _tip_display.Visibility = System.Windows.Visibility.Hidden;

                    _nextQuestion.Visibility = System.Windows.Visibility.Hidden;

                    mPortrailtMemoryTestControl.HideComponent();


                    testBlankTime();

                    _time_blank.Start();
                }
                else if (_line_num == mTestReader._TestList.Count - 1 && colTestTwo == -1)
                {
                    //_tip_display.Content = " ";
                    //_t_Nest_Question.Stop();//自动翻页加
                    PortCanvas.Children.Remove(mCountDown);
                    mCountDown.Stop();

                    _time_blank.Stop();

                    //_flash_Display.Stop();
                    //_t_Display.Stop();

                    _rtime.Stop();

                    optionAnswerRecord();
                    _startButtomStep = 0;
                    clearAll();
                    PortCanvas.Background = Brushes.Black;
                    mTestResult           = new TestResult(mTestReader._ResultList, _answers, mMainWindow);
                    laodReport();
                }
            }

            _IsOption = false;
        }