* XplatUIX11.cs: Removed unused hwnd var in SetBorderStyle.
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / ControlBindingsCollection.cs
index 665fd70596806eacb97d891f201a674189870a0e..913744aacd60521178f62eed7ae3ad915fcbd8f7 100644 (file)
@@ -31,8 +31,8 @@ using System.Reflection;
 
 namespace System.Windows.Forms {
        [DefaultEvent("CollectionChanged")]
-       [Editor("System.Drawing.Design.UITypeEditor, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))]
-       [TypeConverter("System.Windows.Forms.Design.ControlBindingsConverter, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
+       [Editor("System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing, typeof(System.Drawing.Design.UITypeEditor))]
+       [TypeConverter("System.Windows.Forms.Design.ControlBindingsConverter, " + Consts.AssemblySystem_Design)]
        public class ControlBindingsCollection : BindingsCollection {
                #region Fields
                private Control control;
@@ -81,11 +81,11 @@ namespace System.Windows.Forms {
                        return res;
                }
 
-               public void Clear() {
+               public new void Clear() {
                        base.Clear();
                }
 
-               public void Remove(Binding binding) {
+               public new void Remove(Binding binding) {
                        if (binding == null) {
                                throw new NullReferenceException("The binding is null");
                        }
@@ -93,7 +93,7 @@ namespace System.Windows.Forms {
                        base.Remove(binding);
                }
 
-               public void RemoveAt(int index) {
+               public new void RemoveAt(int index) {
                        if (index < 0 || index >= base.List.Count) {
                                throw new ArgumentOutOfRangeException("index");
                        }
@@ -123,20 +123,21 @@ namespace System.Windows.Forms {
                        }
 
                        binding.SetControl (control);
+                       binding.Check (control.BindingContext);
                        base.AddCore (binding);
                }
 
-               protected override void ClearCore() {\r
-                       base.ClearCore ();\r
-               }\r
+               protected override void ClearCore() {
+                       base.ClearCore ();
+               }
 
-               protected override void RemoveCore(Binding dataBinding) {\r
+               protected override void RemoveCore(Binding dataBinding) {
                        if (dataBinding == null) {
                                throw new ArgumentNullException ("dataBinding");
                        }
 
-                       base.RemoveCore (dataBinding);\r
-               }\r
+                       base.RemoveCore (dataBinding);
+               }
                #endregion      // Protected Instance Methods
        }
 }