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 { } }); } } }
/// <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); }
/// <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); }
private void Source_TackingiIdLost(object Sender,TrackingIdLostEventArgs e) { GestureResultView.UpdateGestureResult("",false, false, 0.0f); }
/// <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)); } }
/// <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 }