private void RaiseSynchronizeDepthStreamActivation(object sender, SynchronizeDepthStreamActivationEventArgs e)
 {
     if (SynchronizeDepthStreamActivation != null)
     {
         SynchronizeDepthStreamActivation(sender, e);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Callback when the depth stream state of kinect sensor is modified in PropertiesKinect
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnSynchronizeDepthStream(object sender, SynchronizeDepthStreamActivationEventArgs e)
 {
     if (m_refKinectsensor != null)
     {
         if (PropertiesPluginKinect.Instance.KinectPointingModeEnabled ||
             PropertiesPluginKinect.Instance.EnableGestureGrip)
         {
             // Need the depth stream
             DebugLog.DebugTraceLog("Enable depth stream because Pointing mode or Grip is enabled", true);
             m_refKinectsensor.DepthStream.Enable(KINECT_DEFAULT_DEPTH_STREAM_FORMAT);
         }
         else
         {
             // Regular management
             if (e.Enable)
             {
                 DebugLog.DebugTraceLog("Enable depth stream because required by the Feedback", true);
                 m_refKinectsensor.DepthStream.Enable(KINECT_DEFAULT_DEPTH_STREAM_FORMAT);
             }
             else
             {
                 DebugLog.DebugTraceLog("DISABLE depth stream because NOT required by the Feedback", true);
                 m_refKinectsensor.DepthStream.Disable();
             }
         }
     }
 }