aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/TemplatedContainer.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-03-13 23:39:22 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2016-03-13 23:39:22 +0100
commite5bb6eaee1d61bdcc60ad0a0fb7e81911bd57e47 (patch)
tree91b6ed1cdd153033e2cb7c62c3e0ebf67284ef4c /src/GraphicObjects/TemplatedContainer.cs
parent09e26d9c08d22f31e1164237d63e2757822ff5d6 (diff)
search entry assembly for new crow widgets
Diffstat (limited to 'src/GraphicObjects/TemplatedContainer.cs')
-rw-r--r--src/GraphicObjects/TemplatedContainer.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/GraphicObjects/TemplatedContainer.cs b/src/GraphicObjects/TemplatedContainer.cs
index 3003d486..a845722a 100644
--- a/src/GraphicObjects/TemplatedContainer.cs
+++ b/src/GraphicObjects/TemplatedContainer.cs
@@ -21,6 +21,7 @@
using System;
using System.Xml.Serialization;
using System.Xml;
+using System.Reflection;
namespace Crow
{
@@ -84,6 +85,13 @@ namespace Crow
}
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);