Пример #1
0
 public static void createNewStation(Station newStation)
 {
     CurrentStations.Add(newStation);
     StationMapGrid[newStation.StationLocation].Visible = true;
     StationMapGrid[newStation.StationLocation].Text    = newStation.Name;
     Homepage.ConsoleTextBox.Text = "Awesome! We named your new station: " + Homepage.namingTextBox.Text.Trim();
 }
Пример #2
0
 private void MoveToNewStation(StationLocation?newStation)
 {
     if (CurrentStations.Count != 1)
     {
         throw new InvalidOperationException("Cannot move a threat that exists in more than 1 zone.");
     }
     if (!newStation.HasValue)
     {
         throw new InvalidOperationException("Moved wrongly.");
     }
     CurrentStations.Remove(CurrentStation);
     CurrentStations.Add(newStation.Value);
 }