예제 #1
0
        private void listBox2_DoubleClick(object sender, EventArgs e)
        {
            int n;

            if (pcc == null || Dialog == null || (n = listBox2.SelectedIndex) == -1)
            {
                return;
            }
            string result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new name entry", "ME1Explorer", Dialog.SpeakerList[n].SpeakerTag.ToString(), 0, 0);

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

            if (int.TryParse(result, out i) && pcc.isName(i))
            {
                BioConversation.SpeakerListStruct sp = new BioConversation.SpeakerListStruct();
                sp.SpeakerTag         = i;
                sp.Text               = pcc.getNameEntry(i);
                Dialog.SpeakerList[n] = sp;
            }
            RefreshTabs();
        }
예제 #2
0
        private void toSpeakerListToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (pcc == null || Dialog == null)
            {
                return;
            }
            string result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME1Explorer", "", 0, 0);

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

            if (int.TryParse(result, out i) && pcc.isName(i))
            {
                BioConversation.SpeakerListStruct sp = new BioConversation.SpeakerListStruct();
                sp.SpeakerTag = i;
                sp.Text       = pcc.getNameEntry(i);
                Dialog.SpeakerList.Add(sp);
            }
            RefreshTabs();
        }