public new void Insert(int index, T item) { if (OnInsert != null) { NListInhEventArgs<T> vArgs = new NListInhEventArgs<T>(item, index); OnInsert.Invoke(this, vArgs); if (vArgs.Inherited) base.Insert(index, item); } else base.Insert(index, item); }
public new void Add(T item) { if (OnInsert != null) { NListInhEventArgs<T> vArgs = new NListInhEventArgs<T>(item, this.Count); OnInsert.Invoke(this, vArgs); if (vArgs.Inherited) base.Add(item); } else base.Add(item); }
private void HCDrawItems_OnInsert(object sender, NListInhEventArgs <HCCustomDrawItem> e) { if (FDeleteCount == 0) { } else { FDeleteStartDrawItemNo++; FDeleteCount--; this[e.Index] = e.Item; e.Inherited = false; } }
public new void RemoveAt(Int32 index) { T item = base[index]; if (OnDelete != null) { NListInhEventArgs<T> vArgs = new NListInhEventArgs<T>(item, index); OnDelete.Invoke(this, vArgs); if (vArgs.Inherited) base.RemoveAt(index); } else base.RemoveAt(index); }
public new void Remove(T item) { Int32 index = base.IndexOf(item); if (OnDelete != null) { NListInhEventArgs<T> vArgs = new NListInhEventArgs<T>(item, index); OnDelete.Invoke(this, vArgs); if (vArgs.Inherited) base.Remove(item); } else base.Remove(item); }
public new void InsertRange(int index, IEnumerable<T> collection) { if (OnInsert != null) { foreach (var item in collection) { NListInhEventArgs<T> vArgs = new NListInhEventArgs<T>(item, index); OnInsert.Invoke(this, vArgs); if (vArgs.Inherited) base.Insert(index, item); index++; } } else base.InsertRange(index, collection); }
public new void AddRange(IEnumerable <T> collection) { Int32 index = base.Count; if (OnInsert != null) { foreach (var item in collection) { NListInhEventArgs <T> vArgs = new NListInhEventArgs <T>(item, index); OnInsert.Invoke(this, vArgs); if (vArgs.Inherited) { base.Insert(index, item); } index++; } } else { base.AddRange(collection); } }