private void bmrResultButton_Click(object sender, RoutedEventArgs e) { if (ActivityComboBox.SelectedIndex >= 0 && ActivityComboBox.SelectedIndex <= 3 && calculator.Age > 12 && calculator.Weight > 39 && calculator.Height > 130) { if (radioButtonFemale.IsChecked == true) { resultBox.Text = "You need " + calculator.CalculateFemaleBMR().ToString() + " calories"; } else if (radioButtonMale.IsChecked == true) { resultBox.Text = "You need " + calculator.CalculateMaleBMR().ToString() + " calories"; } else if (radioButtonMale.IsChecked == false || radioButtonFemale.IsChecked == false) { resultBox.Text = "Select your gender"; } } else { resultBox.Text = "Incorrect input"; } }