예제 #1
0
        public SelectionHelperBehavior(FasterMultiSelectListBox listBox)
        {
            _listBox = listBox;

            _itemToNotifier = new Dictionary <object, BindingNotifyier>();
            _keyToItems     = new EditableLookup <object, object>();
            _itemToKey      = new Dictionary <object, object>();

            ListBoxSelectedItems_Initialized();
        }
예제 #2
0
        public static EditableLookup <K, T> ToEditableLookup <K, T>(this IEnumerable <IGrouping <K, T> > source)
        {
            var res = new EditableLookup <K, T>();

            foreach (var grouping in source)
            {
                res.Reset(grouping.Key, grouping);
            }

            return(res);
        }
예제 #3
0
        public AccessInterceptor(InterfaceState state, bool allowModifications = false)
        {
            _state = state;
            _allowModifications = allowModifications;

            _oldValues           = state.Properties.ToDictionary(p => p, p => state[p]);
            _oldCollectionValues = state.CollectionProperties
                                   .ToDictionary(p => p, p => (state[p] as IEnumerable).Cast <object>().ToArray());
            _collectionChanges = new EditableLookup <PropertyInfo, IChange>();
            _literalChanges    = new Dictionary <PropertyInfo, object>();
            _proxies           = new Dictionary <PropertyInfo, IStateList>();
        }
예제 #4
0
 public AvlList()
 {
     _tree  = new OrderedAvlTree <T>();
     _nodes = new EditableLookup <T, AvlTreeNode <T> >();
 }
예제 #5
0
 public void Clear()
 {
     _nodes = new EditableLookup <T, AvlTreeNode <T> >();
     _tree  = new OrderedAvlTree <T>();
 }
예제 #6
0
 public void Reset(IEnumerable <T> items)
 {
     _tree  = new OrderedAvlTree <T>(items);
     _nodes = _tree.ToEditableLookup(node => node.Item);
 }