From 76c01db81b9c8bc14d76393b515f07df37b754bc Mon Sep 17 00:00:00 2001 From: Ivan Zlatev Date: Fri, 30 May 2008 21:38:06 +0000 Subject: [PATCH] 2008-05-30 Ivan N. Zlatev * ControlBindingsConverter.cs: Fix 1.1 build. svn path=/trunk/mcs/; revision=104567 --- .../System.Design/System.Windows.Forms.Design/ChangeLog | 4 ++++ .../ControlBindingsConverter.cs | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mcs/class/System.Design/System.Windows.Forms.Design/ChangeLog b/mcs/class/System.Design/System.Windows.Forms.Design/ChangeLog index 27f1f3bceee..4e44810cacb 100644 --- a/mcs/class/System.Design/System.Windows.Forms.Design/ChangeLog +++ b/mcs/class/System.Design/System.Windows.Forms.Design/ChangeLog @@ -1,3 +1,7 @@ +2008-05-30 Ivan N. Zlatev + + * ControlBindingsConverter.cs: Fix 1.1 build. + 2008-05-30 Ivan N. Zlatev * ControlBindingsConverter.cs: Implementated just enough to avoid diff --git a/mcs/class/System.Design/System.Windows.Forms.Design/ControlBindingsConverter.cs b/mcs/class/System.Design/System.Windows.Forms.Design/ControlBindingsConverter.cs index 06eae065324..b5dbd6648ca 100644 --- a/mcs/class/System.Design/System.Windows.Forms.Design/ControlBindingsConverter.cs +++ b/mcs/class/System.Design/System.Windows.Forms.Design/ControlBindingsConverter.cs @@ -45,9 +45,14 @@ namespace System.Windows.Forms.Design { PropertyDescriptorCollection properties = new PropertyDescriptorCollection (new PropertyDescriptor[0]); ControlBindingsCollection collection = value as ControlBindingsCollection; - if (collection != null && collection.BindableComponent != null) { +#if NET_2_0 + object bindableComponent = collection.BindableComponent; +#else + object bindableComponent = collection.Control; +#endif + if (collection != null && bindableComponent != null) { foreach (PropertyDescriptor property in - TypeDescriptor.GetProperties (collection.BindableComponent, attributes)) { + TypeDescriptor.GetProperties (bindableComponent, attributes)) { if (((BindableAttribute) property.Attributes[typeof (BindableAttribute)]).Bindable) properties.Add (new DataBindingPropertyDescriptor (property, attributes, true)); } -- 2.25.1