public TreeNode ToTree(int MyIndex, ME2Package pcc)
            {
                string s = "";

                if (Text.Length != 0)
                {
                    s = Text.Substring(0, Text.Length - 1);
                }
                TreeNode res = new TreeNode(MyIndex + " : " + s + "  " + ME2TalkFiles.findDataById(refText));
                TreeNode t   = new TreeNode("Entry List");

                for (int i = 0; i < EntryList.Count; i++)
                {
                    t.Nodes.Add(i + " : " + EntryList[i]);
                }
                res.Nodes.Add(t);
                res.Nodes.Add("Listener Index : " + ListenerIndex);
                res.Nodes.Add("Unskippable : " + Unskippable);
                res.Nodes.Add("ReplyType : " + pcc.getNameEntry(ReplyTypeValue));
                res.Nodes.Add("Text : " + Text);
                res.Nodes.Add("refText : " + refText + " " + ME2TalkFiles.findDataById(refText, true));
                res.Nodes.Add("ConditionalFunc : " + ConditionalFunc);
                res.Nodes.Add("ConditionalParam : " + ConditionalParam);
                res.Nodes.Add("StateTransition : " + StateTransition);
                res.Nodes.Add("StateTransitionParam : " + StateTransitionParam);
                res.Nodes.Add("ExportID : " + ExportID);
                res.Nodes.Add("ScriptIndex : " + ScriptIndex);
                res.Nodes.Add("CameraIntimacy : " + CameraIntimacy);
                res.Nodes.Add("FireConditional : " + FireConditional);
                res.Nodes.Add("Ambient : " + Ambient);
                res.Nodes.Add("NonTextline : " + NonTextLine);
                res.Nodes.Add("IgnoreBodyGestures : " + IgnoreBodyGestures);
                res.Nodes.Add("GUIStyle : " + pcc.getNameEntry(GUIStyleValue));
                return(res);
            }
            public TreeNode ToTree(int MyIndex, ME2Package pcc)
            {
                string s = "";

                if (Text.Length != 0)
                {
                    s = Text.Substring(0, Text.Length - 1);
                }
                TreeNode res = new TreeNode(MyIndex + " : " + s + "  " + ME2TalkFiles.findDataById(refText));
                TreeNode t   = new TreeNode("Reply List");

                for (int i = 0; i < ReplyList.Count; i++)
                {
                    EntryListReplyListStruct e = ReplyList[i];
                    string par = e.Paraphrase;
                    if (par.Length != 0 && par[par.Length - 1] == '\0')
                    {
                        par = par.Substring(0, par.Length - 1);
                    }
                    t.Nodes.Add(i + " : "
                                + par
                                + " "
                                + e.refParaphrase
                                + " "
                                + ME2TalkFiles.findDataById(e.refParaphrase)
                                + " "
                                + e.Index
                                + " "
                                + pcc.getNameEntry(e.CategoryValue));
                }
                res.Nodes.Add(t);
                TreeNode t2 = new TreeNode("Speaker List");

                for (int i = 0; i < SpeakerList.Count; i++)
                {
                    t2.Nodes.Add(i + " : " + SpeakerList[i]);
                }
                res.Nodes.Add(t2);
                res.Nodes.Add("SpeakerIndex : " + SpeakerIndex);
                res.Nodes.Add("ListenerIndex : " + ListenerIndex);
                res.Nodes.Add("ConditionalFunc : " + ConditionalFunc);
                res.Nodes.Add("ConditionalParam : " + ConditionalParam);
                res.Nodes.Add("StateTransition : " + StateTransition);
                res.Nodes.Add("StateTransitionParam : " + StateTransitionParam);
                res.Nodes.Add("ExportID : " + ExportID);
                res.Nodes.Add("ScriptIndex : " + ScriptIndex);
                res.Nodes.Add("CameraIntimacy : " + CameraIntimacy);
                res.Nodes.Add("Skippable : " + Skippable);
                res.Nodes.Add("FireConditional : " + FireConditional);
                res.Nodes.Add("Ambient : " + Ambient);
                res.Nodes.Add("NonTextline : " + NonTextline);
                res.Nodes.Add("IgnoreBodyGestures : " + IgnoreBodyGestures);
                res.Nodes.Add("Text : " + Text);
                res.Nodes.Add("refText : " + refText + " " + ME2TalkFiles.findDataById(refText, true));
                res.Nodes.Add("GUIStyle : " + pcc.getNameEntry(GUIStyleValue));
                return(res);
            }
        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (values[0] is int strRef && values[1] is IMEPackage pcc)
            {
                switch (pcc.Game)
                {
                case MEGame.ME1:
                    return("ME1 StrRef not supported");

                case MEGame.ME2:
                    return($"\"{ME2TalkFiles.findDataById(strRef)}\"");

                case MEGame.ME3:
                    return($"\"{ME3TalkFiles.findDataById(strRef)}\"");

                case MEGame.UDK:
                    return("UDK StrRef not supported");
                }
            }
            return("No Data");
        }