예제 #1
0
 /// <summary>
 /// Adds the given value to the selection collection and notifies the listeners that the selection has changed.
 /// </summary>
 /// <param name="value"></param>
 public void Add(T value)
 {
     if (ChangedItems == null)
     {
         ChangedItems = new MultipleSelectionCache <T>();
     }
     internalValues.Add(value);
     ChangedItems.addedValues.Add(value);
     Raise();
 }
예제 #2
0
 /// <summary>
 /// Attempts to remove the specified value from the selection, and if successful, it nofifies the listeners that the selection has changed.
 /// </summary>
 /// <param name="value"></param>
 public void Remove(T value)
 {
     if (internalValues.Remove(value))
     {
         if (ChangedItems == null)
         {
             ChangedItems = new MultipleSelectionCache <T>();
         }
         ChangedItems.removedValues.Add(value);
         Raise();
     }
 }
예제 #3
0
 protected override void OnSelectedValueChanged()
 {
     ChangedItems = null;
 }