public static Cell Load(string filename, SkinsPool skins) { IntPtr skinPtr = skins.Pointer; if (skinPtr == IntPtr.Zero) { return(null); } IntPtr cellPtr = LoadXml_(filename, skinPtr); return(cellPtr != IntPtr.Zero ? new Cell(cellPtr) : null); }
protected GumApp() { string name = "browser/app2"; Skins = new SkinsPool(); Skins.LoadCss("./resx/" + name + ".css"); Root = Cell.Load("./resx/" + name + ".xml", Skins); int width = 680; // TODO - Read from root int height = 425; Window = Window.Open(width, height); Manager = Manager.Create(Root, Window); foreach (var method in GetType().GetMethods()) { BindEventAttribute[] attributes = (BindEventAttribute[])method.GetCustomAttributes(typeof(BindEventAttribute), false); foreach (var attribute in attributes) { Manager.Bind(attribute.Id, attrinute.Type, method); } } }