Example #1
0
 private void UpdateAutoHideItems()
 {
     CollectionUtil.Synchronize(GetAutoHideItems(),
                                _autoHideItems,
                                delegate(int index, DockItem item) { _autoHideItems.Insert(index, item); },
                                delegate(DockItem item) { _autoHideItems.Remove(item); });
 }
Example #2
0
 private void UpdateDocuments()
 {
     CollectionUtil.Synchronize(GetDocuments(),
                                _documents,
                                delegate(int index, DockItem item) { _documents.Insert(index, item); },
                                delegate(DockItem item) { _documents.Remove(item); });
 }
Example #3
0
        private void UpdateActiveItems()
        {
            CollectionUtil.Synchronize(GetActiveItems(),
                                       _activeItems,
                                       delegate(int index, DockItem item) { _activeItems.Insert(index, item); },
                                       delegate(DockItem item) { _activeItems.Remove(item); });

            Debug.Assert(_activeItems.Count == _visibleItems.Count);
        }
Example #4
0
        private void RemoveVisibleItem(DockItem item)
        {
            Debug.Assert(_visibleItems.Contains(item));
            int index = _visibleItems.IndexOf(item);

            if (index < _selectedItemIndex)
            {
                _selectedItemIndex--;
            }
            _visibleItems.Remove(item);
        }
Example #5
0
 private void UpdateSelectedItems()
 {
     for (int i = _selectedItems.Count - 1; i >= 0; i--)
     {
         DockItem item = _selectedItems[i];
         if (!_visibleItems.Contains(item))
         {
             _selectedItems.Remove(item);
         }
     }
 }