private void OnRunTextEditor (object sender,EventArgs e) { ITextEditorDialog ed = new TextEditorDialog (ctrl.Text,ctrl.Name); if (ed.ShowDialog() == DialogResult.OK) { ctrl.Text = ed.TextValue; this.SetProperty ("Name",ed.TextValue); } }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { string s = String.Empty;; if (value != null) { s = value.ToString(); } ITextEditorDialog ed = new TextEditorDialog (s,"ReportSettings"); if (ed.ShowDialog() == DialogResult.OK) { return ed.TextValue; } else { return s; } }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { string s = String.Empty;; if (value != null) { s = value.ToString(); } ITextEditorDialog ed = new TextEditorDialog(s, "ReportSettings"); if (ed.ShowDialog() == DialogResult.OK) { return(ed.TextValue); } else { return(s); } }