void sensorManager_SensorDisconnected(KinectSensorManager obj) { if (SensorDisconnected != null) { SensorDisconnected.Invoke(); } destroySpeechEngine(); }
private void Manager_SensorDisconnected(KinectSensorManager obj) { lock (activeSensorLock) { if (activeSensor == obj) { if (SensorDisconnected != null) { SensorDisconnected.Invoke(this); } activeSensor = null; } } }
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); } } } }
private void DeviceDisconnectedHandler(object?sender, DeviceEventArgs args) { _devices.Remove(args.Device.DeviceId); SensorDisconnected?.Invoke(this, new EventArgs()); }