void SkeletonTracking_Loaded(object sender, RoutedEventArgs e) { medians = new Medians(); if (KinectSensor.KinectSensors.Count > 0) { sensor = KinectSensor.KinectSensors[0]; sensor.ColorStream.Enable(); sensor.ColorFrameReady += new EventHandler <ColorImageFrameReadyEventArgs>(sensor_ColorFrameReady); sensor.SkeletonFrameReady += new EventHandler <SkeletonFrameReadyEventArgs>(sensor_SkeletonFrameReady); sensor.SkeletonStream.Enable(); sensor.Start(); } else { MessageBox.Show("Kinect Device not found !!!"); } }
void SkeletonTracking_Loaded(object sender, RoutedEventArgs e) { medians = new Medians(); if (KinectSensor.KinectSensors.Count > 0) { sensor = KinectSensor.KinectSensors[0]; sensor.ColorStream.Enable(); sensor.ColorFrameReady += new EventHandler<ColorImageFrameReadyEventArgs>(sensor_ColorFrameReady); sensor.SkeletonFrameReady += new EventHandler<SkeletonFrameReadyEventArgs>(sensor_SkeletonFrameReady); sensor.SkeletonStream.Enable(); sensor.Start(); } else { MessageBox.Show("Kinect Device not found !!!"); } }