/// <summary>The event called when a building is added or removed in a location.</summary> /// <param name="sender">The event sender.</param> /// <param name="e">The event arguments.</param> private void LocationEvents_LocationsChanged(object sender, EventArgsLocationsChanged e) { foreach (BuildableGameLocation location in e.Added.OfType <BuildableGameLocation>()) { foreach (Building building in location.buildings) { this.FixGarage(building, location); } } }
/// <summary>The method invoked when a location is added or removed.</summary> /// <param name="sender">The event sender.</param> /// <param name="e">The event arguments.</param> private void LocationEvents_LocationsChanged(object sender, EventArgsLocationsChanged e) { if (!this.EnableAutomation) { return; } this.VerboseLog("Location list changed, reloading all machines."); try { this.MachineGroups.Clear(); foreach (GameLocation location in CommonHelper.GetLocations()) { this.ReloadQueue.Add(location); } } catch (Exception ex) { this.HandleError(ex, "updating locations"); } }
/// <summary>The method invoked when the location is changed.</summary> /// <param name="sender">The event sender.</param> /// <param name="e">The event data.</param> private void LocationEvents_LocationsChanged(object sender, EventArgsLocationsChanged e) { getArtifactSpots(); }
private void LocationEvents_LocationsChanged(object sender, EventArgsLocationsChanged e) { this.Locations = CJB.GetAllLocations().ToArray(); }