Exemple #1
0
        private void Btn_addAnimal_Click(object sender, EventArgs e)
        {
            ManageAnimal manageAnimal = new ManageAnimal(ListOfAnimals);
            var          result       = manageAnimal.ShowDialog();

            UpdateControls();
        }
Exemple #2
0
        private void Btn_editAnimal_Click(object sender, EventArgs e)
        {
            Animal foundAnimal = new Animal();

            if ((foundAnimal = FindAnimal(SaveAnimalName)) != null)
            {
                ManageAnimal editAnimal = new ManageAnimal(ListOfAnimals, foundAnimal);
                var          result     = editAnimal.ShowDialog();
                if (result == DialogResult.OK)
                {
                    ListOfAnimals.Remove(foundAnimal);
                }
            }
            else
            {
                MessageBox.Show("Tier wurde nicht gefunden.", "", MessageBoxButtons.OK);
            }
            UpdateControls();
        }