Example #1
0
        private void InitializeActions()
        {
            _actionManager = new ModuleActionManager();

            _actionManager.Actions.Add("View", new ModuleAction(ActionType.PanelAction, "View", "View",
                                                                delegate() { return ViewButton.Enabled; },
                                                                toolStripButton2_Click));

            _actionManager.Actions.Add("RemoveSelected", new ModuleAction(ActionType.PanelAction, "Remove Selected", "Remove",
                                                                delegate() { return removeToolStripMenuItem.Enabled; },
                                                                removeToolStripMenuItem_Click));

            _actionManager.Actions.Add("RemoveAll", new ModuleAction(ActionType.PanelAction, "Remove All", "Remove",
                                                                delegate() { return removeAllToolStripMenuItem.Enabled; },
                                                                removeAllToolStripMenuItem_Click));

            _actionManager.Actions.Add("Search", new ModuleAction(ActionType.PanelAction, "Search", "Search",
                                                                delegate() { return SearchButton.Enabled; },
                                                                toolStripButton1_Click));
        }
        private void InitializeActions()
        {
            _actionManager = new ModuleActionManager();

            _actionManager.Actions.Add("New", new ModuleAction(ActionType.PanelAction, "NewTask", "NewTask",
                                                               delegate() { return toolStripButton1.Enabled; },
                                                               toolStripButton1_Click));

            _actionManager.Actions.Add("Remove", new ModuleAction(ActionType.PanelAction, "RemoveTask", "RemoveTask",
                                                                 delegate() { return RemoveButton.Enabled; },
                                                                 RemoveButton_Click));

            _actionManager.Actions.Add("Edit", new ModuleAction(ActionType.PanelAction, "EditTask", "EditTask",
                                                                delegate() { return EditButton.Enabled; },
                                                                toolStripButton2_Click));

            _actionManager.Actions.Add("Start", new ModuleAction(ActionType.PanelAction, "Start", "StartTask",
                                                                 delegate() { return StartButton.Enabled; },
                                                                 StartButton_Click));

            _actionManager.Actions.Add("Stop", new ModuleAction(ActionType.PanelAction, "StopButton", "StopTask",
                                                                delegate() { return toolStripButton1.Enabled; },
                                                                StopButton_Click));

            _actionManager.Actions.Add("Import", new ModuleAction(ActionType.PanelAction, "Import", "ImportTask",
                                                                  delegate() { return ImportButton.Enabled; },
                                                                  toolStripButton3_Click));

            _actionManager.Actions.Add("Export", new ModuleAction(ActionType.PanelAction, "Export", "ExportTask",
                                                                  delegate() { return ImportButton.Enabled; },
                                                                  ExportButton_Click));
        }
Example #3
0
        private void InitializeActions()
        {
            _actionManager = new ModuleActionManager();
            _actionManager.Actions.Add("New", new ModuleAction(ActionType.PanelAction, "New", "New",
                                                                delegate() { return newToolStripMenuItem.Enabled; },
                                                                newToolStripMenuItem_Click));

            _actionManager.Actions.Add("Open", new ModuleAction(ActionType.PanelAction, "Open", "Open",
                                                                delegate() { return openToolStripMenuItem.Enabled; },
                                                                openToolStripMenuItem_Click));

            _actionManager.Actions.Add("Save", new ModuleAction(ActionType.PanelAction, "Save", "Save",
                                                                delegate() { return saveToolStripMenuItem.Enabled; },
                                                                saveToolStripMenuItem_Click));

            _actionManager.Actions.Add("SaveAs", new ModuleAction(ActionType.PanelAction, "SaveAs", "SaveAs",
                                                                delegate() { return saveAsToolStripMenuItem.Enabled; },
                                                                saveAsToolStripMenuItem_Click));

            _actionManager.Actions.Add("File", new ModuleAction(ActionType.PanelAction, "File", "File",
                                                                delegate() { return fileToolStripMenuItem1.Enabled; },
                                                                fileToolStripMenuItem2_Click));

            _actionManager.Actions.Add("Folder", new ModuleAction(ActionType.PanelAction, "Folder", "Folder",
                                                                delegate() { return folderToolStripMenuItem1.Enabled; },
                                                                folderToolStripMenuItem1_Click));

            _actionManager.Actions.Add("Drive", new ModuleAction(ActionType.PanelAction, "Drive", "Drive",
                                                                delegate() { return freeSpaceToolStripMenuItem1.Enabled; },
                                                                freeSpaceToolStripMenuItem1_Click));

            _actionManager.Actions.Add("Plugin", new ModuleAction(ActionType.PanelAction, "Plugin", "Plugin",
                                                                delegate() { return pluginToolStripMenuItem.Enabled; },
                                                                pluginToolStripMenuItem_Click));

            _actionManager.Actions.Add("Search", new ModuleAction(ActionType.PanelAction, "Search", "Search",
                                                                delegate() { return searchFilesToolStripMenuItem.Enabled; },
                                                                searchFilesToolStripMenuItem_Click));

            _actionManager.Actions.Add("Edit", new ModuleAction(ActionType.PanelAction, "Edit", "Edit",
                                                                delegate() { return editSelectedItemToolStripMenuItem.Enabled; },
                                                                editSelectedItemToolStripMenuItem_Click));

            _actionManager.Actions.Add("RemoveSelected", new ModuleAction(ActionType.PanelAction, "RemoveSelected", "Remove",
                                                                delegate() { return removeSelectedToolStripMenuItem.Enabled; },
                                                                removeSelectedToolStripMenuItem_Click));

            _actionManager.Actions.Add("RemoveAll", new ModuleAction(ActionType.PanelAction, "RemoveAll", "Remove",
                                                                delegate() { return removeAllToolStripMenuItem1.Enabled; },
                                                                removeAllToolStripMenuItem1_Click));

            _actionManager.Actions.Add("Start", new ModuleAction(ActionType.PanelAction, "Start", "Start",
                                                                delegate() { return startToolStripMenuItem.Enabled; },
                                                                startToolStripMenuItem_Click));

            _actionManager.Actions.Add("Stop", new ModuleAction(ActionType.PanelAction, "Stop", "Stop",
                                                                delegate() { return stopToolStripMenuItem.Enabled; },
                                                                stopToolStripMenuItem_Click));

            _actionManager.Actions.Add("Options", new ModuleAction(ActionType.PanelAction, "Options", "Options",
                                                                delegate() { return optionsToolStripMenuItem.Enabled; },
                                                                optionsToolStripMenuItem_Click));
        }