Inheritance: System.Windows.Forms.Form
Example #1
0
 public static DialogResult ShowInputDialog(string title, string question, string value, out string newValue)
 {
     if (singleton == null)
         singleton = new DialogInput();
     singleton.Text = title;
     singleton.lblQuestion.Text = question;
     singleton.txtInput.Text = value;
     newValue = value;
     var result = singleton.ShowDialog();
     if (result == DialogResult.OK)
         newValue = singleton.txtInput.Text;
     return result;
 }
Example #2
0
        public static DialogResult ShowInputDialog(string title, string question, string value, out string newValue)
        {
            if (singleton == null)
            {
                singleton = new DialogInput();
            }
            singleton.Text             = title;
            singleton.lblQuestion.Text = question;
            singleton.txtInput.Text    = value;
            newValue = value;
            var result = singleton.ShowDialog();

            if (result == DialogResult.OK)
            {
                newValue = singleton.txtInput.Text;
            }
            return(result);
        }
Example #3
0
        public bool ShowInputMessage(string title, string message, string oldValue, out string newValue)
        {
            var result = DialogInput.ShowInputDialog(title, message, oldValue, out newValue);

            return(result == DialogResult.OK);
        }