using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SigmaDrawerElement.Descriptor { public class DrawerArcDescriptor : BaseTypeDescriptor { private Dictionary _dic = new Dictionary { {"基本信息","\t弧、弦、饼"}, }; public DrawerArcDescriptor(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 DrawerArcInfoAttribute : BaseDescriptorAttribute { public DrawerArcInfoAttribute() : base(typeof(DrawerArc), typeof(DrawerArcDescriptor)) { } } }