private void SubmitButton_Click(object sender, RoutedEventArgs e) { ShelterView shelterView = new ShelterView(s); string Sex = null; int AgeInput = 0; decimal WeightInput = 0; if (AgeTextBox.Text.Length == 0) { MessageBox.Show("No Age was inputted."); } else { AgeInput = Convert.ToInt32(AgeTextBox.Text); } if (WeightTextBox.Text.Length == 0) { MessageBox.Show("No Weight was inputted."); } else { WeightInput = Convert.ToDecimal(WeightTextBox.Text); } if (MaleRB.IsChecked == true) { Sex = (string)MaleRB.Content; } else if (FemaleRB.IsChecked == true) { Sex = (string)FemaleRB.Content; } else { MessageBox.Show("No sex was inputted."); } Animal animal = new Animal(PetNameTextbox.Text, SpeciesTextbox.Text, AgeInput, Sex, WeightInput); s.Add(animal); PetsDisplayLabel.Content = shelterView.Show(); }