Пример #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);
 }