/// <summary> /// 打开数据编辑窗体 /// </summary> /// <param name="value">编辑的数据</param> /// <returns></returns> public static object EditValue(object value) { ContentForm form = new ContentForm(); form.Content = value.ToString(); DialogResult dr = form.ShowDialog(); if (dr == DialogResult.OK) { return(form.Content); } else { return(value); } }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { //打开属性编辑器修改数据 return(ContentForm.EditValue(value)); }