Beispiel #1
0
 public static string GetString(string head, string info)
 {
     StringInput ip = new StringInput();
     ip.Text = head;
     ip.labelInfo.Text = info;
     ip.ShowDialog();
     string r = ip.textBox1.Text;
     ip.Dispose(true);
     return r;
 }
Beispiel #2
0
        public static string GetString(string head, string info)
        {
            StringInput ip = new StringInput();

            ip.Text           = head;
            ip.labelInfo.Text = info;
            ip.ShowDialog();
            string r = ip.textBox1.Text;

            ip.Dispose(true);
            return(r);
        }
Beispiel #3
0
 public static string GetString(string head, string info, string defaultValue, bool allowCancel)
 {
     StringInput ip = new StringInput();
     ip.buttonCancel.Visible = allowCancel;
     ip.buttonOK.Left = ip.buttonCancel.Left - (allowCancel ? ip.buttonOK.Width : 0);
     ip.Text = head;
     ip.textBox1.Text = defaultValue;
     ip.labelInfo.Text = info;
     ip.ShowDialog();
     string r = ip.cancelled?null:ip.textBox1.Text;
     ip.Dispose(true);
     return r;
 }
Beispiel #4
0
        public static string GetString(string head, string info, string defaultValue, bool allowCancel)
        {
            StringInput ip = new StringInput();

            ip.buttonCancel.Visible = allowCancel;
            ip.buttonOK.Left        = ip.buttonCancel.Left - (allowCancel ? ip.buttonOK.Width : 0);
            ip.Text           = head;
            ip.textBox1.Text  = defaultValue;
            ip.labelInfo.Text = info;
            ip.ShowDialog();
            string r = ip.cancelled?null:ip.textBox1.Text;

            ip.Dispose(true);
            return(r);
        }