Inheritance: NiCommandBarControl, INiCommandBar, ICommandBarContainer
Example #1
0
        public HResult CreateCommandBar(Guid id, NiCommandBarKind kind, int priority, out INiCommandBar commandBar)
        {
            commandBar = null;

            try
            {
                commandBar = new NiCommandBar(id, kind, priority);

                _objects[id] = commandBar;

                return HResult.OK;
            }
            catch (Exception ex)
            {
                return ErrorUtil.GetHResult(ex);
            }
        }
Example #2
0
        public BarControl CreateHost(NiCommandBar commandBar)
        {
            switch (commandBar.Kind)
            {
                case NiCommandBarKind.Menu:
                    return new BarControl<MenuItemBarControl>(this, commandBar);

                case NiCommandBarKind.Toolbar:
                    return new BarControl<ToolStripBarControl>(this, commandBar);

                case NiCommandBarKind.Popup:
                    return new BarControl<ContextMenuStripBarControl>(this, commandBar);

                default:
                    throw new NetIdeException(NeutralResources.InvalidCommandBarStyle);
            }
        }
Example #3
0
        public HResult CreateCommandBar(Guid id, NiCommandBarKind kind, int priority, out INiCommandBar commandBar)
        {
            commandBar = null;

            try
            {
                commandBar = new NiCommandBar(id, kind, priority);

                _objects[id] = commandBar;

                return(HResult.OK);
            }
            catch (Exception ex)
            {
                return(ErrorUtil.GetHResult(ex));
            }
        }