From: jp Date: Fri, 1 Apr 2016 07:40:35 +0000 (+0200) Subject: allow loading custom widgets X-Git-Tag: v0.4~71^2~4 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=e2915c38e4340f6e6d565f81e34aafa8e20f54ee;p=jp%2Fcrow.git allow loading custom widgets --- diff --git a/src/Interface.cs b/src/Interface.cs index 05548587..97ab1c9d 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -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;