private IEnumerator <ShellItem> GetFolderEnumerator(ShellItem folder) { var filter = SHCONTF.FOLDERS; if (ShouldShowHidden()) { filter |= SHCONTF.INCLUDEHIDDEN; } return(folder.GetEnumerator(filter)); }
void CreateItems(ShellItem folder, int indent) { IEnumerator <ShellItem> e = folder.GetEnumerator( SHCONTF.FOLDERS | SHCONTF.INCLUDEHIDDEN); while (e.MoveNext()) { if (ShouldCreateItem(e.Current)) { CreateItem(e.Current, indent); } } }