using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SigmaDrawerElement.Descriptor { public class DrawerEllipseDescriptor : BaseTypeDescriptor { private Dictionary _dic = new Dictionary { {"基本信息","\t圆"}, }; public DrawerEllipseDescriptor(ICustomTypeDescriptor descriptor) : base(descriptor) { } protected override bool TryGetCategory(ProxyPropertyDescriptor ppd, out string value) { return _dic.TryGetValue(ppd.BaseCategory, out value); } protected override bool TryGetDisplayName(ProxyPropertyDescriptor ppd, out string value) { return _dic.TryGetValue(ppd.BaseDisplayName, out value); } } public class DrawerEllipseInfoAttribute : BaseDescriptorAttribute { public DrawerEllipseInfoAttribute() : base(typeof(DrawerEllipse), typeof(DrawerEllipseDescriptor)) { } } }