private void btnAdd_Click(object sender, EventArgs e) { SegmentConfig S = new SegmentConfig(); PCM.Segments.Add(S); frmSegmentSettings frmSS = new frmSegmentSettings(); frmSS.EditSegment(PCM, PCM.Segments.Count - 1); if (frmSS.ShowDialog(this) == DialogResult.OK) { InitMe(); } }
private void btnEdit_Click(object sender, EventArgs e) { if (listSegments.SelectedItems.Count == 0) { return; } frmSegmentSettings frmSS = new frmSegmentSettings(); int CurrentSel = (int)listSegments.SelectedItems[0].Tag; frmSS.EditSegment(PCM, CurrentSel); if (frmSS.ShowDialog(this) == DialogResult.OK) { InitMe(); } }
private void btnCopy_Click(object sender, EventArgs e) { if (listSegments.SelectedItems.Count == 0) { return; } int CurrentSel = (int)listSegments.SelectedItems[0].Tag; SegmentConfig S = PCM.Segments[CurrentSel]; PCM.Segments.Add(S); frmSegmentSettings frmSS = new frmSegmentSettings(); frmSS.EditSegment(PCM, PCM.Segments.Count - 1); if (frmSS.ShowDialog(this) == DialogResult.OK) { InitMe(); } }