diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-02 01:13:08 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-02 01:13:08 +0100 |
| commit | 86238b1031ff73dc5f4be48033ba674189224e3a (patch) | |
| tree | d755c4447e61783bd3c39d960cc140903bb2d2f2 /src/GraphicObjects/GraphicObject.cs | |
| parent | 47fe040bb568b4eff544bb9f287481343216373e (diff) | |
debug
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index 69f19ca2..dedbe931 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -82,7 +82,6 @@ namespace Crow Picture _backgroundImage;
string _backgroundImagePath;
- string _template;
#endregion
#region public fields
@@ -434,19 +433,13 @@ namespace Crow foreach (PropertyInfo pi in this.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance)) {
if (pi.GetSetMethod () == null)
continue;
-
- bool isAttribute = false;
string name = "";
- Type valueType = null;
-
- MemberInfo mi = pi.GetGetMethod ();
object[] att = pi.GetCustomAttributes (false);
foreach (object o in att) {
XmlAttributeAttribute xaa = o as XmlAttributeAttribute;
- if (xaa != null) {
- isAttribute = true;
+ if (xaa != null) {
if (string.IsNullOrEmpty (xaa.AttributeName))
name = pi.Name;
else
@@ -745,7 +738,7 @@ namespace Crow {
Rectangle rBack = new Rectangle (Slot.Size);
- gr.Color = Background;
+ gr.SetSourceColor(Background);
CairoHelpers.CairoRectangle(gr,rBack,_cornerRadius);
gr.Fill ();
@@ -1322,17 +1315,12 @@ namespace Crow continue;
}
- object o = null;
-
if (pi.PropertyType.IsEnum) {
pi.SetValue (this, Enum.Parse (pi.PropertyType, attValue), null);
} else {
MethodInfo me = pi.PropertyType.GetMethod ("Parse", new Type[] { typeof(string) });
pi.SetValue (this, me.Invoke (null, new string[] { attValue }), null);
}
-
-
-
}
}
reader.MoveToElement();
|