예제 #1
0
        private TreeNode CreateNode(IIdentifiable item, TreeNode parent = null)
        {
            TreeNode t = new TreeNode(item.ToString());

            t.Tag = item;
            t.Collapse();
            if (parent == null)
            {
                tvRegions.Nodes.Add(t);
            }
            else
            {
                parent.Nodes.Add(t);
            }
            return(t);
        }