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