The gesture event arguments.
Inheritance: System.EventArgs
Exemplo n.º 1
0
        void GestureController_GestureRecognized(object sender, GestureEventArgs e)
        {
            // Display the gesture type.
            tblGestures.Text = e.Name;

            // Do something according to the type of the gesture.
            switch (e.Type)
            {
                case GestureType.JoinedHands:
                    break;
                case GestureType.Menu:
                    break;
                case GestureType.SwipeDown:
                    break;
                case GestureType.SwipeLeft:
                    break;
                case GestureType.SwipeRight:
                    break;
                case GestureType.SwipeUp:
                    break;
                case GestureType.WaveLeft:
                    break;
                case GestureType.WaveRight:
                    break;
                case GestureType.ZoomIn:
                    break;
                case GestureType.ZoomOut:
                    break;
                default:
                    break;
            }
        }
        void GestureController_GestureRecognized(object sender, GestureEventArgs e)
        {
            MyHttpClient request = new MyHttpClient();

            //Do something according to the type of the gesture.
            switch (e.GestureType)
            {

                case GestureType.JoinedHands:
                    Console.WriteLine("JH");
                    request.send_request("/takeoff");
                    Console.WriteLine("Aaye aaye! Captain.");
                    break;
                case GestureType.Menu:
                    Console.WriteLine("Menu");
                    break;
                case GestureType.SwipeDown:
                    Console.WriteLine("SD");
                    break;
                case GestureType.SwipeLeft:
                    Console.WriteLine("Sl");
                    request.send_request("/left");
                    Console.WriteLine("We are going left");
                    break;
                case GestureType.SwipeRight:
                    Console.WriteLine("SR");
                    request.send_request("/right");
                    Console.WriteLine("Idhar chala mai udhar chala (right :P)");
                    break;
                case GestureType.SwipeUp:
                    Console.WriteLine("SU");
                    request.send_request("/up");
                    Console.WriteLine("Stay High All The Time!");
                    break;
                case GestureType.WaveLeft:
                    Console.WriteLine("WL");
                    request.send_request("/dance");
                    Console.WriteLine("Sunn raha hai na tu, Naach raha hun mein");
                    break;
                case GestureType.WaveRight:
                    Console.WriteLine("WR");
                    request.send_request("/land");
                    Console.WriteLine("Au Revoir");
                    break;
                case GestureType.ZoomIn:
                    Console.WriteLine("ZI");
                    request.send_request("/forward");
                    Console.WriteLine("Winter is Coming!");
                    break;
                case GestureType.ZoomOut:
                    Console.WriteLine("ZO");
                    request.send_request("/back");
                    Console.WriteLine("You know nothing Jon Snow.");
                    break;
                default:
                    e.
                    break;
            }
        }
Exemplo n.º 3
0
 void GestureController_GestureRecognized(object sender, GestureEventArgs e)
 {
     // Display the gesture type.
     tblGestures.Text = "Ok";
 }
        void GestureRecognized(object sender, GestureEventArgs e)
        {
            Console.WriteLine("entered gesture recognized");
            Console.WriteLine(e.Name);
            var gesture = e.Type;

            switch (gesture)
            {
                case (GestureType.JoinedHands): break;
                case (GestureType.Menu): break;
                case (GestureType.SwipeDown): break;
                case (GestureType.SwipeLeft): break;
                case (GestureType.SwipeRight): break;
                case (GestureType.SwipeUp): break;
                case (GestureType.WaveLeft): break;
                case (GestureType.WaveRight): break;
                case (GestureType.ZoomIn): break;
                case (GestureType.ZoomOut): break;
            }
        }
Exemplo n.º 5
0
 void GestureController_GestureRecognized(object sender, GestureEventArgs e)
 {
     tblGestures.Text = e.GestureType.ToString();
 }
Exemplo n.º 6
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 (GestureRecognized != null)
            {
                GestureRecognized(this, e);
            }

            foreach (Gesture gesture in _gestures)
            {
                gesture.Reset();
            }
        }
        void GestureController_GestureRecognized(object sender, GestureEventArgs e)
        {
            MyHttpClient request = new MyHttpClient();
            tblGestures.Text = e.GestureType.ToString();
            switch (e.GestureType)
            {

                case GestureType.JoinedHands:
                    //Debug.WriteLine("JH");
                    request.send_request("/dance");
                    Debug.WriteLine("Dance");
                    break;
                case GestureType.Menu:
                    Debug.WriteLine("Menu");
                    break;
                case GestureType.SwipeDown:
                    Debug.WriteLine("SD");
                    break;
                case GestureType.SwipeLeft:
                    Debug.WriteLine("Swipe Left!");
                    request.send_request("/left");
                    break;
                case GestureType.SwipeRight:
                    Debug.WriteLine("Swipe Right!");
                    request.send_request("/right");
                    //Debug.WriteLine("Going Right!");
                    break;
                case GestureType.SwipeUp:
                    Debug.WriteLine("Swipe Up!");
                    request.send_request("/up");
                    //Debug.WriteLine("Stay High All The Time!");
                    break;
                case GestureType.WaveLeft:
                    Debug.WriteLine("Wave Left!");
                    request.send_request("/animateLEDs");
                    break;
                case GestureType.WaveRight:
                    Debug.WriteLine("Going Down!");
                    request.send_request("/land");
                    //Debug.WriteLine("Au Revoir");
                    isRunning = false;
                    break;
                case GestureType.ZoomIn:
                    Debug.WriteLine("Zoom In");
                    request.send_request("/forward");
                    //Debug.WriteLine("Winter is Coming!");
                    break;
                case GestureType.ZoomOut:
                    Debug.WriteLine("Zoom Out");
                    request.send_request("/back");
                    //Debug.WriteLine("You know nothing Jon Snow.");
                    break;
                default:
                    break;
            }

        }