예제 #1
0
		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;
		}
예제 #2
0
		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));
		}
예제 #3
0
		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;
		}
예제 #4
0
		public int CompareTo(object o)
		{
			if(o == null)
				return -1;
			else
			{
				WrappedInt wInt = (WrappedInt)o;
				return this.val - wInt.Value;
				
			}
		}
예제 #5
0
 public int CompareTo(object o)
 {
     if (o == null)
     {
         return(-1);
     }
     else
     {
         WrappedInt wInt = (WrappedInt)o;
         return(this.val - wInt.Value);
     }
 }
예제 #6
0
 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));
 }
예제 #7
0
 /// <summary>
 /// Gets the visible position within the details section.
 /// </summary>
 /// <param name="value"></param>
 /// <returns></returns>
 public int IndexOf(WrappedInt value)
 {
     throw new NotSupportedException();
 }
예제 #8
0
 /// <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();
 }