[System.Drawing] Add ifdefs to source code used by Xamarin.iOS/Mac to make it compile...
authorRolf Bjarne Kvinge <rolf@xamarin.com>
Fri, 20 Nov 2015 11:20:01 +0000 (12:20 +0100)
committerRolf Bjarne Kvinge <rolf@xamarin.com>
Fri, 20 Nov 2015 11:58:10 +0000 (12:58 +0100)
mcs/class/System.Drawing/System.Drawing/Color.cs
mcs/class/System.Drawing/System.Drawing/KnownColors.cs
mcs/class/System.Drawing/System.Drawing/Point.cs
mcs/class/System.Drawing/System.Drawing/Rectangle.cs
mcs/class/System.Drawing/System.Drawing/Size.cs
mcs/class/System.Drawing/System.Drawing/SizeF.cs

index df8cc18a6f8f3780f7ae21a84189d28af0bee6b5..6e72b0ecb69a28d608f239c4db1f2975cb8405be 100644 (file)
@@ -38,8 +38,10 @@ using System.Runtime.InteropServices;
 
 namespace System.Drawing 
 {
+#if !MONOTOUCH && !MONOMAC
        [TypeConverter(typeof(ColorConverter))]
        [Editor ("System.Drawing.Design.ColorEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))]
+#endif
        [Serializable]
        public struct Color {
 
index 46fda2a42439b0115c4ba7c158cd637dd27953ff..0440d8e30599a99504dc91416f1abaa2a5613aba 100644 (file)
@@ -210,6 +210,7 @@ namespace System.Drawing {
                        0xFF316AC5,     /* 174 - MenuHighlight */
                };
 
+#if !MONOTOUCH && !MONOMAC
                static KnownColors ()
                {
                        if (GDIPlus.RunningOnWindows ()) {
@@ -264,6 +265,7 @@ namespace System.Drawing {
                        ArgbValues [(int)KnownColor.MenuBar] = GetSysColor (GetSysColorIndex.COLOR_MENUBAR);
                        ArgbValues [(int)KnownColor.MenuHighlight] = GetSysColor (GetSysColorIndex.COLOR_MENUHIGHLIGHT);
                }
+#endif
 
                public static Color FromKnownColor (KnownColor kc)
                {
index 4737c4f1d455d97c26b28ffa11dc82468b0de1c4..88a8390b564906d2f34fc3785f8393481fd9dbc0 100644 (file)
@@ -40,7 +40,9 @@ namespace System.Drawing
 {
        [Serializable]  
        [ComVisible (true)]
+#if !MONOTOUCH && !MONOMAC
        [TypeConverter (typeof (PointConverter))]
+#endif
        public struct Point
        {
                // Private x and y coordinate fields.
index c8b3f6c7282d51da8ae314bcbc7a2230b7002888..c2ffbc80e5e647b589ed5aec55c96c1fb0703439 100644 (file)
@@ -39,7 +39,9 @@ namespace System.Drawing
 {
        [Serializable]
        [ComVisible (true)]
+#if !MONOTOUCH && !MONOMAC
        [TypeConverter (typeof (RectangleConverter))]
+#endif
        public struct Rectangle
        {
                private int x, y, width, height;
index 6e78072aa7dbb0ed396a83d4b19c0c9cc2dd0802..be8fda0ea8ef0b73bf815febb8e8d4e025eab3aa 100644 (file)
@@ -40,7 +40,9 @@ namespace System.Drawing
 {
        [Serializable]
        [ComVisible (true)]
+#if !MONOTOUCH && !MONOMAC
        [TypeConverter (typeof (SizeConverter))]
+#endif
        public struct Size
        { 
                
index 4c1c87f29aad44e4bed1beefb00a3ae833418196..38714d1c9968f30ae18e363a4c811a82dc38de99 100644 (file)
@@ -40,7 +40,9 @@ namespace System.Drawing
 {
        [Serializable]
        [ComVisible (true)]
+#if !MONOTOUCH && !MONOMAC
        [TypeConverter (typeof (SizeFConverter))]
+#endif
        public struct SizeF
        {
                // Private height and width fields.