private void textBox4_TextChanged(object sender, EventArgs e) { if (checkValidity_d(textBox4.Text)) { Settings.Default.Duration = Convert.ToUInt32(textBox3.Text); } else if (textBox4.Text != "")//when a user is changing textBox3.Text, he or she may first delete all numbers and then type a new one { ParameterRangeForm rangeForm = new ParameterRangeForm(false); rangeForm.Show(); } }
private void button1_Click(object sender, EventArgs e) { if (checkValidity_f(textBox4.Text)) { SimulationForm simForm = new SimulationForm(); simForm.SimCode = code;//transfer code simForm.Show(); //Show a form that simulates and contains basic control } else { ParameterRangeForm rangeForm = new ParameterRangeForm(false); rangeForm.Show(); } }