public static void read <T>(out T x, string s = "read: ")
        {
            x = default(T);
            if (x == null)
            {
                x = (T)(object)(" ");
            }

            var rf = new ReadForm(s);

            rf.ShowDialog();
            if (rf.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                var result = rf.Result;

                if (x.IsNumericType())
                {
                    x = (T)((object)double.Parse(result, System.Globalization.CultureInfo.InvariantCulture));
                }

                if (x is string)
                {
                    x = (T)((object)(result));
                }

                if (x is System.Numerics.Complex)
                {
                    x = (T)((object)MathNet.Numerics.ComplexExtensions.ToComplex(result, System.Globalization.CultureInfo.InvariantCulture));
                }
            }
            CONSOLE_OUTPUT(System.Environment.NewLine + s + " " + objectToString(x));
        }
 public void ReadDevice_Event(object sender, EventArgs e)
 {
     ReadForm readForm = new ReadForm(this);
     readForm.Height = 84;
     int num = (int)readForm.ShowDialog();
     this.LoadSettingsToProgramConfig();
     this.UpdateTooltips();
 }