示例#1
0
        public void SetChildContentRecursive(IEnumerable <AbstractNode> contentEnum)
        {
            contentEnum = contentEnum ?? new AbstractNode[0];

            int index = 0;

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

            // Delete other nodes
            while (ChildRows.Count > count)
            {
                ChildRows.RemoveAt(count);
            }
        }
示例#2
0
 public void addChildRow(VirtualGridRow row)
 {
     if (!ChildRows.Contains(row))
     {
         ChildRows.Add(row);
         row.ParentRow = this;
     }
 }
示例#3
0
文件: Row.cs 项目: lzroc/Vixen
 public void AddChildRow(Row row)
 {
     ChildRows.Add(row);
     row.ParentRow = this;
     row.Visible   = TreeOpen;
 }