public override object EditValue(ITypeDescriptorContext context, System.IServiceProvider provider, object value) { if (context == null || provider == null || context.Instance == null) { return(base.EditValue(provider, value)); } return(TemplateTextForm.Run((string)value)); }
public static string Run(string text) { TemplateTextForm win = new TemplateTextForm(); win.textBox1.Text = text; if (win.ShowDialogEx() == DialogResult.OK) { return(win.textBox1.Text); } return(text); }