Пример #1
0
        private void ChangeCurrentMap(Map map)
        {
            // Don't change the map if it isn't different
            if (_currentMap == map)
            {
                return;
            }

            // Change and set a new map
            using (var mapImage = MapAssoc.GetMapImage(map))
                _mapGraphics.SetMap(mapImage);

            using (var mapBackground = MapAssoc.GetMapBackgroundImage(map))
                _mapGraphics.SetBackground(mapBackground);

            _currentMap = map;
        }