示例#1
0
 public MainWindow()
 {
     InitializeComponent();
     SavedGames = new SavableList <SaveGame>(new FileInfo("savegames.json"));
     SavedGames.Load();
     SetState(GameState.Load);
 }
示例#2
0
        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);
            }
        }