private void textBox3_TextChanged(object sender, EventArgs e) { label9.Text = (double.TryParse(textBox3.Text, out _)) ? LorentzFormula.VelocityAsFractionOfSpeedOfLight_Beta(double.Parse(textBox3.Text)).ToString() : ERR; if (string.IsNullOrEmpty(textBox3.Text)) { label9.Text = string.Empty; } }
private void textBox4_TextChanged(object sender, EventArgs e) { if (textBox4.Text.Length < 6) { label10.Text = (double.TryParse(textBox4.Text, out _)) ? LorentzFormula.IncreaseDueToVelocity_LorentzFactor_Gamma(double.Parse(textBox4.Text)).ToString() : ERR; if (string.IsNullOrEmpty(textBox4.Text)) { label10.Text = string.Empty; } } else { textBox4.Text = textBox4.Text.Remove(textBox4.Text.Length - 1, 1); } }