Exemplo n.º 1
0
 public MapResourceViewModel(List <Region> regions, Dictionary <int, int> regionToResource, ResourceTypeEnum resourceType)
 {
     ColorScale.AddRange(Colors.ResourceColors[resourceType]);
     ResourceName = resourceType.ToHumanReadable();
     Items        = regions
                    .Where(r => r.Polygon != null)
                    .Select(region => new GeoResourceMapItem(region, regionToResource[region.ID])).ToList();
 }