예제 #1
0
 /// <summary>
 /// Sorts the items list (by item name by default).
 /// </summary>
 public void SortItems()
 {
     ItemsPanel.SortChildren();
     if (_categoryPanels != null)
     {
         for (int i = 0; i < _categoryPanels.Count; i++)
         {
             _categoryPanels[i].SortChildren();
         }
     }
 }
예제 #2
0
 /// <summary>
 /// Sort the groups and keeps <see cref="_groups"/> in sync
 /// </summary>
 private void SortGroups()
 {
     // Sort groups
     _groupsPanel.SortChildren();
     // Synchronize with _groups[]
     for (int i = 0, groupsIndex = 0; i < _groupsPanel.ChildrenCount; i++)
     {
         if (_groupsPanel.Children[i] is VisjectCMGroup group)
         {
             _groups[groupsIndex] = group;
             groupsIndex++;
         }
     }
 }
예제 #3
0
        /// <summary>
        /// Sort the groups and keeps <see cref="_groups"/> in sync
        /// </summary>
        private void SortGroups()
        {
            Profiler.BeginEvent("VisjectCM.SortGroups");

            // Sort groups
            _groupsPanel.SortChildren();

            // Synchronize with _groups[]
            for (int i = 0, groupsIndex = 0; i < _groupsPanel.ChildrenCount; i++)
            {
                if (_groupsPanel.Children[i] is VisjectCMGroup group)
                {
                    _groups[groupsIndex] = group;
                    groupsIndex++;
                }
            }

            Profiler.EndEvent();
        }