コード例 #1
0
        /// <summary>
        /// Private form of SetContentRecursive. This form contains an extra parameter used by LoadChildren.
        /// This adds the childNodes parameter, which can be set to the children of a particular child element.
        /// </summary>
        /// <param name="process"></param>
        /// <param name="localVarList"></param>
        /// <param name="childNodes"></param>
        /// <param name="contentEnum"></param>
        private static void SetContentRecursive(VelerSoftware.SZC.Debugger.Debugger.Process process, VelerSoftware.SZC.TreeViewAdv.Tree.TreeViewAdv localVarList, IList <TreeNodeAdv> childNodes, IEnumerable <TreeNode> contentEnum)
        {
            contentEnum = contentEnum ?? new TreeNode[0];

            int index = 0;

            foreach (TreeNode content in contentEnum)
            {
                // Add or overwrite existing items
                if (index < childNodes.Count)
                {
                    // Overwrite
                    ((TreeViewVarNode)childNodes[index]).SetContentRecursive(content);
                }
                else
                {
                    // Add
                    childNodes.Add(new TreeViewVarNode(process, localVarList, content));
                }
                index++;
            }
            int count = index;

            // Delete other nodes
            while (childNodes.Count > count)
            {
                childNodes.RemoveAt(count);
            }
        }
コード例 #2
0
 public TreeViewVarNode(VelerSoftware.SZC.Debugger.Debugger.Process process, VelerSoftware.SZC.TreeViewAdv.Tree.TreeViewAdv _localVarList, TreeNode content)
     : base(_localVarList, new object())
 {
     this.process      = process;
     this.localVarList = _localVarList;
     SetContentRecursive(content);
 }
コード例 #3
0
        /// <summary>
        /// Function for setting the root treenode of a TreeViewAdv ment to display debugger variables.
        /// </summary>
        /// <param name="process">The process that contains the stackframe with the given variables.</param>
        /// <param name="localVarList">A list of local variables.</param>
        /// <param name="contentEnum">A list of local variables.</param>
        public static void SetContentRecursive(VelerSoftware.SZC.Debugger.Debugger.Process process, VelerSoftware.SZC.TreeViewAdv.Tree.TreeViewAdv localVarList, IEnumerable <TreeNode> contentEnum)
        {
            IList <TreeNodeAdv> childNodes = localVarList.Root.Children;

            SetContentRecursive(process, localVarList, childNodes, contentEnum);
        }