private void toEntrysReplyListToolStripMenuItem_Click(object sender, EventArgs e) { TreeNode t = treeView1.SelectedNode; if (t == null || t.Parent == null) { return; } TreeNode p = t.Parent; int Index; int SubIndx = -1; if (p.Parent == null) { Index = p.Index; } else { Index = p.Parent.Index; SubIndx = t.Index; } ME2BioConversation.EntryListStuct el = Dialog.EntryList[Index]; AddReply ar = new AddReply(); ar.pcc = pcc as ME2Package; if (SubIndx != -1) { ME2BioConversation.EntryListReplyListStruct tr = el.ReplyList[SubIndx]; ar.textBox1.Text = tr.Paraphrase; ar.textBox2.Text = tr.refParaphrase.ToString(); ar.comboBox1.SelectedItem = pcc.getNameEntry(tr.CategoryValue); ar.textBox4.Text = tr.Index.ToString(); } ar.Show(); while (ar.state == 0) { Application.DoEvents(); } ar.Close(); if (ar.state == -1) { return; } if (el.ReplyList == null) { el.ReplyList = new List <ME2BioConversation.EntryListReplyListStruct>(); } el.ReplyList.Add(ar.res); Dialog.EntryList[Index] = el; Dialog.Save(); }
private void toEntrysSpeakerListToolStripMenuItem_Click(object sender, EventArgs e) { TreeNode t = treeView1.SelectedNode; if (t == null || t.Parent == null) { return; } TreeNode p = t.Parent; if (p.Parent == null) { ME2BioConversation.EntryListStuct el = Dialog.EntryList[p.Index]; int i = 0; string result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", "0", 0, 0); if (result == "") { return; } if (el.SpeakerList == null) { el.SpeakerList = new List <int>(); } if (int.TryParse(result, out i)) { el.SpeakerList.Add(i); } Dialog.EntryList[p.Index] = el; Dialog.Save(); } else { ME2BioConversation.EntryListStuct el = Dialog.EntryList[p.Parent.Index]; int i = 0; string result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", "0", 0, 0); if (result == "") { return; } if (el.SpeakerList == null) { el.SpeakerList = new List <int>(); } if (int.TryParse(result, out i)) { el.SpeakerList.Add(i); } Dialog.EntryList[p.Parent.Index] = el; Dialog.Save(); } }
private void entryListEntryToolStripMenuItem_Click(object sender, EventArgs e) { TreeNode t = treeView1.SelectedNode; if (t == null || t.Parent != null) { return; } ME2BioConversation.EntryListStuct el0 = Dialog.EntryList[t.Index]; ME2BioConversation.EntryListStuct el = new ME2BioConversation.EntryListStuct(); el.ReplyList = new List <ME2BioConversation.EntryListReplyListStruct>(); foreach (ME2BioConversation.EntryListReplyListStruct rpe0 in el0.ReplyList) { ME2BioConversation.EntryListReplyListStruct rpe = new ME2BioConversation.EntryListReplyListStruct(); rpe.CategoryValue = rpe0.CategoryValue; rpe.Index = rpe0.Index; rpe.Paraphrase = "" + rpe0.Paraphrase; rpe.refParaphrase = rpe0.refParaphrase; el.ReplyList.Add(rpe); } el.SpeakerList = new List <int>(); foreach (int i in el0.SpeakerList) { el.SpeakerList.Add(i); } el.Ambient = el0.Ambient; el.CameraIntimacy = el0.CameraIntimacy; el.ConditionalFunc = el0.ConditionalFunc; el.ConditionalParam = el0.ConditionalParam; el.ExportID = el0.ExportID; el.FireConditional = el0.FireConditional; el.GUIStyleValue = el0.GUIStyleValue; el.IgnoreBodyGestures = el0.IgnoreBodyGestures; el.ListenerIndex = el0.ListenerIndex; el.NonTextline = el0.NonTextline; el.refText = el0.refText; el.ScriptIndex = el0.ScriptIndex; el.Skippable = el0.Skippable; el.SpeakerIndex = el0.SpeakerIndex; el.StateTransition = el0.StateTransition; el.StateTransitionParam = el0.StateTransitionParam; el.Text = "" + el0.Text; Dialog.EntryList.Add(el); Dialog.Save(); }
private void entrysReplyListEntryToolStripMenuItem_Click(object sender, EventArgs e) { TreeNode t = treeView1.SelectedNode; if (t == null || t.Parent == null) { return; } TreeNode p = t.Parent; if (p.Parent != null && p.Index == 0) { ME2BioConversation.EntryListStuct el = Dialog.EntryList[p.Parent.Index]; ME2BioConversation.EntryListReplyListStruct rpe0 = el.ReplyList[t.Index]; ME2BioConversation.EntryListReplyListStruct rpe = new ME2BioConversation.EntryListReplyListStruct(); rpe.CategoryValue = rpe0.CategoryValue; rpe.Index = rpe0.Index; rpe.Paraphrase = "" + rpe0.Paraphrase; rpe.refParaphrase = rpe0.refParaphrase; el.ReplyList.Add(rpe); Dialog.EntryList[p.Parent.Index] = el; Dialog.Save(); } }
private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { TreeNode t = e.Node; if (t == null || t.Parent == null) { return; } TreeNode p = t.Parent; int n = p.Index, i = 0; string result; ME2BioConversation.EntryListStuct el = Dialog.EntryList[n]; #region MainProps if (p.Parent == null)//MainProps { string propname = t.Text.Split(':')[0].Trim(); switch (propname) { case "SpeakerIndex": result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", el.SpeakerIndex.ToString(), 0, 0); if (result == "") { return; } if (int.TryParse(result, out i)) { el.SpeakerIndex = i; } break; case "ListenerIndex": result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", el.ListenerIndex.ToString(), 0, 0); if (result == "") { return; } if (int.TryParse(result, out i)) { el.ListenerIndex = i; } break; case "Skippable": if (el.Skippable) { i = 1; } else { i = 0; } result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", i.ToString(), 0, 0); if (result == "") { return; } el.Skippable = (result == "1"); break; case "Text": result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new string", "ME2Explorer", el.Text, 0, 0); if (result == "") { return; } el.Text = result; break; case "refText": result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", el.refText.ToString(), 0, 0); if (result == "") { return; } if (int.TryParse(result, out i)) { el.refText = i; } break; case "ConditionalFunc": result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", el.ConditionalFunc.ToString(), 0, 0); if (result == "") { return; } if (int.TryParse(result, out i)) { el.ConditionalFunc = i; } break; case "ConditionalParam": result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", el.ConditionalParam.ToString(), 0, 0); if (result == "") { return; } if (int.TryParse(result, out i)) { el.ConditionalParam = i; } break; case "StateTransition": result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", el.StateTransition.ToString(), 0, 0); if (result == "") { return; } if (int.TryParse(result, out i)) { el.StateTransition = i; } break; case "StateTransitionParam": result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", el.StateTransitionParam.ToString(), 0, 0); if (result == "") { return; } if (int.TryParse(result, out i)) { el.StateTransitionParam = i; } break; case "ExportID": result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", el.ExportID.ToString(), 0, 0); if (result == "") { return; } if (int.TryParse(result, out i)) { el.ExportID = i; } break; case "ScriptIndex": result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", el.ScriptIndex.ToString(), 0, 0); if (result == "") { return; } if (int.TryParse(result, out i)) { el.ScriptIndex = i; } break; case "CameraIntimacy": result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", el.CameraIntimacy.ToString(), 0, 0); if (result == "") { return; } if (int.TryParse(result, out i)) { el.CameraIntimacy = i; } break; case "FireConditional": if (el.FireConditional) { i = 1; } else { i = 0; } result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", i.ToString(), 0, 0); if (result == "") { return; } el.FireConditional = (result == "1"); break; case "Ambient": if (el.Ambient) { i = 1; } else { i = 0; } result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", i.ToString(), 0, 0); if (result == "") { return; } el.Ambient = (result == "1"); break; case "NonTextline": if (el.NonTextline) { i = 1; } else { i = 0; } result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", i.ToString(), 0, 0); if (result == "") { return; } el.NonTextline = (result == "1"); break; case "IgnoreBodyGestures": if (el.IgnoreBodyGestures) { i = 1; } else { i = 0; } result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", i.ToString(), 0, 0); if (result == "") { return; } el.IgnoreBodyGestures = (result == "1"); break; case "GUIStyle": result = InputComboBox.GetValue("Please select new value", ME2UnrealObjectInfo.getEnumValues("EConvGUIStyles"), pcc.getNameEntry(el.GUIStyleValue)); if (result == "") { return; } el.GUIStyleValue = pcc.FindNameOrAdd(result); break; } Dialog.EntryList[n] = el; Dialog.Save(); } #endregion #region EntryList else //ReplyList/SpeakerList { n = p.Parent.Index; el = Dialog.EntryList[n]; int m = t.Index; if (p.Index == 0) //ReplyList { ME2BioConversation.EntryListReplyListStruct rpe = el.ReplyList[m]; result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new string for \"Paraphrase\"", "ME2Explorer", rpe.Paraphrase.ToString(), 0, 0); rpe.Paraphrase = result; result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value for \"Index\"", "ME2Explorer", rpe.Index.ToString(), 0, 0); if (result == "") { return; } if (int.TryParse(result, out i)) { rpe.Index = i; } result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new StringRef value for \"refParaphrase\"", "ME2Explorer", rpe.refParaphrase.ToString(), 0, 0); if (result == "") { return; } if (int.TryParse(result, out i)) { rpe.refParaphrase = i; } result = InputComboBox.GetValue("Please select new value for \"Category\"", ME2UnrealObjectInfo.getEnumValues("EReplyCategory"), pcc.getNameEntry(rpe.CategoryValue)); if (result == "") { return; } rpe.CategoryValue = pcc.FindNameOrAdd(result); el.ReplyList[m] = rpe; Dialog.Save(); } if (p.Index == 1) //Speaker List { result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", el.SpeakerList[m].ToString(), 0, 0); if (result == "") { return; } if (int.TryParse(result, out i)) { el.SpeakerList[m] = i; Dialog.Save(); } } } #endregion }