Ejemplo n.º 1
0
        /// <summary>
        /// Handles the GestureRecognized event of the g control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="KinectSkeltonTracker.GestureEventArgs"/> instance containing the event data.</param>
        private void OnGestureRecognized(object sender, GestureEventArgs e)
        {
            if (this.GestureRecognized != null)
            {
                this.GestureRecognized(this, e);
            }

            foreach (Gesture g in this.gestures)
            {
                g.Reset();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e">Gesture event arguments.</param>
        private void OnGestureRecognized(object sender, GestureEventArgs e)
        {
            switch (e.GestureName)
            {
                case "JoinedHands":
                    //KinectSwipeDetected = GestureTypes.JoinedHands;
                    break;
                case "SwipeLeft":
                    KinectGestureDetected = GestureTypes.RightSwipe;
                    break;
                case "SwipeRight":
                    KinectGestureDetected = GestureTypes.LeftSwipe;
                    break;
                case "SwipeUp":
                    //KinectSwipeDetected = GestureTypes.SwipeUp;
                    break;
                default:
                    break;
            }

            _clearTimer.Start();
        }