示例#1
0
 void areaSelectionToggled(object sender, EventArgs e)
 {
     ScreenItemToggleButton sndr = (ScreenItemToggleButton)sender;
     if (sndr == controls.UrbanAreaSelection)
     {
         _currentMap = SimulationScreenMap.Urban;
         controls.SelectedBuilding.Building = _playerGame.UrbanMap.CurrentlySelectedBuilding;
     }
     else if (sndr == controls.CountryAreaSelection)
     {
         _currentMap = SimulationScreenMap.Country;
         controls.SelectedBuilding.Building = _playerGame.CountryMap.CurrentlySelectedBuilding;
     }
     else if (sndr == controls.OceanAreaSelection)
     {
         _currentMap = SimulationScreenMap.Ocean;
         controls.SelectedBuilding.Building = _playerGame.OceanMap.CurrentlySelectedBuilding;
     }
 }
示例#2
0
 void areaSelectionToggled(object sender, EventArgs e)
 {
     ScreenItemToggleButton sndr = (ScreenItemToggleButton)sender;
     if (sndr == _screenItems["areaSelection-Urban"])
     {
         _currentMap = SimulationScreenMap.Urban;
         ((ScreenItemToggleButton)_screenItems["areaSelection-Country"]).Value = false;
         ((ScreenItemToggleButton)_screenItems["areaSelection-Ocean"]).Value = false;
     }
     else if (sndr == _screenItems["areaSelection-Country"])
     {
         _currentMap = SimulationScreenMap.Country;
         ((ScreenItemToggleButton)_screenItems["areaSelection-Urban"]).Value = false;
         ((ScreenItemToggleButton)_screenItems["areaSelection-Ocean"]).Value = false;
     }
     else if (sndr == _screenItems["areaSelection-Ocean"])
     {
         _currentMap = SimulationScreenMap.Ocean;
         ((ScreenItemToggleButton)_screenItems["areaSelection-Urban"]).Value = false;
         ((ScreenItemToggleButton)_screenItems["areaSelection-Country"]).Value = false;
     }
 }