Пример #1
0
 internal MenuItemCollection(BarItems items, IMenuIndex menuIndex) :
     base(items, menuIndex)
 {
     _items = items;
     if (items == null)
     {
         throw new NullReferenceException("Bar items reference is null.");
     }
 }
Пример #2
0
        public MenuStripDropDownItem(ToolStripMenuItem item, IMenuIndex menuIndex)
            : base(item)
        {
            if (menuIndex == null)
            {
                throw new ArgumentNullException("menuIndex");
            }
            _menuIndex = menuIndex;

            // TODO: add handlers only when external handlers are attached,
            // otherwise it will preven GC of this wrapper
            item.DropDownOpening += (s, e) => FireDropDownOpening();
            item.DropDownClosed  += (s, e) => FireDropDownClosed();
        }
Пример #3
0
        internal ItemCollectionBase(IList items, IMenuIndex menuIndex)
        {
            if (items == null)
            {
                throw new ArgumentNullException("items");
            }
            if (menuIndex == null)
            {
                throw new ArgumentNullException("menuIndex");
            }

            _items    = items;
            MenuIndex = menuIndex;
        }
Пример #4
0
        public StatusBarDropDown(ToolStripItem item, IMenuIndex menuIndex) : base(item)
        {
            if (item == null)
            {
                throw new ArgumentNullException("item");
            }
            if (menuIndex == null)
            {
                throw new ArgumentNullException("menuIndex");
            }

            _item      = item;
            _menuIndex = menuIndex;
        }
Пример #5
0
        public StatusItemCollection(ToolStripItemCollection items, IMenuIndex menuIndex, bool topLevel) :
            base(items, menuIndex)
        {
            if (items == null)
            {
                throw new ArgumentNullException("items");
            }
            if (menuIndex == null)
            {
                throw new ArgumentNullException("menuIndex");
            }

            _items     = items;
            _menuIndex = menuIndex;
            _topLevel  = topLevel;
        }
Пример #6
0
        internal StatusBar(object bar, IMenuIndex menuIndex, PluginIdentity identity)
        {
            _bar       = bar as RibbonStatusBar;
            _menuIndex = menuIndex;

            if (_bar == null)
            {
                throw new ArgumentNullException("bar");
            }
            if (_menuIndex == null)
            {
                throw new ArgumentNullException("menuIndex");
            }

            _bar.Tag = new MenuItemMetadata(identity, "statusbar");
        }
Пример #7
0
        internal ToolbarCollectionBase(object menuManager, IMenuIndex menuIndex)
        {
            _menuIndex = menuIndex;
            _manager   = menuManager as MainFrameBarManager;
            if (menuIndex == null)
            {
                throw new ArgumentNullException("menuIndex");
            }
            if (_manager == null)
            {
                throw new NullReferenceException("ToolbarCollectionBase: instance of menu manager is not provided.");
            }

#if STYLE2010
            _manager.Style = VisualStyle.Office2010;
#else
            _manager.Style = VisualStyle.OfficeXP;
#endif
        }
Пример #8
0
        internal Toolbar(MainFrameBarManager manager, Bar bar, IMenuIndex menuIndex)
        {
            _manager    = manager;
            _bar        = bar;
            _menuIndex  = menuIndex;
            _commandBar = _manager.GetBarControl(_bar);

            if (manager == null)
            {
                throw new ArgumentNullException("manager");
            }
            if (menuIndex == null)
            {
                throw new ArgumentNullException("menuIndex");
            }
            if (bar == null || _commandBar == null)
            {
                throw new NullReferenceException("Internal toolbar reference is null.");
            }
        }
Пример #9
0
        internal StatusBar(object bar, IMenuIndex menuIndex, PluginIdentity identity)
        {
            _bar       = bar as StatusStripEx;
            _menuIndex = menuIndex;

            if (_bar == null)
            {
                throw new ArgumentNullException("bar");
            }
            if (_menuIndex == null)
            {
                throw new ArgumentNullException("menuIndex");
            }

            _bar.Tag = new MenuItemMetadata(identity, "statusbar");

#if STYLE2010
            _bar.VisualStyle = StatusStripExStyle.Default;
#else
            _bar.VisualStyle = StatusStripExStyle.Metro;
#endif
        }
Пример #10
0
 internal ToolbarCollection(object menuManager, IMenuIndex menuIndex)
     : base(menuManager, menuIndex)
 {
 }
 public MenuStripItemCollection(ToolStripItemCollection items, IMenuIndex menuIndex)
     : base(items, menuIndex)
 {
 }