[System.Drawing] Add ifdefs to source code used by Xamarin.iOS/Mac to make it compile...
[mono.git] / mcs / class / System.Drawing / System.Drawing / KnownColors.cs
index 22878791f56e1607a4bd6a677bcddc175362532c..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)
                {
@@ -272,9 +274,6 @@ namespace System.Drawing {
                        if ((n <= 0) || (n >= ArgbValues.Length)) {
                                // This is what it returns!
                                c = Color.FromArgb (0, 0, 0, 0);
-#if ONLY_1_1
-                               c.name = kc.ToString ();
-#endif
                                c.state |= (short) Color.ColorType.Named;
                        } else {
                                c = new Color ();
@@ -282,9 +281,6 @@ namespace System.Drawing {
                                if ((n < 27) || (n > 169))
                                        c.state |= (short) Color.ColorType.System;
                                c.Value = ArgbValues [n];
-#if ONLY_1_1
-                               c.name = GetName (n);
-#endif
                        }
                        c.knownColor = n;
                        return c;