public static string Prompt(string question, string initialText) { frmPrompt prompt = new frmPrompt(); prompt.lblPrompt.Text = question; prompt.txtReply.Text = initialText; prompt.txtReply.Focus(); prompt.txtReply.SelectAll(); if (prompt.ShowDialog() == DialogResult.Cancel) return null; return prompt.txtReply.Text; }
public static string Prompt(string question, string initialText) { frmPrompt prompt = new frmPrompt(); prompt.lblPrompt.Text = question; prompt.txtReply.Text = initialText; prompt.txtReply.Focus(); prompt.txtReply.SelectAll(); if (prompt.ShowDialog() == DialogResult.Cancel) { return(null); } return(prompt.txtReply.Text); }