private void strAddBtn_Click(object sender, EventArgs e) { //adds string table item nameDialog ng = new nameDialog("Add string table item", false); if (ng.ShowDialog() == DialogResult.OK) { stringBox.Items.Add(ng.name); } }
private void stringBox_DoubleClick(object sender, EventArgs e) { //edit selected string table item if (stringBox.SelectedItems.Count > 0) { nameDialog ng = new nameDialog("Edit string table item", false); ng.name = (string) stringBox.Items[stringBox.SelectedIndices[0]]; if (ng.ShowDialog() == DialogResult.OK) { stringBox.Items[stringBox.SelectedIndices[0]] = ng.name; } } }
private void exportBox_ItemActivate(object sender, EventArgs e) { //edit export name when item double clicked in exportBox nameDialog ng = new nameDialog("Edit export", true); foreach (ListViewItem lvi in exportBox.SelectedItems) { ng.method = lvi.SubItems[0].Text; ng.CallingConvention = lvi.SubItems[1].Text; ng.name = lvi.SubItems[2].Text; if (ng.ShowDialog() == DialogResult.OK) { lvi.SubItems[1].Text = ng.CallingConvention; lvi.SubItems[2].Text = ng.name; } } }