protected override string OnGetCustomUI(string ribbonID) { try { OlCustomUIAttribute olRibbon = GetOlRibbonAttribute(Type, ribbonID); if (null != olRibbon) { return(Utils.Resource.ReadString(OlCustomUIAttribute.BuildPath(olRibbon.Value, olRibbon.UseAssemblyNamespace, Type.Namespace))); } else { var ribbon = NetOffice.Attributes.AttributeExtensions.GetCustomAttribute <CustomUIAttribute>(Type); if (null != ribbon && CustomUIAttribute.ContainsProcessedRibbonId(ribbon, ribbon.RibbonID)) { return(Utils.Resource.ReadString(CustomUIAttribute.BuildPath(ribbon.Value, ribbon.UseAssemblyNamespace, Type.Namespace))); } else { return(string.Empty); } } } catch (NetRuntimeSystem.Exception exception) { Factory.Console.WriteException(exception); OnError(ErrorMethodKind.GetCustomUI, exception); return(String.Empty); } }
public virtual string GetCustomUI(string RibbonID) { try { OlCustomUIAttribute olRibbon = GetOlRibbonAttribute(Type, RibbonID); if (null != olRibbon) { return(Utils.Resource.ReadString(OlCustomUIAttribute.BuildPath(olRibbon.Value, olRibbon.UseAssemblyNamespace, Type.Namespace))); } else { CustomUIAttribute ribbon = AttributeReflector.GetRibbonAttribute(Type, RibbonID); if (null != ribbon) { return(Utils.Resource.ReadString(CustomUIAttribute.BuildPath(ribbon.Value, ribbon.UseAssemblyNamespace, Type.Namespace))); } else { return(String.Empty); } } } catch (NetRuntimeSystem.Exception exception) { NetOffice.DebugConsole.Default.WriteException(exception); OnError(ErrorMethodKind.GetCustomUI, exception); return(String.Empty); } }