示例#1
0
        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", "ME1Explorer", Dialog.ScriptList[n].ScriptTag.Name, true);

            if (nameResult == "")
            {
                return;
            }
            string numberResult = PromptDialog.Prompt(null, "Please enter new name index", "ME1Explorer", Dialog.ScriptList[n].ScriptTag.Number.ToString(), true);

            if (numberResult == "")
            {
                return;
            }
            if (int.TryParse(numberResult, out int i) && i >= 0)
            {
                ME1BioConversation.ScriptListStruct sp = new ME1BioConversation.ScriptListStruct();
                sp.ScriptTag         = new NameReference(nameResult, 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;
            }
            ME1BioConversation.ScriptListStruct sd = Dialog.ScriptList[n];
            string result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new name entry", "ME1Explorer", Dialog.ScriptList[n].ScriptTag.ToString(), 0, 0);

            if (result == "")
            {
                return;
            }
            int i = 0;

            if (int.TryParse(result, out i) && pcc.isName(i))
            {
                ME1BioConversation.ScriptListStruct sp = new ME1BioConversation.ScriptListStruct();
                sp.ScriptTag         = i;
                sp.Text              = pcc.getNameEntry(i);
                Dialog.ScriptList[n] = sp;
                Dialog.Save();
            }
        }
示例#3
0
        private void scriptListToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int n;

            if (Pcc == null || Dialog == null || (n = listBox3.SelectedIndex) == -1)
            {
                return;
            }
            ME1BioConversation.ScriptListStruct sc = new ME1BioConversation.ScriptListStruct();
            sc.ScriptTag = Dialog.ScriptList[n].ScriptTag;
            Dialog.ScriptList.Add(sc);
            Dialog.Save();
        }