[Monodevelop-patches-list] r443 - trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Document/HighlightingStrategy
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sun Jan 11 13:46:32 EST 2004
Author: benm
Date: 2004-01-11 13:46:32 -0500 (Sun, 11 Jan 2004)
New Revision: 443
Modified:
trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Document/HighlightingStrategy/HighlightColor.cs
Log:
Speed up the buffer. Lesson *DO NOT USE REFLECTION*
Modified: trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Document/HighlightingStrategy/HighlightColor.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Document/HighlightingStrategy/HighlightColor.cs 2004-01-11 18:45:54 UTC (rev 442)
+++ trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Document/HighlightingStrategy/HighlightColor.cs 2004-01-11 18:46:32 UTC (rev 443)
@@ -106,10 +106,7 @@
Color ParseColorString(string colorName)
{
string[] cNames = colorName.Split('*');
- PropertyInfo myPropInfo = typeof(System.Drawing.SystemColors).GetProperty(cNames[0], BindingFlags.Public |
- BindingFlags.Instance |
- BindingFlags.Static);
- Color c = (Color)myPropInfo.GetValue(null, null);
+ Color c = Color.FromName (cNames [0]);
if (cNames.Length == 2) {
// hack : can't figure out how to parse doubles with '.' (culture info might set the '.' to ',')
More information about the Monodevelop-patches-list
mailing list