コード例 #1
0
        protected override void Dispose(bool disposing)
        {
            base.Dispose();

            SaveSettings();

            if (_lightlyFilteredGazePointDataProvider != null)
            {
                _lightlyFilteredGazePointDataProvider.Next -= NewGazePoint;
                _lightlyFilteredGazePointDataProvider.Dispose();
            }

            if (_host != null)
            {
                _host.Dispose();
            }

            if (_controllerEmulation != null)
            {
                _controllerEmulation.OnModifyState -= OnModifyControllerState;
                _controllerEmulation.Dispose();
            }

            if (_gazeVisualization != null)
            {
                _gazeVisualization.Dispose();
            }

            if (_foregroundWindowWatcher != null)
            {
                _foregroundWindowWatcher.Dispose();
            }
        }
コード例 #2
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         EyeXHost.Dispose();
     }
     base.Dispose(disposing);
 }
コード例 #3
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (dispatcherTimer != null)
     {
         dispatcherTimer.Stop();
     }
     eyeXHost.Dispose();
     recorder.save();
 }
コード例 #4
0
 /* If unexpected closure of the window occurs we dispose the driver and draw the remaining points on the screenshot
  * of the current url; We need boolean variable 'terminateOnce' because the Fixation Data Stream is
  * still running which means that the method 'lightlyFilteredGazeDataStream_Next' is called every
  * n seconds but we only wish to daw the remaining points once.
  */
 public static void DisposeAll()
 {
     if (!terminateOnce)
     {
         terminateOnce = true;
         driver.Dispose();
         Task drawPoints = Task.Run(() => DrawRemainings());
         drawPoints.Wait();
         _eyeXhost.Dispose();
         Environment.Exit(0);
     }
 }
コード例 #5
0
        public void Terminate()
        {
            if (_useFixationStream)
            {
                _eyeXHost.CreateFixationDataStream(FixationDataMode.Slow).Next -= OnFixationPointNext;
            }
            else
            {
                _eyeXHost.CreateGazePointDataStream(GazePointDataMode.LightlyFiltered).Next -= OnGazePointNext;
            }

            _eyeXHost.Dispose();
        }
コード例 #6
0
ファイル: TobiiEyeXPlugin.cs プロジェクト: znsoft/FreePIE
        public override void Stop()
        {
            gazeDataStream.Next -= GazeDataStreamOnNext;
            eyeDataStream.Next  -= EyeDataStreamOnNext;
            gazeDataStream.Dispose();
            eyeDataStream.Dispose();

            host.DisplaySizeChanged             -= HostOnDisplaySizeChanged;
            host.UserProfileNameChanged         -= HostOnUserProfileNameChanged;
            host.EyeTrackingDeviceStatusChanged -= HostOnEyeTrackingDeviceStatusChanged;
            host.UserPresenceChanged            -= HostOnUserPresenceChanged;
            host.Dispose();
        }
コード例 #7
0
        public TobiiEyeXPointService()
        {
            EyeXHost = new EyeXHost();

            //Disconnect (deactivate) from the TET server on shutdown - otherwise the process can hang
            Application.Current.Exit += (sender, args) =>
            {
                if (EyeXHost != null)
                {
                    Log.Info("Disposing of the EyeXHost.");
                    EyeXHost.Dispose();
                }
            };
        }
コード例 #8
0
ファイル: Record.cs プロジェクト: oaugereau/TobiiDev
 internal void Dispose()
 {
     eyePosStream.Dispose();
     lightlyFilteredGazeDataStream.Dispose();
     eyeXHost.Dispose();
 }
コード例 #9
0
 public void Dispose()
 {
     gazeDataStream.Dispose();
     EyeXHost.Dispose();
 }
コード例 #10
0
 public void Dispose()
 {
     eyex.Dispose();
     //speechRecognizer.Dispose();
 }
コード例 #11
0
        private void ShutDown()
        {
            _shutDownRequestFlag = true;
            KeyDown -= OnKeyDown;
            Tick    -= OnTick;

            _shutDownRequestedEvent.WaitOne(100);
            Util.Log("Begin ShutDown");
            _settingsStorage.SaveSettings(_settings);

            //General
            RecordGameSessionEnded();

            if (_controlsProcessor != null)
            {
                _controlsProcessor.Dispose();
                _controlsProcessor = null;
            }

            //Window
            if (_foregroundWindowWatcher != null)
            {
                _foregroundWindowWatcher.Dispose();
                _foregroundWindowWatcher = null;
            }

            //Menu
            if (_settingsMenu != null)
            {
                _settingsMenu.ShutDownRequested -= SettingsMenuOnShutDownRequested;
                _settingsMenu = null;
            }

            //Gaze
            if (_lightlyFilteredGazePointDataProvider != null)
            {
                _lightlyFilteredGazePointDataProvider.Next -= NewGazePoint;
                _lightlyFilteredGazePointDataProvider.Dispose();
                _lightlyFilteredGazePointDataProvider = null;
            }

            if (_host != null)
            {
                _host.Dispose();
                _host = null;
            }

            //Features
            if (_aiming != null)
            {
                _aiming.Dispose();
                _aiming = null;
            }

            if (_freelook != null)
            {
                _freelook.Dispose();
                _freelook = null;
            }

            //Hids
            if (_controllerEmulation != null)
            {
                _controllerEmulation.Enabled = false;
                _controllerEmulation.RemoveHooks();
                _controllerEmulation = null;
            }
            Util.Log("End ShutDown");
        }
コード例 #12
0
 public void DisposeTobiiEyex()
 {
     eyexHost.Dispose();
 }
コード例 #13
0
 public void Close()
 {
     Host.Dispose();
 }
コード例 #14
0
 public void Closing()
 {
     EyeXHost.Dispose();
 }
コード例 #15
0
 public void Close_EyeTracker_Management()
 {
     lightlyFilteredGazeDataStream.Dispose();
     eyeXHost.Dispose();
 }
コード例 #16
0
 internal void close()
 {
     speechRecognizer.Dispose();
     eyex.Dispose();
 }
コード例 #17
0
 private void StopEyeStream()
 {
     _lightlyFilteredGazeDataStream.Dispose();
     _eyeXHost.Dispose();
 }
コード例 #18
0
 private void onExit(object s, EventArgs e)
 {
     tw.Close();
     host.Dispose();
 }
コード例 #19
0
ファイル: Gaze.cs プロジェクト: feugy/alfred
 /// <summary>
 /// Clean timer and EyeX engine
 /// </summary>
 override public void Dispose()
 {
     timer.Dispose();
     Engine.Dispose();
 }