상속: System.Windows.Forms.Form
예제 #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;
 }
예제 #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);
        }
예제 #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);
        }