private void itemAdd_Click(object sender, EventArgs e) { using (frmAddRange frmadd = new frmAddRange("Add range")) { if (frmadd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { FixedRanges.Add(frmadd.Range); } } }
private void EditRange() { if (listView1.SelectedItems.Count == 1) { int[] Range = ReadSelectedRange(); using (frmAddRange EditRange = new frmAddRange("Edit range", Range)) { if (EditRange.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.FixedRanges.Remove(Range); this.FixedRanges.Add(EditRange.Range); } } } }