예제 #1
0
        public string Prompt(string text, string caption, string defval = "")
        {
            askForm frm    = new askForm();
            string  answer = frm.Prompt(text, caption, defval, frm);

            return(answer);
        }
예제 #2
0
 public string Prompt(string text, string caption, string defval = null, askForm o = null)
 {
     askLabel.Text = text;
     Text          = caption;
     if (defval != null)
     {
         txtAnswer.Text = defval;
     }
     o.ShowDialog();
     return(answer);
 }
예제 #3
0
 private void webBrowser_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
 {
     if (skipNextKey)
     {
         skipNextKey = false;
         return;
     }
     if (e.KeyValue == 71) //g key
     {
         askForm frm = new askForm();
         frm.ShowDialog();
         skipNextKey = true;
     }
 }
예제 #4
0
 public string Prompt(string text, string caption, string defval = null, askForm o = null, Form owner = null)
 {
     this.owner     = owner;
     width_orig     = Width;
     top_orig       = Height * 3;
     askLabel.Text  = text;
     Text           = caption;
     txtHeader.Text = caption;
     if (defval != null)
     {
         txtAnswer.Text = defval;
     }
     o.ShowDialog();
     if (answer != null)
     {
         answer = answer.Replace("\n", "").Replace("\r", "");
     }
     return(answer);
 }