Пример #1
0
        internal static IRibbonMenu CreateRibbonMenu(object menuManager)
        {
            if (_ribbonInstance == null)
            {
                _ribbonInstance = new RibbonMenu(menuManager);
            }

            return(_ribbonInstance);
        }
Пример #2
0
 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);
 }
Пример #3
0
 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);
 }
Пример #4
0
        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;
        }
Пример #5
0
 private static void CreateDefaultHeaders(IRibbonMenu menu)
 {
     //这儿后期需要增加建立ApplicationMenu和QuickAccess的代码
 }