public int Add(WrappedInt value) { OnChanging(new ListPropertyChangedEventArgs(ListPropertyChangedType.Add, -1, value, null)); int index = inner.Add(value); OnChanged(new ListPropertyChangedEventArgs(ListPropertyChangedType.Add, index, value, null)); return index; }
public void Remove(WrappedInt value) { int index = IndexOf(value); OnChanging(new ListPropertyChangedEventArgs(ListPropertyChangedType.Remove, index, value, null)); inner.Remove(value); OnChanged(new ListPropertyChangedEventArgs(ListPropertyChangedType.Remove, index, value, null)); }
public IntegerCollection Clone() { IntegerCollection coll = new IntegerCollection(); coll.inner = new ArrayList(); int count = Count; WrappedInt[] values = new WrappedInt[count]; for (int n = 0; n < count; n++) coll.inner.Add(this[n]); return coll; }
public int CompareTo(object o) { if(o == null) return -1; else { WrappedInt wInt = (WrappedInt)o; return this.val - wInt.Value; } }
public int CompareTo(object o) { if (o == null) { return(-1); } else { WrappedInt wInt = (WrappedInt)o; return(this.val - wInt.Value); } }
public void Insert(int index, WrappedInt value) { OnChanging(new ListPropertyChangedEventArgs(ListPropertyChangedType.Insert, index, value, null)); inner.Insert(index, value); OnChanged(new ListPropertyChangedEventArgs(ListPropertyChangedType.Insert, index, value, null)); }
/// <summary> /// Gets the visible position within the details section. /// </summary> /// <param name="value"></param> /// <returns></returns> public int IndexOf(WrappedInt value) { throw new NotSupportedException(); }
/// <summary> /// Checks if the group belongs to the details section and is visible /// </summary> /// <param name="value"></param> /// <returns></returns> public bool Contains(WrappedInt value) { throw new NotSupportedException(); }