Beispiel #1
0
 public void KinectSensorColorFrameReady(Object Sender, ColorImageFrameReadyEventArgs e)
 {
     try
     {
         using (ColorImageFrame imageFrame = e.OpenColorImageFrame())
         {
             KServerPaquet sp = new KServerColorStreamPaquet(imageFrame, getIdSensor(sensor));
             sp.send(ns);
         }
     }
     catch (Exception exc)
     {
         System.Console.WriteLine("event ColorFrameReady disconnected : " + exc.Message);
         sensor.ColorFrameReady -= KinectSensorColorFrameReady;
     }
 }
 public void KinectSensorColorFrameReady(Object Sender, ColorImageFrameReadyEventArgs e)
 {
     try
     {
         using (ColorImageFrame imageFrame = e.OpenColorImageFrame())
         {
             KServerPaquet sp = new KServerColorStreamPaquet(imageFrame, getIdSensor(sensor));
             sp.send(ns);
         }
     }
     catch (Exception exc)
     {
         System.Console.WriteLine("event ColorFrameReady disconnected : " + exc.Message);
         sensor.ColorFrameReady -= KinectSensorColorFrameReady;
     }
 }