Esempio n. 1
0
 private void ButtonAddAnimal_Click(Object sender, EventArgs e)
 {
     if (AddAnimalForm == null || AddAnimalForm.IsDisposed)
     {
         AddAnimalForm = new EditAnimalForm(null);
     }
     AddAnimalForm.Show( );
     AddAnimalForm.Focus( );
     AddAnimalForm.LabelClass.Text = AddAnimalForm.LabelType.Text = AddAnimalForm.LabelDetachment.Text = "";
 }
Esempio n. 2
0
 public HabitatsForm(EditAnimalForm editAnimalForm)
 {
     InitializeComponent( );
     GroupBoxEdit.Visible = false;
     EditAnimalForm       = editAnimalForm;
     ListBoxHabitats.Items.Clear( );
     foreach (var a in EditAnimalForm.Animal.Habitats)
     {
         ListBoxHabitats.Items.Add(a);
     }
     ListBoxHabitats.Items.Add("Добавить");
 }
Esempio n. 3
0
        private void BtnEdit_Click(Object sender, EventArgs e)
        {
            Animal animal = ZooPresenter.SelectedRows[0].Cells[0].Value as Animal;

            if (AddAnimalForm == null || AddAnimalForm.IsDisposed)
            {
                AddAnimalForm = new EditAnimalForm(animal);
            }
            ZooPresenter.Enabled = false;
            AddAnimalForm.Show( );
            AddAnimalForm.Focus( );
            //AddAnimalForm.LabelClass.Text = AddAnimalForm.LabelType.Text = AddAnimalForm.LabelDetachment.Text = "";
        }
Esempio n. 4
0
 public AnimalKindForm(EditAnimalForm editAnimalForm)
 {
     this.EditAnimalForm = editAnimalForm;
     InitializeComponent( );
 }