diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-03-13 23:39:22 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-03-13 23:39:22 +0100 |
| commit | e5bb6eaee1d61bdcc60ad0a0fb7e81911bd57e47 (patch) | |
| tree | 91b6ed1cdd153033e2cb7c62c3e0ebf67284ef4c /src/GraphicObjects/Group.cs | |
| parent | 09e26d9c08d22f31e1164237d63e2757822ff5d6 (diff) | |
search entry assembly for new crow widgets
Diffstat (limited to 'src/GraphicObjects/Group.cs')
| -rw-r--r-- | src/GraphicObjects/Group.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/GraphicObjects/Group.cs b/src/GraphicObjects/Group.cs index 9d458c1d..7ea37161 100644 --- a/src/GraphicObjects/Group.cs +++ b/src/GraphicObjects/Group.cs @@ -5,6 +5,7 @@ using System.Xml.Serialization; using Cairo; using OpenTK.Input; using System.Diagnostics; +using System.Reflection; namespace Crow @@ -46,7 +47,7 @@ namespace Crow GraphicObject g = child as GraphicObject; Children.Add(g); g.Parent = this as GraphicObject; - ResolveBindings (); + g.ResolveBindings (); g.RegisterForLayouting (LayoutingType.Sizing | LayoutingType.ArrangeChildren); g.LayoutChanged += OnChildLayoutChanges; return (T)child; @@ -339,6 +340,13 @@ namespace Crow break; Type t = Type.GetType("Crow." + subTree.Name); + if (t == null) { + Assembly a = Assembly.GetEntryAssembly (); + foreach (Type expT in a.GetExportedTypes ()) { + if (expT.Name == subTree.Name) + t = expT; + } + } if (t == null) throw new Exception ("Crow." + subTree.Name + " type not found"); GraphicObject go = (GraphicObject)Activator.CreateInstance(t); |