Esempio n. 1
0
        public MainWindow(string objectiveCriteria, string coderName)
        {
            InitializeComponent();

            mVideoPlayer = new VideoPlayer(VideoPlayerHolder);
            mObjectiveCriteria = new ObjectiveCriteria(ObjectiveCriteriaHolder, objectiveCriteria);
            mJoystickAnnotate = new JoystickAnnotate(GamePadAnnotationHolder);
            mLogging = new Logging(LoggingDetailsHolder, objectiveCriteria, coderName);
            mLevelChange = new LevelChange(LevelChangeHolder);
            mState = APPSTATE.NONE;


            mTimer = new DispatcherTimer();
            mTimer.Interval = TimeSpan.FromMilliseconds(200);
            mTimer.Tick += new EventHandler(TimerTick);
            mTimer.Start();

            mPausableLoggingTimer = new System.Timers.Timer();
            mPausableLoggingTimer.Elapsed += new ElapsedEventHandler(LogInterval);
            mPausableLoggingTimer.Interval = 200;
            mPausableLoggingTimer.Enabled = false;

            mStartupCheckTimer = new DispatcherTimer();
            mStartupCheckTimer.Interval = TimeSpan.FromMilliseconds(250);
            mStartupCheckTimer.Tick += new EventHandler(mStartupCheckTimerTick);
            mStartupCheckTimer.Start();

            mJoystickTickTimer = new DispatcherTimer();
            mJoystickTickTimer.Interval = TimeSpan.FromMilliseconds(10);
            mJoystickTickTimer.Tick += new EventHandler(JoystickTick);
            mJoystickTickTimer.Start();
        }
        public MainWindow(string objectiveCriteria, string coderName)
        {
            InitializeComponent();

            mVideoPlayer       = new VideoPlayer(VideoPlayerHolder);
            mObjectiveCriteria = new ObjectiveCriteria(ObjectiveCriteriaHolder, objectiveCriteria);
            mJoystickAnnotate  = new JoystickAnnotate(GamePadAnnotationHolder);
            mLogging           = new Logging(LoggingDetailsHolder, objectiveCriteria, coderName);
            mLevelChange       = new LevelChange(LevelChangeHolder);
            mState             = APPSTATE.NONE;


            mTimer          = new DispatcherTimer();
            mTimer.Interval = TimeSpan.FromMilliseconds(200);
            mTimer.Tick    += new EventHandler(TimerTick);
            mTimer.Start();

            mPausableLoggingTimer          = new System.Timers.Timer();
            mPausableLoggingTimer.Elapsed += new ElapsedEventHandler(LogInterval);
            mPausableLoggingTimer.Interval = 200;
            mPausableLoggingTimer.Enabled  = false;

            mStartupCheckTimer          = new DispatcherTimer();
            mStartupCheckTimer.Interval = TimeSpan.FromMilliseconds(250);
            mStartupCheckTimer.Tick    += new EventHandler(mStartupCheckTimerTick);
            mStartupCheckTimer.Start();

            mJoystickTickTimer          = new DispatcherTimer();
            mJoystickTickTimer.Interval = TimeSpan.FromMilliseconds(10);
            mJoystickTickTimer.Tick    += new EventHandler(JoystickTick);
            mJoystickTickTimer.Start();
        }