void MainWindow_Loaded(object sender, RoutedEventArgs e)
 {
     //连接kinect的参数 parameters for connecting the kinect
     Kinect20.DisplayVideoFrame    = true;//是否显示颜色视频背景 DisplayVideo
     Kinect20._receivepoints      += new receivePoints(Kinect20__receivepoints);
     Kinect20._receiveVideoSource += new PassVideoSource(Kinect20__receiveVideoSource);
     Kinect20._receiveGesture     += new PassGesture(Kinect20__receiveGesture);
     Kinect20.Start2Connect();//开始连接
 }
 void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     try
     {
         Kinect20.KinectClosing();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }