public void LoadDepthManager(Image depthDisplay) { depthManager = new DepthStreamManager(); depthDisplay.DataContext = depthManager; }
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; } }