using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace GeoSigma.UCDraw.WellAndSection { public partial class FrmSetWellDistance : Form { public double dis = 1000; public FrmSetWellDistance() { InitializeComponent(); } private void FrmSetWellDistance_Shown(object sender, EventArgs e) { textBoxDistance.Text = dis.ToString("F2"); } private void btnOK_Click(object sender, EventArgs e) { if (Double.TryParse(textBoxDistance.Text, out double tdis)) dis = tdis; } } }