Ejemplo n.º 1
0
        public void ExecuteShortcut(OPMShortcutEventArgs args)
        {
            Logger.LogTrace("{0} - IsActive: {1}", Name, IsActive);

            bool isActiveForm = this.IsActive;

            //bool isMainForm = (this is MainApplicationForm);
            //bool isInTray = !Visible || (WindowState == FormWindowState.Minimized);

            if (!args.Handled)
            {
                switch (args.cmd)
                {
                case OPMShortcut.CmdOpenHelp:
                    if (IsActive)
                    {
                        FireHelpRequest();
                        args.Handled = true;
                    }
                    return;

                case OPMShortcut.CmdDumpDebugStats:
                    EventDispatch.DumpStatistics();
                    args.Handled = true;
                    return;

                default:
                    // Do nothing
                    break;
                }

                OnExecuteShortcut(args);
            }
        }