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(); } }
private void listBox3_DoubleClick(object sender, EventArgs e) { int n; if (Pcc == null || Dialog == null || (n = listBox3.SelectedIndex) == -1) { return; } string nameResult = PromptDialog.Prompt(null, "Please enter new name", "ME2Explorer", Dialog.ScriptList[n].ScriptTag.Name, true); if (nameResult == "") { return; } string numberResult = PromptDialog.Prompt(null, "Please enter new name index", "ME2Explorer", Dialog.ScriptList[n].ScriptTag.Number.ToString(), true); if (numberResult == "") { return; } if (int.TryParse(numberResult, out int i) && i >= 0) { ME2BioConversation.ScriptListStruct sp = new ME2BioConversation.ScriptListStruct(); sp.ScriptTag = new NameReference(nameResult, i); Dialog.ScriptList[n] = sp; Dialog.Save(); } }
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; Dialog.ScriptList.Add(sc); Dialog.Save(); }