public PlanshetViewData SetPlanshetGalaxyInfo(IDbConnection connection, GalaxyInfoOut galaxy) { return(PlanshetBodyHelper.SetBody( galaxy, Resource.Galaxy, IdConstructor(galaxy.TypeNativeName, galaxy.Id), MapInfoTemplates[3], MapInfoTemplates[4])); }
public GalaxyInfoOut GetGalaxyInfo(IDbConnection connection, byte galaxyId) { var galaxy = _galaxyService.GetGalaxyById(connection, galaxyId, i => i); if (galaxy == null) { throw new ArgumentNullException(nameof(galaxy), Error.NoData); } var galaxyType = _gameTypeService.GetGGameType(connection, galaxy.TypeId); var sectorsIds = _gSectorsService.GetSectorsByGalaxy(connection, galaxyId, i => i.Id); var sectorsCount = sectorsIds.Count; var galaxyName = L10N.ExecuteTranslateNameOrDescr(galaxy.Translate, true, L10N.GetCurrentCulture()); var galaxyInfo = new GalaxyInfoOut { Id = galaxy.Id, GalaxyId = galaxy.Id, NativeName = galaxy.NativeName, GalaxyName = galaxyName, TranslateName = galaxyName, TextureTypeId = galaxy.TextureTypeId, TypeNativeName = galaxyType.Type, TypeTranslateName = galaxyName, SubtypeNativeName = galaxyType.SubType, SubtypeTranslateName = "Spirale", SpriteImages = new SpriteImages().GalaxyImages(galaxy.TextureTypeId), Description = L10N.ExecuteTranslateNameOrDescr(galaxy.Translate, false), ChildCount = (short)sectorsCount }; //todo сделать перевод galaxyInfo.SetComplexButtonView(); return(galaxyInfo); }