Esempio n. 1
0
 public override bool Remove(T data)
 {
     if (base.Remove(data))
     {
         CollectionCountChanged?.Invoke(this, new CollectionHandlerEventArgs(NameCollection, "RemoveByData", data as Animals));
         return(true);
     }
     return(false);
 }
Esempio n. 2
0
 public override bool Remove(int index)
 {
     if (base.Remove(index))
     {
         var elem = base.GetByIndex(index);
         CollectionCountChanged?.Invoke(this, new CollectionHandlerEventArgs(NameCollection, "RemoveByKey", elem as Animals));
         return(true);
     }
     return(false);
 }
Esempio n. 3
0
        protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
        {
            if (IsDirty && _initialCount != Count)
            {
                CollectionCountChanged?.Invoke(this, System.EventArgs.Empty);
            }

            if (IsEditing)
            {
                UpdateIsUserModifiedFlag();
            }

            base.OnCollectionChanged(e);
        }
Esempio n. 4
0
 public virtual void OnCollectionCountChanged(object source, CollectionHandlerEventArgs <T> args)
 {
     CollectionCountChanged?.Invoke(source, args);
 }
Esempio n. 5
0
 public override void Add(T data)
 {
     CollectionCountChanged?.Invoke(this, new CollectionHandlerEventArgs(NameCollection, "Add", data as Animals));
     base.Add(data);
 }