Exemple #1
0
        private bool ProcessKeyboardMessage(KeyboardButtonMessage keyboardMessage)
        {
            //keyboard up messages are just consumed.
            if (keyboardMessage.ButtonAction == KeyboardButtonMessage.ButtonActions.Up)
            {
                return(true);
            }

            ReleaseCapture(true);
            this.CaptureMouseWheelHandler = null;

            IClickAction action = _shortcutManager.GetKeyboardAction(keyboardMessage.Shortcut);

            Trace.WriteLine(String.Format("Finding shortcut for: {0}", keyboardMessage.Shortcut));
            if (action != null)
            {
                action.Click();
                return(true);
            }

            return(false);
        }
Exemple #2
0
		private bool ProcessKeyboardMessage(KeyboardButtonMessage keyboardMessage)
		{
			//keyboard up messages are just consumed.
			if (keyboardMessage.ButtonAction == KeyboardButtonMessage.ButtonActions.Up)
				return true;

			ReleaseCapture(true);
			this.CaptureMouseWheelHandler = null;

			IClickAction action = _shortcutManager.GetKeyboardAction(keyboardMessage.Shortcut);
            Trace.WriteLine(String.Format("Finding shortcut for: {0}", keyboardMessage.Shortcut));
			if (action != null)
			{
				action.Click();
				return true;
			}

			return false;
		}