diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-25 10:37:27 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-25 11:31:21 +0100 |
| commit | 42fcd3657d6425005ed7f429fe9b73cfb6fcf1c6 (patch) | |
| tree | 87f081e4487881eb4be0142514033ab6c7bd9bd7 /src/GraphicObjects/GraphicObject.cs | |
| parent | f927821fd5678a29e6272c7ad4bd95e11957188b (diff) | |
remove duplicate of LoadDefault for templated controls, add DEBUG_LOAD
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index c643c343..23748b3a 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -454,7 +454,11 @@ namespace Crow /// <summary> Loads the default values from XML attributes default </summary> protected virtual void loadDefaultValues() - { + { + #if DEBUG_LOAD + Debug.WriteLine ("LoadDefValues for " + this.ToString ()); + #endif + Type thisType = this.GetType (); if (Interface.DefaultValuesLoader.ContainsKey(thisType.FullName)) { Interface.DefaultValuesLoader[thisType.FullName] (this); @@ -606,6 +610,7 @@ namespace Crow Interface.DefaultValuesLoader[thisType.FullName] = (Interface.loadDefaultInvoker)dm.CreateDelegate(typeof(Interface.loadDefaultInvoker)); Interface.DefaultValuesLoader[thisType.FullName] (this); + applyStyle (); } public virtual GraphicObject FindByName(string nameToFind){ @@ -1471,6 +1476,11 @@ namespace Crow Stream s = Interface.GetStreamFromPath (style); if (s == null) throw new Exception ("Style Path not found: " + style); + + #if DEBUG_LOAD + Debug.WriteLine ("ApplyStyle for " + this.ToString ()); + #endif + using (StreamReader sr = new StreamReader (s)) { while (!sr.EndOfStream) { string tmp = sr.ReadLine (); |