Beispiel #1
0
        /// <summary>
        /// Event handler.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LoadMenuItem_Click(object sender, RoutedEventArgs e)
        {
            Microsoft.Win32.OpenFileDialog openFileDialog = new Microsoft.Win32.OpenFileDialog();
            openFileDialog.Filter           = "Database Files (*.db)|*.db|All files (*.*)|*.*";
            openFileDialog.InitialDirectory = Environment.CurrentDirectory;

            if (openFileDialog.ShowDialog() == true)
            {
                ViewModelLocator.LoadGameStateVM.UpdateGameStates(openFileDialog.FileName);

                gameStatesWindow = new GameStatesWindow();
                gameStatesWindow.ShowDialog();
            }
        }
Beispiel #2
0
 /// <summary>
 /// Event handler.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void LoadGameStateVM_OnGameLoad(object sender, EventArgs e)
 {
     gameStatesWindow.Close();
     gameStatesWindow = null;
 }