public static void Load(string path) { if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } var gamesFile = path + "Games.txt"; Games.Initialise(GamesData.Load(gamesFile)); var playersFile = path + "Players.txt"; Players.Initialise(PlayersData.Load(playersFile)); var retiredPlayersFile = path + "RetiredPlayers.txt"; RetiredPlayers.Initialise(RetiredPlayersData.Load(retiredPlayersFile)); }
public static void Load() { Players.Initialise(PlayersData.Load()); Games.Initialise(GamesData.Load()); }
public ActionResult Delete(string Id) { GamesData.Delete(Id); Games.Initialise(GamesData.Load()); return(Redirect("/Games")); }