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
        }
        private void treeView2_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.ReplyListStruct rp = Dialog.ReplyList[n];
            #region MainProps
            if (p.Parent == null)//MainProps
            {
                string propname = t.Text.Split(':')[0].Trim();
                switch (propname)
                {
                case "Listener Index":
                    result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", Dialog.ReplyList[n].ListenerIndex.ToString(), 0, 0);
                    if (result == "")
                    {
                        return;
                    }
                    if (int.TryParse(result, out i))
                    {
                        rp.ListenerIndex = i;
                    }
                    break;

                case "Unskippable":
                    if (Dialog.ReplyList[n].Unskippable)
                    {
                        i = 1;
                    }
                    else
                    {
                        i = 0;
                    }
                    result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", i.ToString(), 0, 0);
                    if (result == "")
                    {
                        return;
                    }
                    rp.Unskippable = (result == "1");
                    break;

                case "ReplyType":
                    result = InputComboBox.GetValue("Please select new value", ME2UnrealObjectInfo.getEnumValues("EReplyTypes"), pcc.getNameEntry(Dialog.ReplyList[n].ReplyTypeValue));
                    if (result == "")
                    {
                        return;
                    }
                    rp.ReplyTypeValue = pcc.FindNameOrAdd(result);
                    break;

                case "Text":
                    result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new string", "ME2Explorer", Dialog.ReplyList[n].Text, 0, 0);
                    if (result == "")
                    {
                        return;
                    }
                    rp.Text = result;
                    break;

                case "refText":
                    result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", Dialog.ReplyList[n].refText.ToString(), 0, 0);
                    if (result == "")
                    {
                        return;
                    }
                    if (int.TryParse(result, out i))
                    {
                        rp.refText = i;
                    }
                    break;

                case "ConditionalFunc":
                    result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", Dialog.ReplyList[n].ConditionalFunc.ToString(), 0, 0);
                    if (result == "")
                    {
                        return;
                    }
                    if (int.TryParse(result, out i))
                    {
                        rp.ConditionalFunc = i;
                    }
                    break;

                case "ConditionalParam":
                    result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", Dialog.ReplyList[n].ConditionalParam.ToString(), 0, 0);
                    if (result == "")
                    {
                        return;
                    }
                    if (int.TryParse(result, out i))
                    {
                        rp.ConditionalParam = i;
                    }
                    break;

                case "StateTransition":
                    result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", Dialog.ReplyList[n].StateTransition.ToString(), 0, 0);
                    if (result == "")
                    {
                        return;
                    }
                    if (int.TryParse(result, out i))
                    {
                        rp.StateTransition = i;
                    }
                    break;

                case "StateTransitionParam":
                    result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", Dialog.ReplyList[n].StateTransitionParam.ToString(), 0, 0);
                    if (result == "")
                    {
                        return;
                    }
                    if (int.TryParse(result, out i))
                    {
                        rp.StateTransitionParam = i;
                    }
                    break;

                case "ExportID":
                    result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", Dialog.ReplyList[n].ExportID.ToString(), 0, 0);
                    if (result == "")
                    {
                        return;
                    }
                    if (int.TryParse(result, out i))
                    {
                        rp.ExportID = i;
                    }
                    break;

                case "ScriptIndex":
                    result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", Dialog.ReplyList[n].ScriptIndex.ToString(), 0, 0);
                    if (result == "")
                    {
                        return;
                    }
                    if (int.TryParse(result, out i))
                    {
                        rp.ScriptIndex = i;
                    }
                    break;

                case "CameraIntimacy":
                    result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", Dialog.ReplyList[n].CameraIntimacy.ToString(), 0, 0);
                    if (result == "")
                    {
                        return;
                    }
                    if (int.TryParse(result, out i))
                    {
                        rp.CameraIntimacy = i;
                    }
                    break;

                case "FireConditional":
                    if (Dialog.ReplyList[n].FireConditional)
                    {
                        i = 1;
                    }
                    else
                    {
                        i = 0;
                    }
                    result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", i.ToString(), 0, 0);
                    if (result == "")
                    {
                        return;
                    }
                    rp.FireConditional = (result == "1");
                    break;

                case "Ambient":
                    if (Dialog.ReplyList[n].Ambient)
                    {
                        i = 1;
                    }
                    else
                    {
                        i = 0;
                    }
                    result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", i.ToString(), 0, 0);
                    if (result == "")
                    {
                        return;
                    }
                    rp.Ambient = (result == "1");
                    break;

                case "NonTextline":
                    if (Dialog.ReplyList[n].NonTextLine)
                    {
                        i = 1;
                    }
                    else
                    {
                        i = 0;
                    }
                    result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", i.ToString(), 0, 0);
                    if (result == "")
                    {
                        return;
                    }
                    rp.NonTextLine = (result == "1");
                    break;

                case "IgnoreBodyGestures":
                    if (Dialog.ReplyList[n].IgnoreBodyGestures)
                    {
                        i = 1;
                    }
                    else
                    {
                        i = 0;
                    }
                    result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", i.ToString(), 0, 0);
                    if (result == "")
                    {
                        return;
                    }
                    rp.IgnoreBodyGestures = (result == "1");
                    break;

                case "GUIStyle":
                    result = InputComboBox.GetValue("Please select new value", ME2UnrealObjectInfo.getEnumValues("EConvGUIStyles"), pcc.getNameEntry(Dialog.ReplyList[n].GUIStyleValue));
                    if (result == "")
                    {
                        return;
                    }
                    rp.GUIStyleValue = pcc.FindNameOrAdd(result);
                    break;
                }
                Dialog.Save();
            }
            #endregion
            #region EntryList
            else //EntryList
            {
                n  = p.Parent.Index;
                rp = Dialog.ReplyList[n];
                int m = t.Index;
                result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", Dialog.ReplyList[n].EntryList[m].ToString(), 0, 0);
                if (result == "")
                {
                    return;
                }
                if (int.TryParse(result, out i))
                {
                    rp.EntryList[m] = i;
                    Dialog.Save();
                }
            }
            #endregion
        }