Esempio n. 1
0
        public void OnRunCommand(string command, ref bool handled)
        {
            handled = true;
            switch (command)
            {
            case "@TabScan":
                disposeControlHighlight();
                _autoScanTimer.ToggleTimer();
                break;

            case "@Tab":
                Context.AppAgentMgr.Keyboard.Send(Keys.Tab);
                break;

            case "@Down":
                Context.AppAgentMgr.Keyboard.Send(Keys.Down);
                break;

            case "@Up":
                Context.AppAgentMgr.Keyboard.Send(Keys.Up);
                break;

            case "@Left":
                Context.AppAgentMgr.Keyboard.Send(Keys.Left);
                break;

            case "@Right":
                Context.AppAgentMgr.Keyboard.Send(Keys.Right);
                break;

            case "@Select":
                Context.AppAgentMgr.Keyboard.Send(Keys.Enter);
                break;

            case "@Escape":
                Context.AppAgentMgr.Keyboard.Send(Keys.Escape);
                break;

            case "@CmdRightClick":
                Context.AppAgentMgr.Keyboard.Send(Keys.LShiftKey, Keys.F10);
                break;

            case "@Text":
                Invoke(new MethodInvoker(delegate()
                {
                    disposeControlHighlight();
                    IPanel panel = Context.AppScreenManager.CreatePanel(PanelClasses.Alphabet) as IPanel;
                    Context.AppScreenManager.Show(this, panel);
                }));
                break;

            default:
                handled = false;
                break;
            }
        }
Esempio n. 2
0
        public void OnRunCommand(string command, ref bool handled)
        {
            handled = true;
            switch (command)
            {
            case "@goHome":
                Context.AppAgentMgr.RunCommand("MenuContextClose", ref handled);
                //Context.AppAgent.Send(Keys.Escape);
                //Context.AppAgent.Send(Keys.Escape);
                //Context.AppAgent.Send(Keys.Escape);
                handled = false;
                break;

            case "@TabScan":
                _autoScanTimer.ToggleTimer();
                break;

            case "@Down":
                Context.AppAgentMgr.Keyboard.Send(Keys.Down);
                break;

            case "@Up":
                Context.AppAgentMgr.Keyboard.Send(Keys.Up);
                break;

            case "@Left":
                Context.AppAgentMgr.Keyboard.Send(Keys.Left);
                break;

            case "@Right":
                Context.AppAgentMgr.Keyboard.Send(Keys.Right);
                break;

            case "@PageUp":
                Context.AppAgentMgr.Keyboard.Send(Keys.PageUp);
                break;

            case "@PageDown":
                Context.AppAgentMgr.Keyboard.Send(Keys.PageDown);
                break;

            case "@Top":
                Context.AppAgentMgr.Keyboard.Send(Keys.Home);
                break;

            case "@Bottom":
                Context.AppAgentMgr.Keyboard.Send(Keys.End);
                break;

            case "@Select":
                Context.AppAgentMgr.Keyboard.Send(Keys.Enter);
                break;

            case "@SelectAndClose":
                Context.AppAgentMgr.Keyboard.Send(Keys.Enter);
                Close();
                break;

            case "@SelectWithMouse":
                clickOnFocusedElement();
                break;

            case "@Escape":
                Context.AppAgentMgr.Keyboard.Send(Keys.Escape);
                break;

            case "@Text":
                Invoke(new MethodInvoker(delegate()
                {
                    IScreen panel = Context.AppScreenManager.CreatePanel(PanelTypes.Alphabet) as IScreen;
                    Context.AppScreenManager.Show(this, panel);
                }));
                break;

            default:
                handled = false;
                break;
            }
        }