Пример #1
0
 private void UpdateSelectedItems()
 {
     for (int i = _selectedItems.Count - 1; i >= 0; i--)
     {
         DockItem item = _selectedItems[i];
         if (!_visibleItems.Contains(item))
         {
             _selectedItems.Remove(item);
         }
     }
 }
Пример #2
0
        private IEnumerable <DockItem> GetActiveItems()
        {
            foreach (DockItem item in _items)
            {
                if (_visibleItems.Contains(item) && !_selectedItems.Contains(item))
                {
                    yield return(item);
                }
            }

            foreach (DockItem item in _selectedItems)
            {
                Debug.Assert(_visibleItems.Contains(item));
                yield return(item);
            }
        }