void sensorManager_SensorDisconnected(KinectSensorManager obj)
 {
     if (SensorDisconnected != null)
     {
         SensorDisconnected.Invoke();
     }
     destroySpeechEngine();
 }
Пример #2
0
 private void Manager_SensorDisconnected(KinectSensorManager obj)
 {
     lock (activeSensorLock)
     {
         if (activeSensor == obj)
         {
             if (SensorDisconnected != null)
             {
                 SensorDisconnected.Invoke(this);
             }
             activeSensor = null;
         }
     }
 }
Пример #3
0
        private void disconnectSensor()
        {
            if (activeSensor != null)
            {
                KinectSensor localSensor = activeSensor;
                activeSensor  = null;
                CurrentStatus = KinectStatus.Disconnected;
                localSensor.Stop();
                localSensor.Dispose();

                if (SensorDisconnected != null)
                {
                    SensorDisconnected.Invoke(this);
                }
            }
        }
        private void disconnectSensor()
        {
            lock (activeSensorLock)
            {
                if (activeSensor != null)
                {
                    activeSensor = null;
                    Connected    = false;

                    if (SensorDisconnected != null)
                    {
                        SensorDisconnected.Invoke(this);
                    }
                }
            }
        }
Пример #5
0
 private void DeviceDisconnectedHandler(object?sender, DeviceEventArgs args)
 {
     _devices.Remove(args.Device.DeviceId);
     SensorDisconnected?.Invoke(this, new EventArgs());
 }