Пример #1
0
        private void replyListEntryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TreeNode t = treeView2.SelectedNode;

            if (t == null || t.Parent != null)
            {
                return;
            }
            ME2BioConversation.ReplyListStruct rp = new ME2BioConversation.ReplyListStruct();
            rp.EntryList = new List <int>();
            foreach (int i in Dialog.ReplyList[t.Index].EntryList)
            {
                rp.EntryList.Add(i);
            }
            rp.ListenerIndex        = Dialog.ReplyList[t.Index].ListenerIndex;
            rp.Unskippable          = Dialog.ReplyList[t.Index].Unskippable;
            rp.ReplyTypeValue       = Dialog.ReplyList[t.Index].ReplyTypeValue;
            rp.Text                 = Dialog.ReplyList[t.Index].Text;
            rp.refText              = Dialog.ReplyList[t.Index].refText;
            rp.ConditionalFunc      = Dialog.ReplyList[t.Index].ConditionalFunc;
            rp.ConditionalParam     = Dialog.ReplyList[t.Index].ConditionalParam;
            rp.StateTransition      = Dialog.ReplyList[t.Index].StateTransition;
            rp.StateTransitionParam = Dialog.ReplyList[t.Index].StateTransitionParam;
            rp.ExportID             = Dialog.ReplyList[t.Index].ExportID;
            rp.ScriptIndex          = Dialog.ReplyList[t.Index].ScriptIndex;
            rp.CameraIntimacy       = Dialog.ReplyList[t.Index].CameraIntimacy;
            rp.FireConditional      = Dialog.ReplyList[t.Index].FireConditional;
            rp.Ambient              = Dialog.ReplyList[t.Index].Ambient;
            rp.NonTextLine          = Dialog.ReplyList[t.Index].NonTextLine;
            rp.IgnoreBodyGestures   = Dialog.ReplyList[t.Index].IgnoreBodyGestures;
            rp.GUIStyleValue        = Dialog.ReplyList[t.Index].GUIStyleValue;
            Dialog.ReplyList.Add(rp);
            Dialog.Save();
        }
Пример #2
0
        private void toReplysEntryListToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TreeNode t = treeView2.SelectedNode;

            if (t == null || t.Parent == null)
            {
                return;
            }
            TreeNode p = t.Parent;

            if (p.Parent == null)
            {
                ME2BioConversation.ReplyListStruct rp = Dialog.ReplyList[p.Index];
                int    i      = 0;
                string result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", "0", 0, 0);
                if (result == "")
                {
                    return;
                }
                if (int.TryParse(result, out i))
                {
                    rp.EntryList.Add(i);
                }
                Dialog.ReplyList[p.Index] = rp;
                Dialog.Save();
            }
            else
            {
                ME2BioConversation.ReplyListStruct rp = Dialog.ReplyList[p.Parent.Index];
                int    i      = 0;
                string result = Microsoft.VisualBasic.Interaction.InputBox("Please enter new value", "ME2Explorer", "0", 0, 0);
                if (result == "")
                {
                    return;
                }
                if (int.TryParse(result, out i))
                {
                    rp.EntryList.Add(i);
                }
                Dialog.ReplyList[p.Parent.Index] = rp;
                Dialog.Save();
            }
        }
Пример #3
0
        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
        }