private void textBoxEmsPi_TextChanged(object sender, EventArgs e)
{
TextBox t = sender as TextBox;
double pi = 1;
try
{
pi = double.Parse(t.Text);
}
catch (FormatException fe)
{
}
catch (Exception)
{
t.Text = "1";
//MessageBox.Show("Invalid input!\r\nCheck your input again.", "Caution", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}