public frmParameterDialog() { InitializeComponent(); data = new dlgData(); //bind the properties to the controls txtR.DataBindings.Add("Text", data, "R_"); txtQ.DataBindings.Add("Text", data, "QInflow_"); txtQc.DataBindings.Add("Text", data, "Qc_"); txtK.DataBindings.Add("Text", data, "K_"); txtSigma.DataBindings.Add("Text", data, "Sigma_"); txtRho.DataBindings.Add("Text", data, "Rho_"); txtN.DataBindings.Add("Text", data, "Numb_"); txtT.DataBindings.Add("Text", data, "Tlength_"); txtOmega.DataBindings.Add("Text", data, "Omega_"); }