public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) { PropertyDescriptorCollection collection = TypeDescriptor.GetProperties(value, true); List <PropertyDescriptor> list = new List <PropertyDescriptor>(); STControlPropertyDescriptor propTitle = new STControlPropertyDescriptor(collection["Title"]); propTitle.SetCategory(UIResMang.GetString("CategoryTitle")); propTitle.SetDisplayName(UIResMang.GetString("PropTitle")); list.Add(propTitle); STControlPropertyDescriptor PropSize = new STControlPropertyDescriptor(collection["Size"]); PropSize.SetCategory(UIResMang.GetString("CategoryLayout")); PropSize.SetDisplayName(UIResMang.GetString("PropSize")); PropSize.SetDescription(UIResMang.GetString("")); PropSize.SetIsReadOnly(true); list.Add(PropSize); STControlPropertyDescriptor PropBackColor = new STControlPropertyDescriptor(collection["BackgroundColor"]); PropBackColor.SetCategory(UIResMang.GetString("CategoryAppearance")); PropBackColor.SetDisplayName(UIResMang.GetString("PropBackColor")); PropBackColor.SetDescription(UIResMang.GetString("")); list.Add(PropBackColor); STControlPropertyDescriptor PropBackgroundImage = new STControlPropertyDescriptor(collection["BackgroundImage"]); PropBackgroundImage.SetCategory(UIResMang.GetString("CategoryAppearance")); PropBackgroundImage.SetDisplayName(UIResMang.GetString("PropBackgroundImage")); PropBackgroundImage.SetDescription(UIResMang.GetString("")); list.Add(PropBackgroundImage); return(new PropertyDescriptorCollection(list.ToArray())); }
public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) { PropertyDescriptorCollection collection = TypeDescriptor.GetProperties(value, true); List <PropertyDescriptor> list = new List <PropertyDescriptor>(); STControlPropertyDescriptor propTitle = new STControlPropertyDescriptor(collection["Title"]); propTitle.SetCategory(UIResMang.GetString("CategoryTitle")); propTitle.SetDisplayName(UIResMang.GetString("PropTitle")); list.Add(propTitle); //STControlPropertyDescriptor PropWidth = new STControlPropertyDescriptor(collection["Width"]); //PropWidth.SetCategory(UIResMang.GetString("CategoryLayout")); //PropWidth.SetDisplayName(UIResMang.GetString("PropWidth")); //list.Add(PropWidth); //STControlPropertyDescriptor PropHeight = new STControlPropertyDescriptor(collection["Height"]); //PropHeight.SetCategory(UIResMang.GetString("CategoryLayout")); //PropHeight.SetDisplayName(UIResMang.GetString("PropHeight")); //list.Add(PropHeight); STControlPropertyDescriptor PropSize = new STControlPropertyDescriptor(collection["Size"]); PropSize.SetCategory(UIResMang.GetString("CategoryLayout")); PropSize.SetDisplayName(UIResMang.GetString("PropSize")); PropSize.SetDescription(UIResMang.GetString("")); list.Add(PropSize); STControlPropertyDescriptor PropAppBackgroundImage = new STControlPropertyDescriptor(collection["BackgroundImage"]); PropAppBackgroundImage.SetCategory(UIResMang.GetString("")); PropAppBackgroundImage.SetDisplayName(UIResMang.GetString("PropAppBackgroundImage")); PropAppBackgroundImage.SetDescription(UIResMang.GetString("DescriptionForPropAppBackgroundImage")); list.Add(PropAppBackgroundImage); STControlPropertyDescriptor PropAbout = new STControlPropertyDescriptor(collection["About"]); PropAbout.SetCategory(UIResMang.GetString("")); PropAbout.SetDisplayName(UIResMang.GetString("PropAbout")); PropAbout.SetDescription(UIResMang.GetString("DescriptionForPropAbout")); list.Add(PropAbout); STControlPropertyDescriptor PropSymbol = new STControlPropertyDescriptor(collection["Symbol"]); PropSymbol.SetCategory(UIResMang.GetString("")); PropSymbol.SetDisplayName(UIResMang.GetString("PropSymbol")); PropSymbol.SetDescription(UIResMang.GetString("")); list.Add(PropSymbol); STControlPropertyDescriptor PropVersion = new STControlPropertyDescriptor(collection["Version"]); PropVersion.SetCategory(UIResMang.GetString("CategoryVersion")); PropVersion.SetDisplayName(UIResMang.GetString("PropVersion")); PropVersion.SetDescription(UIResMang.GetString("")); PropVersion.SetIsReadOnly(true); list.Add(PropVersion); STControlPropertyDescriptor PropEditorVersion = new STControlPropertyDescriptor(collection["EditorVersion"]); PropEditorVersion.SetCategory(UIResMang.GetString("CategoryVersion")); PropEditorVersion.SetDisplayName(UIResMang.GetString("PropEditorVersion")); PropEditorVersion.SetDescription(UIResMang.GetString("DescriptionForPropEditorVersion")); PropEditorVersion.SetIsReadOnly(true); list.Add(PropEditorVersion); STControlPropertyDescriptor PropLastModified = new STControlPropertyDescriptor(collection["LastModified"]); PropLastModified.SetCategory(UIResMang.GetString("CategoryVersion")); PropLastModified.SetDisplayName(UIResMang.GetString("LastModifiedTime")); PropLastModified.SetDescription(UIResMang.GetString("")); PropLastModified.SetIsReadOnly(true); list.Add(PropLastModified); return(new PropertyDescriptorCollection(list.ToArray())); }