Пример #1
0
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            if (tcTabControl.SelectedTab != null)
            {
                IKeyHandler keyHandler = tcTabControl.SelectedTab as IKeyHandler;

                if (keyHandler != null)
                {
                    if (keyHandler.ProcessKey(keyData))
                    {
                        return(true);
                    }
                }
            }

            switch (keyData)
            {
            case Keys.F5: btnOpenPatientRecord.PerformClick(); return(true);

            case Keys.F6: btnViewTasks.PerformClick(); return(true);

            case Keys.F7: btnViewApiLog.PerformClick(); return(true);

            default: return(base.ProcessCmdKey(ref msg, keyData));
            }
        }