private void Edit() { using (var editForm = new frmEditItemSet(this)) { editForm.ShowDialog(); if (editForm.DialogResult == DialogResult.OK) { ClearItems(); ClearAlternatives(); ItemsNaming = editForm.ItemSet.ItemsNaming; foreach (Item it in editForm.ItemSet.Items) { AddItem(it.Copy()); } AlternativesNaming = editForm.ItemSet.AlternativesNaming; string[] altNames = new string[editForm.ItemSet.NumberOfAlternatives]; editForm.ItemSet.Alternatives.CopyTo(altNames, 0); _alternatives = altNames.ToList(); NumberOfCheckedAlternativesAllowed = editForm.ItemSet.NumberOfCheckedAlternativesAllowed; ApplyScoreTooManyAlternatives = editForm.ItemSet.ApplyScoreTooManyAlternatives; ScoreIfTooManyAlternativesAreChecked = editForm.ItemSet.ScoreIfTooManyAlternativesAreChecked; Description = editForm.ItemSet.Description; Columns = editForm.ItemSet.Columns; this.Invalidate(); ParentPage.PropertyViewer().Focus(this); } } }