2008-02-04 Ivan N. Zlatev <contact@i-nz.net>
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / ImageIndexConverter.cs
index 36b8e6522e14265640dff6af675c65bfe9a249ed..4756d353f981c1a0fb7b7396b702556b29f38e31 100644 (file)
@@ -58,7 +58,10 @@ namespace System.Windows.Forms
                        string indexStr;
                        if (value != null && value is string) {
                                indexStr = (string) value;
-                               return Int32.Parse (indexStr);
+                               if (indexStr == "(none)")
+                                       return -1;
+                               else
+                                       return Int32.Parse (indexStr);
                        }
                        else
                                return base.ConvertFrom (context, culture, value);