Canguro.Controller.Controller.processHotKeys C# (CSharp) Метод

processHotKeys() приватный Метод

Method to dispatch HotKeys and act accordingly. It catches any KeyDown events coming from any control inside MainFrm and from MainFrm itself.
private processHotKeys ( object sender, KeyEventArgs e ) : void
sender object The MainFrm
e System.Windows.Forms.KeyEventArgs The KeyDown event argument
Результат void
        void processHotKeys(object sender, KeyEventArgs e)
        {
            #if DEBUG
            if (e.KeyCode == Keys.Space)
            {
                Control c = getFocusControl();
                if (c is TabControl || c is Form || c is Panel || c is ToolBar)
                    Canguro.View.GraphicViewManager.Instance.Layout = (Canguro.View.GraphicViewManager.ViewportsLayout)(((int)Canguro.View.GraphicViewManager.Instance.Layout + 1) % 8);
            }
            else if (e.KeyCode == Keys.Enter)
            {
                if (mainFrm.SmallPanel.Height == 0)
                {
                    string str = InputBox.ShowInputBox();
                    Execute(str);
                }
            }
            #endif
            if (e.KeyCode == Keys.Escape)
                Execute("cancel");
            else if (e.KeyCode == Keys.Delete && !gridHasFocus(sender))
                Execute("delete");
        }