Beispiel #1
0
 public GUIArea(Canvas2D canvas)
 {
     this.canvas = canvas;
     string[] dlls = Directory.GetFiles(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "*.dll", SearchOption.TopDirectoryOnly);
     foreach(var dll in dlls)
     {
         var ass = Assembly.LoadFile(dll);
         var types = ass.GetTypes();
         foreach(var t in types)
         {
             if(t.IsSubclassOf(typeof(O3DSkin)))
             {
                 skin = Activator.CreateInstance(t) as O3DSkin;
                 goto found;
             }
         }
     }
     found: ;
     canvas.Render += canvas_Render;
 }
Beispiel #2
0
 internal void SetSkin(O3DSkin skin)
 {
     this.skin = skin;
 }