Exemplo n.º 1
0
 public void Dispose()
 {
     if (_subtreeManager != null)
     {
         _subtreeManager.Dispose();
         _subtreeManager = null;
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Rebuilds the sub-tree
        /// </summary>
        private void RebuildSubTree()
        {
            // dispose of the old sub-tree manager
            if (_subtreeManager != null)
            {
                _subtreeManager.Dispose();
                _subtreeManager = null;
            }

            // get the sub-tree from the binding
            // note: there is no guarantee that successive calls will return the same ITree instance,
            // which is why we create a new BindingTreeLevelManager
            var subTree = _parentTree.Binding.GetSubTree(_item);

            if (subTree != null)
            {
                _subtreeManager = new BindingTreeLevelManager(subTree, this.Nodes, _bindingTreeView);
            }
        }