Example #1
0
        private void MenuItemLoad_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.DefaultExt = "*.xml";
            openFileDialog.Filter     = "eXtensible Markup Language file (.xml)|*.xml";
            if (openFileDialog.ShowDialog() ?? false)
            {
                this.saveXML = new Savegame(openFileDialog.FileName);
                this.ParentGrid.DataContext   = this.saveXML;
                this.SaveMenuItem.IsEnabled   = true;
                this.ModMenuItem.IsEnabled    = true;
                this.MainTabControl.IsEnabled = true;
                MainTabControl.SelectedIndex  = 0;
            }
        }
 private void MenuItemLoad_Click(object sender, RoutedEventArgs e)
 {
     OpenFileDialog openFileDialog = new OpenFileDialog();
     openFileDialog.DefaultExt = "*.xml";
     openFileDialog.Filter = "eXtensible Markup Language file (.xml)|*.xml";
     if (openFileDialog.ShowDialog() ?? false)
     {
         this.saveXML = new Savegame(openFileDialog.FileName);
         this.ParentGrid.DataContext = this.saveXML;
         this.SaveMenuItem.IsEnabled = true;
         this.ModMenuItem.IsEnabled = true;
         this.MainTabControl.IsEnabled = true;
         MainTabControl.SelectedIndex = 0;
     }
 }