/// <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();
}
}