Пример #1
0
 public void expand()
 {
     if (!_isExpanded)
     {
         TreeNodeEventArgs e = new TreeNodeEventArgs(this, TreeNodeAction.Expand);
         _owner._nodeBeforeExpand(this, e);
         if (!e.Cancel)
         {
             _isExpanded = true;
             _owner._nodeExpanded(this);
         }
     }
 }
Пример #2
0
 public void collapse()
 {
     if (_isExpanded)
     {
         TreeNodeEventArgs e = new TreeNodeEventArgs(this, TreeNodeAction.Collapse);
         _owner._nodeBeforeCollapse(this, e);
         if (!e.Cancel)
         {
             _isExpanded = false;
             _owner._nodeCollapsed(this);
         }
     }
 }