Esempio n. 1
0
 /// <summary>
 /// This method sets the background color to white and clears all textboxes
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void clearButton_Click(object sender, EventArgs e)
 {
     HeightTextBox.Clear();
     WeightTextBox.Clear();
     BMITextbox.Clear();
     BMIScaleMultiLineTextBox.Clear();
     BMIScaleMultiLineTextBox.BackColor = Color.White;
 }
Esempio n. 2
0
 /// <summary>
 /// Event listner to check if the weight or height text box has a float value
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TextBoxChanged(object sender, EventArgs e)
 {
     try
     {
         float.Parse(WeightTextBox.Text);
         float.Parse(HeightTextBox.Text);
         CalculateButton.Enabled = true;
         BMITextbox.Clear();
     }
     catch
     {
         CalculateButton.Enabled = false;
     }
 }