private void CleanSensor() { if (sensor != null) { sensor.Stop(); sensor = null; ct = null; } }
private void InitSensor() { if (sensor != null) { Program.Notify("Kinect sensor enabled"); sensor.Start(); sensor.SkeletonStream.Enable(); sensor.SkeletonFrameReady += sensor_SkeletonFrameReady; ct = new ContextTracker(); linearDetect.Clear(); } }