private void animalsButton_Click(object sender, EventArgs e) { if (aviariesListBox.SelectedItem != null) { var animals = new AnimalsForm(_controller, _zoo, aviariesListBox.SelectedItem); animals.ShowDialog(); } }
private void animalsButton_Click(object sender, EventArgs e) { if (zoosListBox.SelectedItem != null && _controller.GetAviaryList(zoosListBox.SelectedItem).Count != 0) { var animalsForm = new AnimalsForm(_controller, zoosListBox.SelectedItem, null); animalsForm.ShowDialog(); } }