コード例 #1
0
 private void bmrResultButton_Click(object sender, RoutedEventArgs e)
 {
     if (calculator.Height > 0 && calculator.Height < 250 && (radioButtonFemale.IsChecked == true || radioButtonMale.IsChecked == true))
     {
         calculator.CalculateIBW();
         if (radioButtonFemale.IsChecked == true)
         {
             resultBox.Text = $"Broc: {calculator.brocF}\nLorentz: {calculator.lorF}\nPotton: {calculator.potF}\nAtuz: {calculator.atuz}";
         }
         else if (radioButtonMale.IsChecked == true)
         {
             resultBox.Text = $"Broc: {calculator.brocM}\nLorentz: {calculator.lorM}\nPotton: {calculator.potM}\nAtuz: {calculator.atuz}";
         }
     }
     else
     {
         resultBox.Text = "Incorrect input";
     }
 }