예제 #1
0
 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));
 }
예제 #2
0
        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);
        }