private void btnTGIEditor_Click(object sender, EventArgs e) { CountedTGIBlockList tgiBlocksCopy = new CountedTGIBlockList(null, vpxy.TGIBlocks); DialogResult dr = TGIBlockListEditor.Show(tgiBlocksCopy); if (dr != DialogResult.OK) { return; } vpxy.TGIBlocks.Clear(); vpxy.TGIBlocks.AddRange(tgiBlocksCopy.ToArray()); }
private void btnTGIBlockListEditor_Click(object sender, EventArgs e) { CountedTGIBlockList tgiBlocksCopy = new CountedTGIBlockList(null, tgiBlocks); DialogResult dr = TGIBlockListEditor.Show(tgiBlocksCopy); if (dr != DialogResult.OK) return; TGIBlock tgib = tgiBlocks == null ? null : cbTGIBlocks.SelectedIndex >= 0 && cbTGIBlocks.SelectedIndex < tgiBlocks.Count ? tgiBlocks[cbTGIBlocks.SelectedIndex] : null; string selectedItem = tgib == null ? "(null)" : MakeItem(tgib); tgiBlocks.Clear(); tgiBlocks.AddRange(tgiBlocksCopy.ToArray()); FillList(selectedItem); OnTGIBlockListChanged(this, EventArgs.Empty); }
private void btnTGIEditor_Click(object sender, EventArgs e) { CountedTGIBlockList tgiBlocksCopy = new CountedTGIBlockList(null, vpxy.TGIBlocks); DialogResult dr = TGIBlockListEditor.Show(tgiBlocksCopy); if (dr != DialogResult.OK) return; vpxy.TGIBlocks.Clear(); vpxy.TGIBlocks.AddRange(tgiBlocksCopy.ToArray()); }