Exemplo n.º 1
0
 public void WriteGameInfoStreamLabels(GameInfoAndProgress gameInfo)
 {
     if (gameInfo != null)
     {
         File.WriteAllText(@Directory.GetCurrentDirectory() + "/stream-labels/game-info/title.txt", gameInfo.Title);
         File.WriteAllText(@Directory.GetCurrentDirectory() + "/stream-labels/game-info/console.txt", gameInfo.ConsoleName);
         File.WriteAllText(@Directory.GetCurrentDirectory() + "/stream-labels/game-info/developer.txt", gameInfo.Developer);
         File.WriteAllText(@Directory.GetCurrentDirectory() + "/stream-labels/game-info/publisher.txt", gameInfo.Publisher);
         File.WriteAllText(@Directory.GetCurrentDirectory() + "/stream-labels/game-info/genre.txt", gameInfo.Genre);
         File.WriteAllText(@Directory.GetCurrentDirectory() + "/stream-labels/game-info/release-date.txt", gameInfo.Released);
     }
 }
Exemplo n.º 2
0
 public void WriteStatsStreamLabels(UserSummary userSummary, GameInfoAndProgress gameInfoAndProgress)
 {
     if (userSummary != null)
     {
         File.WriteAllText(@Directory.GetCurrentDirectory() + "/stream-labels/stats/rank.txt", userSummary.Rank.ToString());
         File.WriteAllText(@Directory.GetCurrentDirectory() + "/stream-labels/stats/awards.txt", userSummary.Awards.ToString());
         File.WriteAllText(@Directory.GetCurrentDirectory() + "/stream-labels/stats/ratio.txt", userSummary.RetroRatio);
         File.WriteAllText(@Directory.GetCurrentDirectory() + "/stream-labels/stats/points.txt", userSummary.TotalPoints.ToString());
         File.WriteAllText(@Directory.GetCurrentDirectory() + "/stream-labels/stats/true-points.txt", userSummary.TotalTruePoints.ToString());
         File.WriteAllText(@Directory.GetCurrentDirectory() + "/stream-labels/stats/game-ratio.txt", gameInfoAndProgress.GameTruePointsPossible == 0 ? "0" : (Convert.ToDecimal(gameInfoAndProgress.GameTruePointsPossible) / Convert.ToDecimal(userSummary.GamePointsPossible)).ToString("0.00"));
         File.WriteAllText(@Directory.GetCurrentDirectory() + "/stream-labels/stats/game-points.txt", userSummary.GamePointsEarned == 0 ? "0 / 0" : userSummary.GamePointsEarned.ToString() + "/" + userSummary.GamePointsPossible.ToString());
         File.WriteAllText(@Directory.GetCurrentDirectory() + "/stream-labels/stats/game-true-points.txt", gameInfoAndProgress.GameTruePointsEarned == 0 ? "0 / 0" : gameInfoAndProgress.GameTruePointsEarned.ToString() + "/" + gameInfoAndProgress.GameTruePointsPossible.ToString());
         File.WriteAllText(@Directory.GetCurrentDirectory() + "/stream-labels/stats/game-achievements.txt", userSummary.Achievements.Count(achievement => achievement.HardcoreAchieved).ToString() + "/" + userSummary.Achievements.Count);
         File.WriteAllText(@Directory.GetCurrentDirectory() + "/stream-labels/stats/completed.txt", (userSummary.Achievements.Count == 0 ? 0 : Convert.ToInt32(Convert.ToDecimal(userSummary.Achievements.Count(achievement => achievement.HardcoreAchieved)) / Convert.ToDecimal(userSummary.Achievements.Count) * 200)) + " %");
     }
 }