private void editPersonClick(object sender, EventArgs e) { DisableButtons(); PersonEditForm personEditForm = new PersonEditForm(listOfPersons[listViewPerson.SelectedIndices[0]]); personEditForm.FormClosed += Reload_FormClosed; personEditForm.Show(); }
// create Person private void AddPersonButtonClick(object sender, EventArgs e) { DisableButtons(); listPerson.Add(new Person()); PersonEditForm personEditForm = new PersonEditForm(listPerson[listPerson.Count - 1]); personEditForm.FormClosed += EnableButtons_FormClosed; personEditForm.Show(); }