public async Task AddGameResultAsync(GameResultDTO result) { if (_leaderBoardStorageContainer == null) { _leaderBoardStorageContainer = new LeaderBoardStorageContainer(); } _leaderBoardStorageContainer.Results.Add(result); _leaderBoardStorageHelper.SaveASync(_leaderBoardStorageContainer, DimesoftMemoryFileName); }
private static string TryGetSecondaryTileArrayItem(GameResultDTO[] asArray, int index) { try { var asDto = asArray[index]; return string.Format("{0} Moves: {1}", asDto.Attempts, asDto.PlayerName); } catch (Exception e) { return ""; } }
public GameLeaderBoardItem( GameResultDTO gameResult) { _gameResult = gameResult; }
private static string TryGetAppTileArrayItem(GameResultDTO[] asArray, int index) { try { var asDto = asArray[index]; return string.Format("{0} [{1}] in {2} attempts by {3}", asDto.GameCategory, asDto.GameLevel, asDto.Attempts, asDto.PlayerName); } catch (Exception e) { return ""; } }