diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-07-31 12:02:14 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-07-31 12:02:14 +0200 |
| commit | a508dabb5edb41304143bc135ad769d63164d026 (patch) | |
| tree | 20bdd7d24dc57a4efdf530d7200d78e9cb6d4199 /src/Interface.cs | |
| parent | 9804d49ef322db2623b3390311dd00e2afe649a1 (diff) | |
Style attribute in xml, add default value loader style key.
modifié : src/GraphicObjects/GraphicObject.cs
modifié : src/Interface.cs
Diffstat (limited to 'src/Interface.cs')
| -rw-r--r-- | src/Interface.cs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/Interface.cs b/src/Interface.cs index a83a5305..f67849a7 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -59,8 +59,7 @@ namespace Crow #endregion #region Static and constants - /// <summary> Used to prevent spurious loading of templates </summary> - internal static bool XmlSerializerInit = false; + internal bool XmlLoading = false; /// <summary> keep ressource path for debug msg </summary> internal static string CurrentGOMLPath = ""; //used in templatedControl @@ -216,7 +215,7 @@ namespace Crow return tmp; } - public static GraphicObject Load (Stream stream, Type type, object hostClass = null) + internal static GraphicObject Load (Stream stream, Type type, object hostClass = null) { #if DEBUG_LOAD Stopwatch loadingTime = new Stopwatch (); @@ -225,16 +224,16 @@ namespace Crow GraphicObject result; + CurrentInterface.XmlLoading = true; XmlSerializerNamespaces xn = new XmlSerializerNamespaces (); xn.Add ("", ""); - XmlSerializerInit = true; XmlSerializer xs = new XmlSerializer (type); - XmlSerializerInit = false; result = (GraphicObject)xs.Deserialize (stream); //result.DataSource = hostClass; + CurrentInterface.XmlLoading = false; #if DEBUG_LOAD FileStream fs = stream as FileStream; @@ -250,11 +249,6 @@ namespace Crow return result; } - public void InterfaceLoad(string path){ - GraphicObject tmp = Interface.Load (path, this); - AddWidget (tmp); - } - public GraphicObject LoadInterface (string path) { lock (UpdateMutex) { |