private void updateZoneButton_Click(object sender, EventArgs e) { Cuts old = cuts.clone(); removeSelectedZones(); if (addSelectedSection()) { updateListView(); } else { cuts = old; } }
private void updateZoneButton_Click(object sender, EventArgs e) { if (sections.SelectedItems.Count != 1) { MessageBox.Show("You must select exactly one section to update", "Bad selection", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } Cuts old = cuts.clone(); removeSelectedZones(); if (addSelectedSection()) { updateListView(); } else { cuts = old; } }