public MainWindow() { InitializeComponent(); SavedGames = new SavableList <SaveGame>(new FileInfo("savegames.json")); SavedGames.Load(); SetState(GameState.Load); }
public LoadGame() { InitializeComponent(); SavedGames = new SavableList <SaveGame>(new FileInfo("savegames.json")); SavedGames.Load(); foreach (SaveGame save in SavedGames) { SaveView view = new SaveView(save); view.GameSelected += View_GameSelected; PnlSaved.Children.Add(view); } }