[Monodevelop-patches-list] r2298 - trunk/MonoDevelop/Unused/Gdl
John Luke <jluke@cfl.rr.com>
jluke at mono-cvs.ximian.com
Sun Mar 6 21:08:42 EST 2005
Author: jluke
Date: 2005-03-06 21:08:42 -0500 (Sun, 06 Mar 2005)
New Revision: 2298
Modified:
trunk/MonoDevelop/Unused/Gdl/DockLayout.cs
Log:
special case enums and bools
Modified: trunk/MonoDevelop/Unused/Gdl/DockLayout.cs
===================================================================
--- trunk/MonoDevelop/Unused/Gdl/DockLayout.cs 2005-03-07 01:57:26 UTC (rev 2297)
+++ trunk/MonoDevelop/Unused/Gdl/DockLayout.cs 2005-03-07 02:08:42 UTC (rev 2298)
@@ -554,8 +554,14 @@
exported.Add (p);
}
- foreach (PropertyInfo p in exported)
- element.SetAttribute (p.Name.ToLower (), p.GetValue (obj, null).ToString ());
+ foreach (PropertyInfo p in exported) {
+ if (p.PropertyType.IsSubclassOf (typeof (System.Enum)))
+ element.SetAttribute (p.Name.ToLower (), p.GetValue (obj, null).ToString ().ToLower ());
+ else if (p.PropertyType == typeof (bool))
+ element.SetAttribute (p.Name.ToLower (), ((bool) p.GetValue (obj, null)) ? "yes" : "no");
+ else
+ element.SetAttribute (p.Name.ToLower (), p.GetValue (obj, null).ToString ());
+ }
parent.AppendChild (element);
More information about the Monodevelop-patches-list
mailing list