Exemple #1
0
        private void addAnimalBtn_Click(object sender, EventArgs e)
        {
            int size = Convert.ToInt32(sizeCb.Text.Substring(0, 1));

            if (train.AddAnimalToWagon(nameTb.Text, (CircusTreinLogica.Size)size, diet))
            {
                UpdateLists();
            }
            else
            {
                MessageBox.Show("A new wagon is created!");
                UpdateLists();
            }
        }