/// <summary>
        /// 创建功能区解析器
        /// </summary>
        /// <param name="elementName"></param>
        /// <param name="ribbonAdmin"></param>
        /// <returns></returns>
        public static IRibbonResolver CreateResolver(string elementName, RibbonAdminImpl ribbonAdmin)
        {
            switch (elementName)
            {
            case "ribbon":
                return(new RibbonResolver(ribbonAdmin));

            case "tab":
                return(new RibbonTabResolver(ribbonAdmin));

            case "group":
                return(new RibbonGroupResolver(ribbonAdmin));

            case "button":
                return(new RibbonSingleResolver <XRibbonButton>(ribbonAdmin));

            case "toggleButton":
                return(new RibbonSingleResolver <XRibbonToggleButton>(ribbonAdmin));

            case "separator":
                return(new RibbonSingleResolver <XRibbonSeparator>(ribbonAdmin));

            case "menu":
                return(new RibbonMenuResolver(ribbonAdmin));

            default:
                return(null);
            }
        }
Beispiel #2
0
 public RibbonResolver(RibbonAdminImpl ribbonAdmin)
     : base(ribbonAdmin)
 {
 }
 public BaseRibbonResolver(RibbonAdminImpl ribbonAdmin)
 {
     this.ribbonAdmin = ribbonAdmin;
 }