public override bool Remove(T data) { if (base.Remove(data)) { CollectionCountChanged?.Invoke(this, new CollectionHandlerEventArgs(NameCollection, "RemoveByData", data as Animals)); return(true); } return(false); }
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); }
protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs e) { if (IsDirty && _initialCount != Count) { CollectionCountChanged?.Invoke(this, System.EventArgs.Empty); } if (IsEditing) { UpdateIsUserModifiedFlag(); } base.OnCollectionChanged(e); }
public virtual void OnCollectionCountChanged(object source, CollectionHandlerEventArgs <T> args) { CollectionCountChanged?.Invoke(source, args); }
public override void Add(T data) { CollectionCountChanged?.Invoke(this, new CollectionHandlerEventArgs(NameCollection, "Add", data as Animals)); base.Add(data); }