SW: Prevent application exit when emulator is running

This commit is contained in:
Daniel Dugger 2019-12-28 13:56:11 -05:00
parent 03f56a6412
commit f18f658755
1 changed files with 7 additions and 0 deletions

View File

@ -44,6 +44,13 @@ namespace KFDtool.Gui
void MainWindow_Closing(object sender, CancelEventArgs e)
{
if (Settings.InProgressScreen != string.Empty)
{
UpdateSelectionOnly(Settings.InProgressScreen);
MessageBox.Show("Unable to exit - please stop the current operation", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
e.Cancel = true;
}
Logger.Info("stopping");
// have to stop the WMI watcher or a RCW exception will be thrown