Assign values to base class.
authorAlistair Leslie-Hughes <leslie_alistair@hotmail.com>
Sun, 10 Jun 2012 10:59:42 +0000 (20:59 +1000)
committerMiguel de Icaza <miguel@gnome.org>
Tue, 19 Jun 2012 19:28:22 +0000 (15:28 -0400)
mcs/class/Managed.Windows.Forms/System.Windows.Forms/AxHost.cs

index 6159d5fb9649317871dcf4c0d971502ab4b6e80d..17b5568e906f707525ecd2118465088f02d3f6a5 100644 (file)
@@ -184,15 +184,20 @@ namespace System.Windows.Forms {
                #endregion      // AxHost.StateConverter Class
                #endregion      // AxHost Subclasses
 
+               private int flags;
+               private Guid clsid;
+
                #region Protected Constructors
-               protected AxHost (string clsid)
+
+               protected AxHost (string clsid) : this(clsid, 0)
                {
-                       throw new NotImplementedException("COM/ActiveX support is not implemented");
+
                }
 
                protected AxHost (string clsid, int flags)
                {
-                       throw new NotImplementedException("COM/ActiveX support is not implemented");
+                       this.clsid = new Guid(clsid);
+                       this.flags = flags;
                }
                #endregion      // Public Instance Properties
 
@@ -201,10 +206,10 @@ namespace System.Windows.Forms {
                [EditorBrowsable (EditorBrowsableState.Never)]
                public override Color BackColor {
                        get {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               return base.BackColor;
                        }
                        set {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               base.BackColor = value;
                        }
                }
                
@@ -213,11 +218,11 @@ namespace System.Windows.Forms {
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
                public override Image BackgroundImage {
                        get {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               return base.BackgroundImage;
                        }
 
                        set {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               base.BackgroundImage = value;
                        }
                }
 
@@ -226,11 +231,11 @@ namespace System.Windows.Forms {
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
                public override ImageLayout BackgroundImageLayout {
                        get {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               return base.BackgroundImageLayout;
                        }
 
                        set {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               base.BackgroundImageLayout = value;
                        }
                }
                
@@ -251,11 +256,11 @@ namespace System.Windows.Forms {
                [EditorBrowsable (EditorBrowsableState.Never)]
                public override ContextMenu ContextMenu {
                        get {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               return base.ContextMenu;
                        }
 
                        set {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               base.ContextMenu = value;
                        }
                }
                
@@ -263,11 +268,11 @@ namespace System.Windows.Forms {
                [EditorBrowsable (EditorBrowsableState.Never)]
                public override Cursor Cursor {
                        get {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               return base.Cursor;
                        }
 
                        set {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               base.Cursor = value;
                        }
                }
                
@@ -284,11 +289,11 @@ namespace System.Windows.Forms {
                [EditorBrowsable (EditorBrowsableState.Never)]
                public new virtual bool Enabled {
                        get {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               return base.Enabled;
                        }
 
                        set {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               base.Enabled = value;
                        }
                }
                
@@ -296,11 +301,11 @@ namespace System.Windows.Forms {
                [EditorBrowsable (EditorBrowsableState.Never)]
                public override Font Font {
                        get {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               return base.Font;
                        }
 
                        set {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               base.Font = value;
                        }
                }
                
@@ -308,11 +313,11 @@ namespace System.Windows.Forms {
                [EditorBrowsable (EditorBrowsableState.Never)]
                public override Color ForeColor {
                        get { 
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               return base.ForeColor;
                        }
 
                        set {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               base.ForeColor = value;
                        }
                }
                
@@ -330,10 +335,10 @@ namespace System.Windows.Forms {
                [EditorBrowsable (EditorBrowsableState.Never)]
                public new ImeMode ImeMode {
                        get { 
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               return base.ImeMode;
                        }
                        set { 
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               base.ImeMode = value;
                        }
                }
                
@@ -356,11 +361,12 @@ namespace System.Windows.Forms {
                [Localizable (true)]
                public new virtual bool RightToLeft {
                        get {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               return base.RightToLeft == System.Windows.Forms.RightToLeft.Yes;
                        }
 
                        set {
-                               throw new NotImplementedException("COM/ActiveX support is not implemented");
+                               base.RightToLeft = (value ? System.Windows.Forms.RightToLeft.Yes : 
+                                                       System.Windows.Forms.RightToLeft.No);
                        }
                }