Ejemplo n.º 1
0
        private static void Microsoft_Kinect_VisualGestureBuilder_TrackingIdLostEventArgs_Delegate_Handler(
            RootSystem.IntPtr result, RootSystem.IntPtr pNative)
        {
            List <RootSystem.EventHandler <TrackingIdLostEventArgs> > callbackList =
                null;

            Microsoft_Kinect_VisualGestureBuilder_TrackingIdLostEventArgs_Delegate_callbacks.TryGetValue(pNative,
                                                                                                         out callbackList);
            lock (callbackList)
            {
                var objThis = NativeObjectCache.GetObject <VisualGestureBuilderFrameSource>(pNative);
                var args    = new TrackingIdLostEventArgs(result);
                foreach (var func in callbackList)
                {
                    EventPump.Instance.Enqueue(() =>
                    {
                        try
                        {
                            func(objThis, args);
                        }
                        catch
                        {
                        }
                    });
                }
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Handles the TrackingIdLost event for the VisualGestureBuilderSource object
 /// </summary>
 /// <param name="sender">object sending the event</param>
 /// <param name="e">event arguments</param>
 private void Source_TrackingIdLost(object sender, TrackingIdLostEventArgs e)
 {
     // update the GestureResultView object to show the 'Not Tracked' image in the UI
     //this.GestureResultView.UpdateGestureResult(false, false, 0.0f);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Handles the TrackingIdLost event for the VisualGestureBuilderSource object
 /// </summary>
 /// <param name="sender">object sending the event</param>
 /// <param name="e">event arguments</param>
 private void Source_TrackingIdLost(object sender, TrackingIdLostEventArgs e)
 {
     // update the GestureResultView object to show the 'Not Tracked' image in the UI
     // this.GestureResultView.UpdateGestureResult(false, false, 0.0f);
     if (MainWindow.activeBody!=null)
     {
         if (MainWindow.activeBody.TrackingId == e.TrackingId)
         {
             MainWindow.SetActiveBody(null);
         }
     }
 }
        private void OnTrackingIdLost(object sender, TrackingIdLostEventArgs e)
        {
            _vgbFrameReader.IsPaused = true;
            _vgbFrameReader.Dispose();
            _vgbFrameReader = null;

            _vgbFrameSource.Dispose();
            _vgbFrameSource.Dispose();

            var tmpTrackingIdLost = TrackingIdLost;

            if (tmpTrackingIdLost != null)
                tmpTrackingIdLost(this, EventArgs.Empty);
        }
Ejemplo n.º 5
0
 private void Source_TackingiIdLost(object Sender,TrackingIdLostEventArgs e)
 {
     GestureResultView.UpdateGestureResult("",false, false, 0.0f);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Handles the TrackingIdLost event for the VisualGestureBuilderSource object
 /// </summary>
 /// <param name="sender">object sending the event</param>
 /// <param name="e">event arguments</param>
 private void Source_TrackingIdLost(object sender, TrackingIdLostEventArgs e)
 {
     if (this.OnGestureDetected != null)
     {
         this.OnGestureDetected(this, new GestureEventArgs(false, false, 0.0f));
     }
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Handles the TrackingIdLost event for the VisualGestureBuilderSource object
 /// </summary>
 /// <param name="sender">object sending the event</param>
 /// <param name="e">event arguments</param>
 private void Source_TrackingIdLost(object sender, TrackingIdLostEventArgs e)
 {
     // update the GestureResultView object to show the 'Not Tracked' image in the UI
 }