Example #1
0
        /// <summary>
        /// Runs Emergency 5
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_RunEmergency_Click(object sender, RoutedEventArgs e)
        {
            ModTools.writeJsonModFile(dataContext.InstalledMods, dataContext.AppDataModificationsJsonFile);

            EmergencyInstallation myEmergencyInstallation = new EmergencyInstallation();

            try
            {
                System.Diagnostics.Process.Start(myEmergencyInstallation.getEmergencyInstallationPath() + @"\bin\em5_launcher.exe");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Example #2
0
 // Close the whole application if mainwindow is closed
 //
 private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     ModTools.writeJsonModFile(dataContext.InstalledMods, dataContext.AppDataModificationsJsonFile);
     App.Current.Shutdown();
 }