public bool ShowDialog(Dictionary <Command, ToolStripMenuItem> commands, ToolbarCommandCollection toolBar, IEnumerable <ToolbarCommand> def) { this.applyData = false; this.Changed = false; this.commands = commands; this.toolBar = toolBar; this.defToolbar = def; this.CreateListCommands(toolBar.Commands); this.listAvailableActions.SelectedIndex = 0; if (ShowDialog() == DialogResult.OK) { this.Apply(); return(true); } return(this.applyData); }
private void CreateCommands() { this.menuCommands = new Dictionary<Command, ToolStripMenuItem>(); this.commands = new CommandCollection("HomeCollection", FileNames.CommandsFile, this.CreateDefaultCommands()); this.toolbars = new ToolbarCommandCollection("HomeCollection", "Default", commands, FileNames.ToolBarsFile, this.CreateDefaultToolbar(this.commands)); }
public static bool Show(Dictionary <Command, ToolStripMenuItem> commands, ToolbarCommandCollection toolBar, IEnumerable <ToolbarCommand> def) { ToolBarsDialog dlg = new ToolBarsDialog(); return(dlg.ShowDialog(commands, toolBar, def)); }