private void ListViewDefferedCategoriesMouseDoubleClick(object sender, MouseEventArgs e) { if (listViewDefferedCategories.SelectedItems.Count > 0) { DeferredCategoryAddingForm form = new DeferredCategoryAddingForm(_currentAircraft, (DeferredCategory)listViewDefferedCategories.SelectedItems[0].Tag); form.ShowDialog(); if (form.DialogResult == DialogResult.OK) { UpdateInformation(); } } }
private void ButtonAddClick(object sender, EventArgs e) { DeferredCategoryAddingForm form = new DeferredCategoryAddingForm(_currentAircraft); form.ShowDialog(); if (form.DialogResult != DialogResult.OK) { return; } if (form.DefferedCategory != null) { _defferedCategories.Add(form.DefferedCategory); } UpdateInformation(); }