예제 #1
0
 public static string AskSimpleInput(string strQuestion, string strTitle, string strDefault)
 {
     SimpleInput form = new SimpleInput();
     form.lbl.Text = strQuestion;
     form.Text = strTitle;
     form.textBox1.Text = strDefault;
     if (form.ShowDialog() == DialogResult.OK)
     {
         string str = form.textBox1.Text;
         form.Close();
         return str;
     }
     else
     {
         return null;
     }
 }
        public static string AskSimpleInput(string strQuestion, string strTitle, string strDefault)
        {
            SimpleInput form = new SimpleInput();

            form.lbl.Text      = strQuestion;
            form.Text          = strTitle;
            form.textBox1.Text = strDefault;
            if (form.ShowDialog() == DialogResult.OK)
            {
                string str = form.textBox1.Text;
                form.Close();
                return(str);
            }
            else
            {
                return(null);
            }
        }
예제 #3
0
        private void vibLab_updatePanelClick(Label lbl, ref double vfreq, ref double vwidth)
        {
            string strFreq = SimpleInput.AskSimpleInput("Choose frequency:", "Choose frequency:", "0.200");

            if (strFreq == null || strFreq == "")
            {
                return;
            }
            string strWidth = SimpleInput.AskSimpleInput("Choose width (amount):", "Choose width:", "0.300");

            if (strWidth == null || strWidth == "")
            {
                return;
            }
            vfreq  = double.Parse(strFreq);
            vwidth = double.Parse(strWidth);

            lbl.Text = Math.Round(vfreq, 3) + " ; " + Math.Round(vwidth, 3);
        }