Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 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));
 }
Exemplo n.º 3
0
        public static bool Show(Dictionary <Command, ToolStripMenuItem> commands, ToolbarCommandCollection toolBar, IEnumerable <ToolbarCommand> def)
        {
            ToolBarsDialog dlg = new ToolBarsDialog();

            return(dlg.ShowDialog(commands, toolBar, def));
        }