RemoveDummyNode() public method

Removes the dummy node from the parent node.
public RemoveDummyNode ( ) : void
return void
示例#1
0
 /// <summary>
 /// Populates the Directory structure for a given path.
 /// </summary>
 /// <param name="parent">Parent node for which the data is to retrieve</param>
 /// <param name="e"><c>TreeViewCancelEventArgs</c> to abort current expanding.</param>
 protected virtual void RequestChildNodes(TreeNodePath parent, System.Windows.Forms.TreeViewCancelEventArgs e)
 {
     if (parent == null)
     {
         throw new ArgumentNullException("parent");
     }
     if (e == null)
     {
         throw new ArgumentNullException("e");
     }
     //
     if (!parent.HasDummyNode || parent.Path == null)
     {
         return;
     }
     // everything ok, here we go
     this.BeginUpdate();
     try
     {
         parent.RemoveDummyNode();
         // if we have not scanned this folder before
         _dataProvider.RequestChildNodes(parent, e);
     }
     finally
     {
         this.EndUpdate();
     }
 }
 /// <summary>
 ///   Populates the Directory structure for a given path.
 /// </summary>
 /// <param name = "parent"></param>
 protected virtual void GetSubDirs(TreeNodePath parent, TreeViewCancelEventArgs e)
 {
     if (parent.Path == null)
     {
         return;
     }
     // everything ok, here we go
     BeginUpdate();
     try
     {
         parent.RemoveDummyNode();
         // if we have not scanned this folder before
         if (parent.Nodes.Count == 0)
         {
             _dataProvider.RequestSubDirs(_helper, parent, e);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         EndUpdate();
     }
 }
 /// <summary>
 /// Populates the Directory structure for a given path.
 /// </summary>
 /// <param name="parent">Parent node for which the data is to retrieve</param>
 /// <param name="e"><c>TreeViewCancelEventArgs</c> to abort current expanding.</param>
 protected virtual void RequestChildNodes(TreeNodePath parent, System.Windows.Forms.TreeViewCancelEventArgs e)
 {
     if (parent == null) throw new ArgumentNullException("parent");
     if (e == null) throw new ArgumentNullException("e");
     //
     if (!parent.HasDummyNode || parent.Path == null) return;
     // everything ok, here we go
     this.BeginUpdate();
     try
     {
         parent.RemoveDummyNode();
         // if we have not scanned this folder before
         _dataProvider.RequestChildNodes(parent, e);
     }
     finally
     {
         this.EndUpdate();
     }
 }
 /// <summary>
 ///   Populates the Directory structure for a given path.
 /// </summary>
 /// <param name = "parent"></param>
 protected virtual void GetSubDirs(TreeNodePath parent, TreeViewCancelEventArgs e)
 {
     if (parent.Path == null) return;
       // everything ok, here we go
       BeginUpdate();
       try
       {
     parent.RemoveDummyNode();
     // if we have not scanned this folder before
     if (parent.Nodes.Count == 0)
     {
       _dataProvider.RequestSubDirs(_helper, parent, e);
     }
       }
       catch (Exception ex)
       {
     throw ex;
       }
       finally
       {
     EndUpdate();
       }
 }