private void scriptListToolStripMenuItem_Click(object sender, EventArgs e) { int n; if (pcc == null || Dialog == null || (n = listBox3.SelectedIndex) == -1) return; ME2BioConversation.ScriptListStruct sc = new ME2BioConversation.ScriptListStruct(); sc.ScriptTag = Dialog.ScriptList[n].ScriptTag; sc.Text = pcc.getNameEntry(sc.ScriptTag); Dialog.ScriptList.Add(sc); Dialog.Save(); }
private void listBox3_DoubleClick(object sender, EventArgs e) { int n; if (pcc == null || Dialog == null || (n = listBox3.SelectedIndex) == -1) return; ME2BioConversation.ScriptListStruct sd = Dialog.ScriptList[n]; string result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new name entry", "ME2Explorer", Dialog.ScriptList[n].ScriptTag.ToString(), 0, 0); if (result == "") return; int i = 0; if (int.TryParse(result, out i) && pcc.isName(i)) { ME2BioConversation.ScriptListStruct sp = new ME2BioConversation.ScriptListStruct(); sp.ScriptTag = i; sp.Text = pcc.getNameEntry(i); Dialog.ScriptList[n] = sp; Dialog.Save(); } }