Ejemplo n.º 1
0
        //Coreコンポーネントで
        public static void Build()
        {
            CreateCategories();

            ICommandManager cm = CommandManagerPlugin.Instance;

            cm.Register(new BasicCommand("org.poderosa.core.application.newwindow",
                                         "Command.NewWindow", _file, CtrlShift(Keys.N), new ExecuteDelegate(CmdNewWindow)));
            cm.Register(new BasicCommand("org.poderosa.core.application.quit",
                                         "Command.Quit", _file, CtrlShift(Keys.W), new ExecuteDelegate(CmdQuit)));

            cm.Register(new BasicCommand("org.poderosa.core.edit.copy",
                                         "Command.Copy", _edit, Alt(Keys.C), new ExecuteDelegate(CmdCopy), new CanExecuteDelegate(CanCopy)));
            cm.Register(new BasicCommand("org.poderosa.core.edit.paste",
                                         "Command.Paste", _edit, Alt(Keys.V), new ExecuteDelegate(CmdPaste), new CanExecuteDelegate(CanPaste)));

            cm.Register(new BasicCommand("org.poderosa.core.session.closedocument",
                                         "Command.CloseDocument", _window, Alt(Keys.W), new ExecuteDelegate(CmdCloseCurrentDocument), DoesExistCurrentDocument));
            cm.Register(_closeAll = new BasicCommand("org.poderosa.core.window.closeall",
                                                     "Command.CloseAll", _window, Keys.None, new ExecuteDelegate(CmdCloseAll), DoesExistAnyDocument));

            cm.Register(new BasicCommand("org.poderosa.core.window.splithorizontal",
                                         "Command.SplitHorizontal", _window, Alt(Keys.H), new ExecuteDelegate(CmdSplitHorizontal), new CanExecuteDelegate(CanSplit)));
            cm.Register(new BasicCommand("org.poderosa.core.window.splitvertical",
                                         "Command.SplitVertical", _window, Alt(Keys.J), new ExecuteDelegate(CmdSplitVertical), new CanExecuteDelegate(CanSplit)));
            cm.Register(new BasicCommand("org.poderosa.core.window.splitunify",
                                         "Command.SplitUnify", _window, Alt(Keys.U), new ExecuteDelegate(CmdSplitUnify), new CanExecuteDelegate(CanSplitUnify)));
            cm.Register(new BasicCommand("org.poderosa.core.window.unifyall",
                                         "Command.UnifyAll", _window, Keys.None, new ExecuteDelegate(CmdUnifyAll), new CanExecuteDelegate(CanUnifyAll)));

            cm.Register(new BasicCommand("org.poderosa.core.window.nexttab",
                                         "Command.NextTab", _window, Keys.None, new ExecuteDelegate(CmdNextTab), DoesExistAnyDocument));
            cm.Register(new BasicCommand("org.poderosa.core.window.prevtab",
                                         "Command.PreviousTab", _window, Keys.None, new ExecuteDelegate(CmdPrevTab), DoesExistAnyDocument));

            cm.Register(new BasicCommand("org.poderosa.core.dialog.pluginlist",
                                         "Command.PluginList", _dialog, Keys.None, new ExecuteDelegate(CmdPluginList)));
            cm.Register(new BasicCommand("org.poderosa.core.dialog.extensionpointlist",
                                         "Command.ExtensionPointList", _dialog, Keys.None, new ExecuteDelegate(CmdExtensionPointList)));
            cm.Register(new BasicCommand("org.poderosa.core.dialog.aboutbox",
                                         "Command.AboutBox", _dialog, Keys.None, new ExecuteDelegate(CmdAboutBox)));
            cm.Register(new BasicCommand("org.poderosa.core.application.openweb",
                                         "Command.PoderosaWeb", _dialog, Keys.None, new ExecuteDelegate(CmdOpenWeb)));

            //これはGeneralCommandではない
            _docActivationCommand = new DocActivationCommand();
        }
Ejemplo n.º 2
0
        //Coreコンポーネントで
        public static void Build()
        {
            CreateCategories();

            ICommandManager cm = CommandManagerPlugin.Instance;
            cm.Register(new BasicCommand("org.poderosa.core.application.newwindow",
                "Command.NewWindow", _file, CtrlShift(Keys.N), new ExecuteDelegate(CmdNewWindow)));
            cm.Register(new BasicCommand("org.poderosa.core.application.quit",
                "Command.Quit", _file, CtrlShift(Keys.W), new ExecuteDelegate(CmdQuit)));

            cm.Register(new BasicCommand("org.poderosa.core.edit.copy",
                "Command.Copy", _edit, Alt(Keys.C), new ExecuteDelegate(CmdCopy), new CanExecuteDelegate(CanCopy)));
            cm.Register(new BasicCommand("org.poderosa.core.edit.paste",
                "Command.Paste", _edit, Alt(Keys.V), new ExecuteDelegate(CmdPaste), new CanExecuteDelegate(CanPaste)));

            cm.Register(new BasicCommand("org.poderosa.core.session.closedocument",
                "Command.CloseDocument", _window, Alt(Keys.W), new ExecuteDelegate(CmdCloseCurrentDocument), DoesExistCurrentDocument));
            cm.Register(_closeAll = new BasicCommand("org.poderosa.core.window.closeall",
                "Command.CloseAll", _window, Keys.None, new ExecuteDelegate(CmdCloseAll), DoesExistAnyDocument));

            cm.Register(new BasicCommand("org.poderosa.core.window.splithorizontal",
                "Command.SplitHorizontal", _window, Alt(Keys.H), new ExecuteDelegate(CmdSplitHorizontal), new CanExecuteDelegate(CanSplit)));
            cm.Register(new BasicCommand("org.poderosa.core.window.splitvertical",
                "Command.SplitVertical", _window, Alt(Keys.J), new ExecuteDelegate(CmdSplitVertical), new CanExecuteDelegate(CanSplit)));
            cm.Register(new BasicCommand("org.poderosa.core.window.splitunify",
                "Command.SplitUnify", _window, Alt(Keys.U), new ExecuteDelegate(CmdSplitUnify), new CanExecuteDelegate(CanSplitUnify)));
            cm.Register(new BasicCommand("org.poderosa.core.window.unifyall",
                "Command.UnifyAll", _window, Keys.None, new ExecuteDelegate(CmdUnifyAll), new CanExecuteDelegate(CanUnifyAll)));

            cm.Register(new BasicCommand("org.poderosa.core.window.nexttab",
                "Command.NextTab", _window, Keys.None, new ExecuteDelegate(CmdNextTab), DoesExistAnyDocument));
            cm.Register(new BasicCommand("org.poderosa.core.window.prevtab",
                "Command.PreviousTab", _window, Keys.None, new ExecuteDelegate(CmdPrevTab), DoesExistAnyDocument));

            cm.Register(new BasicCommand("org.poderosa.core.dialog.pluginlist",
                "Command.PluginList", _dialog, Keys.None, new ExecuteDelegate(CmdPluginList)));
            cm.Register(new BasicCommand("org.poderosa.core.dialog.extensionpointlist",
                "Command.ExtensionPointList", _dialog, Keys.None, new ExecuteDelegate(CmdExtensionPointList)));
            cm.Register(new BasicCommand("org.poderosa.core.dialog.aboutbox",
                "Command.AboutBox", _dialog, Keys.None, new ExecuteDelegate(CmdAboutBox)));
            cm.Register(new BasicCommand("org.poderosa.core.application.openweb",
                "Command.PoderosaWeb", _dialog, Keys.None, new ExecuteDelegate(CmdOpenWeb)));

            //これはGeneralCommandではない
            _docActivationCommand = new DocActivationCommand();
        }