public async Task <IActionResult> SystemInfo(int id) { SolarSystem_V_Row solarSystem = _DBService.GetSolarSystem(id); // TODO: Eventually move this to SDE calls var solarSystemApi = await _ESIClient.Universe.GetSolarSystemInfoV4Async(id); var star = await _ESIClient.Universe.GetStarInfoV1Async(solarSystemApi.Model.StarId); List <Stargate> stargates = new List <Stargate>(); foreach (int stargateId in solarSystemApi.Model.Stargates) { var stargate = await _ESIClient.Universe.GetStargateInfoV1Async(stargateId); stargates.Add(stargate.Model); } List <Station_V_Row> stations = _DBService.GetStationsForSolarSystem(id); var model = new UniverseSystemInfoPageViewModel { System = solarSystem, System_API = solarSystemApi.Model, Star = star.Model, Stargates = stargates, Stations = stations, SetDestination = new UniverseSetDestinationModel(), OpenInfoModel = new UniverseSystemInfoItemTypeOpenInfoModel() }; return(View(model)); }
public async Task <ActionResult> SystemInfoSetSystemAsWaypoint(UniverseSystemInfoPageViewModel model) { AuthDTO auth = GetAuth(_ESIClient); _Log.LogDebug(String.Format("Logged in to retrieve Character Info for Character Id: {0}", auth.CharacterId)); await _ESIClient.UserInterface.SetAutopilotWaypointV2Async(auth, model.SetDestination.AddToBeginning, model.SetDestination.ClearOtherWaypoints, model.SetDestination.DestinationId); return(RedirectToAction("SystemInfo", new { id = model.SetDestination.DestinationId })); }
public async Task <ActionResult> SystemInfoOpenInfoWindowForItemType(UniverseSystemInfoPageViewModel model) { AuthDTO auth = GetAuth(_ESIClient); _Log.LogDebug(String.Format("Logged in to retrieve Character Info for Character Id: {0}", auth.CharacterId)); await _ESIClient.UserInterface.OpenInformationWindowV1Async(auth, model.OpenInfoModel.ItemTypeId); return(RedirectToAction("SystemInfo", new { id = model.OpenInfoModel.SystemId })); }