Exemplo n.º 1
0
        private void LoadScanAreas()
        {
            areas             = new ScanAreaDictionary();
            heroes            = new ScanAreaDictionary();
            opponentHeroes    = new ScanAreaDictionary();
            decks             = new ScanAreaDictionary();
            arenaHeroes       = new ScanAreaDictionary();
            arenaWinsLookup   = new ScanAreaDictionary();
            arenaWinsLookup2  = new ScanAreaImageDictionary();
            arenaLossesLookup = new ScanAreaDictionary();

            scanAreaProvider.Load();
            scanareas = scanAreaProvider.GetScanAreas();

            foreach (var scanArea in scanareas)
            {
                var allareas = scanArea.Areas.ToDictionary(x => x.Key, x => x);
                foreach (var a in allareas)
                {
                    if (a.Key.StartsWith("hero_"))
                    {
                        InitAreas(a.Key, "hero_", scanArea, heroes, a);
                    }
                    else if (a.Key.StartsWith("opphero_"))
                    {
                        InitAreas(a.Key, "opphero_", scanArea, opponentHeroes, a);
                    }
                    else if (a.Key.StartsWith("deck_"))
                    {
                        InitAreas(a.Key, "deck_", scanArea, decks, a);
                    }
                    //else if (a.Key.StartsWith("arenahero_"))
                    //{
                    //    this.InitAreas(a.Key, "arenahero_", scanArea, this.arenaHeroes, a);
                    //}
                    else if (a.Key.StartsWith("arenawins_"))
                    {
                        InitAreas(a.Key, "arenawins_", scanArea, arenaWinsLookup, a);
                        InitImageAreas(a.Key, "arenawins_", scanArea, arenaWinsLookup2, a);
                    }
                    else if (a.Key.StartsWith("arenaloss_"))
                    {
                        InitAreas(a.Key, "arenaloss_", scanArea, arenaLossesLookup, a);
                    }
                    else if (a.Key.StartsWith("arena_hero_"))
                    {
                        InitAreas(a.Key, "arena_hero_", scanArea, arenaHeroes, a);
                    }
                    else
                    {
                        InitAreas(a.Key, string.Empty, scanArea, areas, a);
                    }
                }
            }
        }
Exemplo n.º 2
0
 private void Initialize()
 {
     scanAreaProvider.Load();
     scanAreas = new List <ScanAreas>(scanAreaProvider.GetScanAreas());
     RefreshAreas();
 }