diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-08-07 13:36:50 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-08-07 13:36:50 +0200 |
| commit | 4d4a9116ea5c68b27f0b7c43db9682ab57738ae7 (patch) | |
| tree | c0761af45b3ec3c6e109ebc6b27a57e4fa4175c3 /src/GraphicObjects/TemplatedControl.cs | |
| parent | 3ba387d4424eac597c7d512664214dc2437007d0 (diff) | |
divers
Diffstat (limited to 'src/GraphicObjects/TemplatedControl.cs')
| -rw-r--r-- | src/GraphicObjects/TemplatedControl.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/GraphicObjects/TemplatedControl.cs b/src/GraphicObjects/TemplatedControl.cs index 9040ddeb..b325a0d2 100644 --- a/src/GraphicObjects/TemplatedControl.cs +++ b/src/GraphicObjects/TemplatedControl.cs @@ -27,6 +27,7 @@ using System.Diagnostics; using System.Linq; using System.Collections.Generic; using System.Text; +using System.Reflection; namespace Crow { @@ -174,6 +175,13 @@ namespace Crow xr.Read (); Type t = Type.GetType ("Crow." + xr.Name); + if (t == null) { + Assembly a = Assembly.GetEntryAssembly (); + foreach (Type expT in a.GetExportedTypes ()) { + if (expT.Name == xr.Name) + t = expT; + } + } GraphicObject go = (GraphicObject)Activator.CreateInstance (t); (go as IXmlSerializable).ReadXml (xr); |