internal static IRibbonMenu CreateRibbonMenu(object menuManager) { if (_ribbonInstance == null) { _ribbonInstance = new RibbonMenu(menuManager); } return(_ribbonInstance); }
internal static IRibbonMenu InitMenus(RibbonControl ribbonManager, RibbonStatusBar statusBar) { if (_instance == null) { var menuIndex = new RibbonMenuIndex(ribbonManager, statusBar); _instance = new RibbonMenu(menuIndex); CreateDefaultHeaders(_instance); } return(_instance); }
internal static IRibbonMenu CreateMenus(IEnumerable <YutaiCommand> commands, RibbonControl ribbonManager, RibbonStatusBar statusBar, XmlDocument xmlDoc) { if (_instance == null) { var menuIndex = new RibbonMenuIndex(ribbonManager, statusBar); _instance = new RibbonMenu(menuIndex); } _instance.AddCommands(xmlDoc, commands); return(_instance); }
public RibbonMenuServiceBase(IAppContext context, PluginIdentity identity) { if (context == null) { throw new ArgumentNullException("context"); } if (identity == null) { throw new ArgumentNullException("identity"); } _context = context; _identity = identity; _ribbonManager = _context.RibbonMenu; }
private static void CreateDefaultHeaders(IRibbonMenu menu) { //这儿后期需要增加建立ApplicationMenu和QuickAccess的代码 }