コード例 #1
0
ファイル: InteractionManager.cs プロジェクト: yuvalnezri/Remo
 private void OnHandGripRelease(object sender, HandGripReleaseEventArgs args)
 {
     if (args.handType == InteractionHandType.Left)
     {
         leftHandGripped = false;
     }
     if (args.handType == InteractionHandType.Right)
     {
         rightHandGripped = false;
     }
     if (remoScheduler.volumeMode)
     {
         remoScheduler.enterVolumeMode();
     }
     //Debug
     //Console.WriteLine("hand release");
 }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e">Gesture event arguments.</param>
        private void OnGestureRecognized(object sender, GestureEventArgs e)
        {
            if (isPaused && e.GestureName == "WaveRight")
            {
                isPaused = false;
                gestureRecognized(this, e);
                return;
            }
            if (!isPaused && e.GestureName == "JoinedHands")
            {
                isPaused = true;
                gestureRecognized(this, e);
                return;
            }

            if (isPaused)
            {
                return;
            }

            switch (e.GestureName)
            {
            case "Menu":
                break;

            case "WaveRight":
                SendKeys.SendWait("{ESC}");
                gestureRecognized(this, e);
                break;

            case "WaveLeft":
                break;

            case "JoinedHands":
                break;

            case "ZoomIn":
                break;

            case "ZoomOut":
                break;

            case "SwipeLeft":
                break;

            case "SwipeRight":
                SendKeys.SendWait("{ADD}");
                remoScheduler.enterVolumeMode();
                gestureRecognized(this, e);
                break;

            case "SwipeUp":
                if (!remoScheduler.canDoSwipeUp || interactionManager.isRightHandGripped)
                {
                    return;
                }
                remoScheduler.swipeUpOccured();
                gestureRecognized(this, e);
                break;

            case "SwipeDown":
                if (!remoScheduler.canDoSwipeDown || interactionManager.isRightHandGripped)
                {
                    return;
                }
                remoScheduler.swipeDownOccured();
                gestureRecognized(this, e);
                break;

            case "Click":
                if (interactionManager.isRightHandGripped)
                {
                    return;
                }
                SendKeys.SendWait("{ENTER}");
                gestureRecognized(this, e);
                break;

            default:
                break;
            }
        }