Exemplo n.º 1
0
 public StartupWindow(MainWindow mainInstance)
 {
     MainInstance = mainInstance;
     InitializeComponent();
     SavedGames = new List<Models.SavedGame>();
     if(!String.IsNullOrEmpty(Properties.Settings.Default.SavePath))
     {
         uxSaveFile.Text = Properties.Settings.Default.SavePath;
         LoadSaves(Properties.Settings.Default.SavePath);
     }
 }
Exemplo n.º 2
0
        private void ButtonLoad_Click(object sender, RoutedEventArgs e)
        {
            string saveName = ((Button)sender).Tag.ToString();

            if (MainInstance != null)
            {
                MainInstance.Close();
            }

            var game = SavedGames.Single(x => x.SaveName == saveName);

            MainWindow main = new MainWindow(game);
            main.Show();
            this.Close();
        }