private void button1_Click(object sender, EventArgs e) { res = new BioConversation.EntryListReplyListStruct(); res.Paraphrase = textBox1.Text; res.refParaphrase = Int32.Parse(textBox2.Text); res.CategoryValue = Int32.Parse(textBox3.Text); res.Index = Int32.Parse(textBox4.Text); state = 1; }
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; } BioConversation.EntryListStuct el = Dialog.EntryList[Index]; AddReply ar = new AddReply(); ar.pcc = pcc; if (SubIndx != -1) { BioConversation.EntryListReplyListStruct tr = el.ReplyList[SubIndx]; ar.textBox1.Text = tr.Paraphrase; ar.textBox2.Text = tr.refParaphrase.ToString(); ar.textBox3.Text = tr.CategoryValue.ToString(); 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 <BioConversation.EntryListReplyListStruct>(); } el.ReplyList.Add(ar.res); Dialog.EntryList[Index] = el; RefreshTabs(); }
private void button1_Click(object sender, EventArgs e) { res = new BioConversation.EntryListReplyListStruct(); int n = pcc.findName("EReplyCategory"); if (n == -1) { MessageBox.Show("Please add Name \"EReplyCategory\""); state = -1; return; } res.Paraphrase = textBox1.Text; res.refParaphrase = Int32.Parse(textBox2.Text); res.CategoryType = n; res.CategoryValue = Int32.Parse(textBox3.Text); res.Index = Int32.Parse(textBox4.Text); state = 1; }
private void entryListEntryToolStripMenuItem_Click(object sender, EventArgs e) { TreeNode t = treeView1.SelectedNode; if (t == null || t.Parent != null) { return; } BioConversation.EntryListStuct el0 = Dialog.EntryList[t.Index]; BioConversation.EntryListStuct el = new BioConversation.EntryListStuct(); el.ReplyList = new List <BioConversation.EntryListReplyListStruct>(); foreach (BioConversation.EntryListReplyListStruct rpe0 in el0.ReplyList) { BioConversation.EntryListReplyListStruct rpe = new BioConversation.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); RefreshTabs(); }
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) { BioConversation.EntryListStuct el = Dialog.EntryList[p.Parent.Index]; BioConversation.EntryListReplyListStruct rpe0 = el.ReplyList[t.Index]; BioConversation.EntryListReplyListStruct rpe = new BioConversation.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; RefreshTabs(); } }
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; BioConversation.EntryListStuct el = Dialog.EntryList[n]; #region MainProps if (p.Parent == null)//MainProps { string propname = t.Text.Split(':')[0].Trim(); string[] reslist; switch (propname) { case "SpeakerIndex": result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME1Explorer", 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", "ME1Explorer", 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", "ME1Explorer", i.ToString(), 0, 0); if (result == "") { return; } el.Skippable = (result == "1"); break; case "Text": result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new string", "ME1Explorer", el.Text, 0, 0); if (result == "") { return; } el.Text = result; break; case "refText": result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME1Explorer", 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", "ME1Explorer", 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", "ME1Explorer", 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", "ME1Explorer", 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", "ME1Explorer", 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", "ME1Explorer", 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", "ME1Explorer", 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", "ME1Explorer", 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", "ME1Explorer", 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", "ME1Explorer", 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", "ME1Explorer", 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", "ME1Explorer", i.ToString(), 0, 0); if (result == "") { return; } el.IgnoreBodyGestures = (result == "1"); break; case "GUIStyle": result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new name index", "ME1Explorer", el.GUIStyleValue.ToString(), 0, 0); if (result == "") { return; } if (int.TryParse(result, out i)) { el.GUIStyleValue = i; } break; } Dialog.EntryList[n] = el; } #endregion #region EntryList else //ReplyList/SpeakerList { n = p.Parent.Index; el = Dialog.EntryList[n]; int m = t.Index; if (p.Index == 0) //ReplyList { BioConversation.EntryListReplyListStruct rpe = el.ReplyList[m]; result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new string for \"Paraphrase\"", "ME1Explorer", rpe.Paraphrase.ToString(), 0, 0); rpe.Paraphrase = result; result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value for \"Index\"", "ME1Explorer", 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\"", "ME1Explorer", rpe.refParaphrase.ToString(), 0, 0); if (result == "") { return; } if (int.TryParse(result, out i)) { rpe.refParaphrase = i; } result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new name index for \"Category\"", "ME1Explorer", rpe.CategoryValue.ToString(), 0, 0); if (result == "") { return; } if (int.TryParse(result, out i)) { rpe.CategoryValue = i; } el.ReplyList[m] = rpe; } if (p.Index == 1) //Speaker List { result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME1Explorer", el.SpeakerList[m].ToString(), 0, 0); if (result == "") { return; } if (int.TryParse(result, out i)) { el.SpeakerList[m] = i; } } } #endregion RefreshTabs(); }