Exemplo n.º 1
0
        public void Dispose()
        {
            if (skeletonDisplayManager != null)
            {
                skeletonDisplayManager = null;
            }
            if (colorManager != null)
            {
                colorManager = null;
            }
            if (depthManager != null)
            {
                depthManager = null;
            }

            if (speechRecognizer != null)
            {
                speechRecognizer.SpeechRecognized -= Speech_Recognized;
                speechRecognizer.Dispose();
                speechRecognizer = null;
            }
            
            if (gestureRecognizer != null)
            {
                gestureRecognizer.GestureRecognzied -= Gesture_Recognzied;
                gestureRecognizer.Dispose();
                gestureRecognizer = null;
            }

            if (kinectSensor != null)
            {
                kinectSensor.ColorFrameReady -= kinectRuntime_ColorFrameReady;
                kinectSensor.SkeletonFrameReady -= kinectRuntime_SkeletonFrameReady;
                kinectSensor.ColorFrameReady -= kinectRuntime_ColorFrameReady;
                kinectSensor.Stop();
                kinectSensor = null;
            }
        }
Exemplo n.º 2
0
 public void LoadGestureRecognizer()
 {
     gestureRecognizer = new GestureRecognizer();
     gestureRecognizer.GestureRecognzied += Gesture_Recognzied;
 }
Exemplo n.º 3
0
 public void LoadGestureRecognizer()
 {
     gestureRecognizer = new GestureRecognizer();
     gestureRecognizer.GestureRecognzied += Gesture_Recognzied;
 }