async void InitializeDBs() { if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(new DependencyObject())) { //TODO: put some dummy components here for design time } // Trying to load this stuff at design time will throw an exception and crash the designer else { Datomatic datomatic = null; await Task.Run(() => { datomatic = new Datomatic(); }); IDBs.Add(datomatic); GamesDB gamesDB = null; await Task.Run(() => { gamesDB = new GamesDB(); }); IDBs.Add(gamesDB); GiantBomb giantBomb = null; await Task.Run(() => { giantBomb = new GiantBomb(); }); IDBs.Add(giantBomb); OpenVGDB openVGDB = null; await Task.Run(() => { openVGDB = new OpenVGDB(); }); IDBs.Add(openVGDB); Launchbox launchBox = null; await Task.Run(() => { launchBox = new Launchbox(); }); IDBs.Add(launchBox); } }
//public List<Art> LBArt { get; set; } //public List<Art> GDBArt { get; set; } //public List<Art> GBArt { get; set; } //public List<Art> OVGArt { get; set; } public ArtWindowViewModel(Release release) { Release = release; //LBArt = new List<Art>(); Launchbox launchbox = new Launchbox(); //R.Data.Releases.Include(x => x.LBRelease).Load(); //if (LBRelease != null) //{ // if (!String.IsNullOrEmpty(LBRelease.BoxFrontPath)) // { // LBArt.Add(new Art("Banner", LBRelease.BoxFrontURL, LBRelease.BoxFrontPath)); // } // if (!String.IsNullOrEmpty(LBRelease.BoxBackPath)) // { // LBArt.Add(new Art("Banner", LBRelease.BoxBackURL, LBRelease.BoxBackPath)); // } // if (!String.IsNullOrEmpty(LBRelease.BannerURL)) // { // LBArt.Add(new Art("Banner", LBRelease.BannerURL, LBRelease.BannerPath)); // } // if (!String.IsNullOrEmpty(LBRelease.Box3DURL)) // { // LBArt.Add(new Art("Banner", LBRelease.Box3DURL, LBRelease.Box3DPath)); // } // if (!String.IsNullOrEmpty(LBRelease.Cart3DURL)) // { // LBArt.Add(new Art("Banner", LBRelease.Cart3DURL, LBRelease.Cart3DPath)); // } // if (!String.IsNullOrEmpty(LBRelease.CartBackURL)) // { // LBArt.Add(new Art("Cartridge Back", LBRelease.CartBackURL, LBRelease.CartBackPath)); // } // if (!String.IsNullOrEmpty(LBRelease.ControlPanelURL)) // { // LBArt.Add(new Art("Control Panel", LBRelease.ControlPanelURL, LBRelease.ControlPanelPath)); // } // if (!String.IsNullOrEmpty(LBRelease.LogoURL)) // { // LBArt.Add(new Art("Clear Logo", LBRelease.LogoURL, LBRelease.LogoPath)); // } // if (!String.IsNullOrEmpty(LBRelease.MarqueeURL)) // { // LBArt.Add(new Art("Marquee", LBRelease.MarqueeURL, LBRelease.MarqueePath)); // } //} //if (GDBRelease != null) //{ // if (!String.IsNullOrEmpty(GDBRelease.BoxFrontPath)) // { // GDBArt.Add(new Art("Banner", GDBRelease.BoxFrontURL, GDBRelease.BoxFrontPath)); // } // if (!String.IsNullOrEmpty(GDBRelease.BoxBackPath)) // { // GDBArt.Add(new Art("Banner", GDBRelease.BoxBackURL, GDBRelease.BoxBackPath)); // } // if (!String.IsNullOrEmpty(GDBRelease.BannerURL)) // { // GDBArt.Add(new Art("Banner", GDBRelease.BannerURL, GDBRelease.BannerPath)); // } // if (!String.IsNullOrEmpty(GDBRelease.LogoURL)) // { // GDBArt.Add(new Art("Clear Logo", GDBRelease.LogoURL, GDBRelease.LogoPath)); // } // if (!String.IsNullOrEmpty(GDBRelease.)) // { // GDBArt.Add(new Art("Marquee", GDBRelease.MarqueeURL, GDBRelease.MarqueePath)); // } //} }