public static RibbonPage Add(this RibbonPageCollection collection, string text) { var page = new RibbonPage(text); collection.Add(page); return(page); }
private void FindMenuPhanQuyen(RibbonPageCollection items, string pScreenName, bool pEnable) { foreach (RibbonPage menu in items) { if (string.Equals(pScreenName, menu.Tag)) { menu.Visible = pEnable; } } }
private RibbonPage pageFrom(RibbonPageCollection ribbonPageCollection, string pageName) { var page = ribbonPageCollection[pageName]; if (page == null) { page = new RibbonPage(pageName) { KeyTip = pageName.Substring(0, 1).ToUpper() }; ribbonPageCollection.Add(page); } return(page); }
public static void AddDockPanelMenu(RibbonPageCollection pages, object owner, string addInTreePath) { System.Collections.Generic.List <DockPanelDescriptor> list = AddInTree.BuildItems <DockPanelDescriptor>(addInTreePath, owner, false); foreach (DockPanelDescriptor current in list) { MenuDockPanelCommand menuDockPanelCommand = new MenuDockPanelCommand(current.Codon, owner, true); string[] array = menuDockPanelCommand.Category.Split(new char[] { '|' }); if (pages != null) { RibbonPage pageByName = pages.GetPageByName(array[0]); if (pageByName != null) { RibbonPageGroup groupByName = pageByName.Groups.GetGroupByName(array[1]); if (groupByName != null) { groupByName.ItemLinks.Add(menuDockPanelCommand); } } } } }
public void SetPages(RibbonPageCollection Pages) { this.Pages = Pages; }
/// <summary> /// Initializes a new instance of the <see cref="RibbonPageCollectionUIAdapter"/> class. /// </summary> /// <param name="ribbonPageCollection"></param> public RibbonPageCollectionUIAdapter(RibbonPageCollection ribbonPageCollection) { Guard.ArgumentNotNull(ribbonPageCollection, "RibbonPageCollection"); this.ribbonPageCollection = ribbonPageCollection; }