]> O.S.I.I.S - jp/crow.git/commitdiff
allow loading custom widgets
authorjp <jp_bruyere@hotmail.com>
Fri, 1 Apr 2016 07:40:35 +0000 (09:40 +0200)
committerjp <jp_bruyere@hotmail.com>
Fri, 1 Apr 2016 07:40:35 +0000 (09:40 +0200)
src/Interface.cs

index 0554858711d04d20eee5047d7e91f831e1eb107a..97ab1c9df6ccb27f4262853513c9ffbd69a6cea8 100644 (file)
@@ -153,6 +153,13 @@ namespace Crow
                        }
 
                        Type t = Type.GetType ("Crow." + root);
+                       if (t == null) {
+                               Assembly a = Assembly.GetEntryAssembly ();
+                               foreach (Type expT in a.GetExportedTypes ()) {
+                                       if (expT.Name == root)
+                                               t = expT;
+                               }
+                       }
 
                        stream.Seek (0, SeekOrigin.Begin);
                        return t;