public ComparePeakBoundaries EditItem(Control owner, ComparePeakBoundaries item, IEnumerable <ComparePeakBoundaries> existing, object tag) { var document = tag as SrmDocument; using (var dlg = new AddPeakCompareDlg(document, item, existing)) { return(dlg.ShowDialog(owner) == DialogResult.OK ? dlg.BoundaryComparer : default(ComparePeakBoundaries)); } }
public void Add() { using (var dlg = new AddPeakCompareDlg(Document, _peakBoundaryList)) { if (dlg.ShowDialog(this) == DialogResult.OK) { _peakBoundaryList.Add(dlg.BoundaryComparer); UpdateCheckedList(); UpdateAll(); } } }