Beispiel #1
0
 private void RefreshView(ContentTreeNode target)
 {
     if (target == _root)
     {
         // Special case for root folder
         List <ContentItem> items = new List <ContentItem>(8);
         for (int i = 0; i < _root.ChildrenCount; i++)
         {
             if (_root.GetChild(i) is ContentTreeNode node)
             {
                 items.Add(node.Folder);
             }
         }
         _view.ShowItems(items);
     }
     else
     {
         // Show folder contents
         _view.ShowItems(target.Folder.Children);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Refreshes the view.
 /// </summary>
 /// <param name="target">The target location.</param>
 public void RefreshView(ContentTreeNode target)
 {
     _view.IsSearching = false;
     if (target == _root)
     {
         // Special case for root folder
         List <ContentItem> items = new List <ContentItem>(8);
         for (int i = 0; i < _root.ChildrenCount; i++)
         {
             if (_root.GetChild(i) is ContentTreeNode node)
             {
                 items.Add(node.Folder);
             }
         }
         _view.ShowItems(items, _sortType, false, true);
     }
     else
     {
         // Show folder contents
         _view.ShowItems(target.Folder.Children, _sortType, false, true);
     }
 }