private void dataGridViewAnimals_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { Animaux animal = (Animaux)this.dataGridViewAnimals.CurrentRow.DataBoundItem; if (animal != null) { DialogAnimal DialogAnimal = new GUI.Dialog.DialogAnimal(animal); DialogAnimal.Disposed += UpdateContentEvent; DialogAnimal.buttonValidate.Click += UpdateContentEvent; DialogAnimal.ShowDialog(); } }
private void buttonAddAni_Click(object sender, EventArgs e) { if (currentClient == null) { return; } DialogAnimal DialogAnimal = new GUI.Dialog.DialogAnimal(currentClient); DialogAnimal.Disposed += UpdateContentEvent; DialogAnimal.buttonValidate.Click += UpdateContentEvent; DialogAnimal.ShowDialog(); }