private void UpdateAutoHideItems() { CollectionUtil.Synchronize(GetAutoHideItems(), _autoHideItems, delegate(int index, DockItem item) { _autoHideItems.Insert(index, item); }, delegate(DockItem item) { _autoHideItems.Remove(item); }); }
private void UpdateDocuments() { CollectionUtil.Synchronize(GetDocuments(), _documents, delegate(int index, DockItem item) { _documents.Insert(index, item); }, delegate(DockItem item) { _documents.Remove(item); }); }
private void InsertVisibleItem(int index, DockItem item) { Debug.Assert(!_visibleItems.Contains(item)); if (index < _selectedItemIndex) { _selectedItemIndex++; } _visibleItems.Insert(index, item); }
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); }