2009-08-07 Ivan N. Zlatev <contact@i-nz.net>
authorIvan Zlatev <ivan@ivanz.com>
Fri, 7 Aug 2009 18:24:55 +0000 (18:24 -0000)
committerIvan Zlatev <ivan@ivanz.com>
Fri, 7 Aug 2009 18:24:55 +0000 (18:24 -0000)
* CurrencyManager.cs: Remove duplicate code.

svn path=/trunk/mcs/; revision=139582

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs

index b7c2deb05ed474bee54a0d131836b866c4b26906..f4b6148ca1a72945ca3dc3f1cc35849c29630ea3 100644 (file)
@@ -1,3 +1,7 @@
+2009-08-07  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * CurrencyManager.cs: Remove duplicate code.
+
 2009-08-07  Ivan N. Zlatev  <contact@i-nz.net>
 
        * DataGridView.cs, DataGridViewCell.cs, DataGridViewColumn.cs: 
index 919d7c4fa7831a7937f4ccfabff1080ef402a4d6..9465fe947cac4900124d9de5b2703ee326496efe 100644 (file)
@@ -116,30 +116,7 @@ namespace System.Windows.Forms {
 
                public override PropertyDescriptorCollection GetItemProperties ()
                {
-                       if (list is Array) {
-                               Type element = list.GetType ().GetElementType ();
-                               return TypeDescriptor.GetProperties (element);
-                       }
-
-                       if (list is ITypedList) {
-                               return ((ITypedList)list).GetItemProperties (null);
-                       }
-
-                       PropertyInfo [] props = data_source.GetType().GetProperties ();
-                       for (int i = 0; i < props.Length; i++) {
-                               if (props [i].Name == "Item") {
-                                       Type t = props [i].PropertyType;
-                                       if (t == typeof (object))
-                                               continue;
-                                       return GetBrowsableProperties (t);
-                               }
-                       }
-
-                       if (list.Count > 0) {
-                               return GetBrowsableProperties (list [0].GetType ());
-                       }
-                       
-                       return new PropertyDescriptorCollection (null);
+                       return ListBindingHelper.GetListItemProperties (list);
                }
 
                public override void RemoveAt (int index)