Bladeren bron

2002-05-01 Duncan Mak <[email protected]>

	    * ListChangedType.cs:
	    * ListChangedEventHandler.cs:
	    * ListChangedEventArgs.cs: Added to fix build.

svn path=/trunk/mcs/; revision=4212
Duncan Mak 24 jaren geleden
bovenliggende
commit
2243a28b34

+ 6 - 0
mcs/class/System/System.ComponentModel/ChangeLog

@@ -1,3 +1,9 @@
+2002-05-01  Duncan Mak  <[email protected]>
+
+	* ListChangedType.cs: 
+	* ListChangedEventHandler.cs: 
+	* ListChangedEventArgs.cs: Added to fix build.
+
 2002-05-01  Miguel de Icaza  <[email protected]>
 
 	* PropertyDescriptorCollection.cs: Added the IList explicit

+ 53 - 0
mcs/class/System/System.ComponentModel/ListChangedEventArgs.cs

@@ -0,0 +1,53 @@
+//
+// System.ComponentModel.ListChangedEventArgs.cs
+//
+// Author: Duncan Mak ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+using System.ComponentModel;
+
+namespace System.ComponentModel {
+	public class ListChangedEventArgs : EventArgs
+	{
+	
+		ListChangedType changedType;
+		int oldIndex;
+		int newIndex;
+	
+		public ListChangedEventArgs (ListChangedType listChangedType,
+					     int newIndex)
+		{
+			this.changedType = listChangedType;
+			this.newIndex = newIndex;
+		}
+	
+		[MonoTODO]
+		public ListChangedEventArgs (ListChangedType listChangedType,
+					     PropertyDescriptor propDesc)
+		{
+			this.changedType = listChangedType;
+		}
+	
+		public ListChangedEventArgs (ListChangedType listChangedType,
+					     int newIndex, int oldIndex)
+		{
+			this.changedType = listChangedType;
+			this.newIndex = newIndex;
+			this.oldIndex = oldIndex;
+		}
+		 
+		public ListChangedType ListChangedType {
+			get { return changedType; }
+		}
+	
+		public int OldIndex {
+			get { return oldIndex; }
+		}
+	
+		public int NewIndex {
+			get { return newIndex; }
+		}
+	}
+}

+ 15 - 0
mcs/class/System/System.ComponentModel/ListChangedEventHandler.cs

@@ -0,0 +1,15 @@
+//
+// System.ComponentModel.ListChangedEventHandler.cs
+//
+// Author: Duncan Mak ([email protected])
+// 
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.ComponentModel {
+	[Serializable]
+	public delegate void ListChangedEventHandler(object sender, 
+					     ListChangedEventArgs e);
+}						    

+ 23 - 0
mcs/class/System/System.ComponentModel/ListChangedType.cs

@@ -0,0 +1,23 @@
+//
+// System.ComponentModel.ListChangedType.cs
+//
+// Author: Duncan Mak ([email protected])
+//
+// (C) Ximian, Inc.
+// 
+
+namespace System.ComponentModel {
+	public enum ListChangedType {
+		Reset = 0,
+		ItemAdded = 1,
+		ItemDeleted = 2,
+		ItemMoved = 3,
+		ItemChanged = 4,
+		PropertyDescriptorAdded = 5,
+		PropertyDescriptorDeleted = 6,
+		PropertyDescriptorChanged = 7
+	}
+}
+			
+			
+