Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
        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);
        }