示例#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
        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();
        }
        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
 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");
        }
 public void DisposeTobiiEyex()
 {
     eyexHost.Dispose();
 }
示例#13
0
 public void Close()
 {
     Host.Dispose();
 }
示例#14
0
 public void Closing()
 {
     EyeXHost.Dispose();
 }
 public void Close_EyeTracker_Management()
 {
     lightlyFilteredGazeDataStream.Dispose();
     eyeXHost.Dispose();
 }
示例#16
0
 internal void close()
 {
     speechRecognizer.Dispose();
     eyex.Dispose();
 }
 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();
 }