protected static string DialogLine2NodeText(DialogLine dialogLine)
        {
            string apx = null;

            if (dialogLine.TestSpecified)
            {
                apx = $"   | {dialogLine.Test}";
            }
            return($"{dialogLine.Key}: {dialogLine.Txt}{apx}");
        }
        protected bool AddSubdialog(int key, TreeNode parent, TreeNode root)
        {
            if (dialog == null)
            {
                return(false);
            }
            int keyIndex = dialog.GetKeyIndex(key);

            if (keyIndex < 0)
            {
                return(false);
            }
            for (int i = keyIndex; i < dialog.lines.Length; i++)
            {
                DialogLine dialogLine = dialog.lines[i];
                if (i == keyIndex)
                {
                    if (root == null)
                    {
                        if (parent == null)
                        {
                            root = this.tvContent.Nodes.Add(DialogLine2NodeText(dialogLine));
                        }
                        else
                        {
                            root = parent.Nodes.Add(DialogLine2NodeText(dialogLine));
                        }
                        root.Tag = dialogLine;
                    }
                }
                else
                {
                    if (!dialogLine.IsPCLine)
                    {
                        break;
                    }
                    TreeNode child = root.Nodes.Add(DialogLine2NodeText(dialogLine));
                    child.Tag = dialogLine;
                    if ((dialogLine.AnswerKey > 0) && (child.Level < 10))
                    {
                        AddSubdialog(dialogLine.AnswerKey, child, null);
                    }
                }
            }
            return(true);
        }
 protected static string DialogLine2DetailsText(DialogLine dialogLine)
 {
     return(dialogLine.ToDlgLine());
 }