diff --git a/MPF.Library/Data/Options.cs b/MPF.Library/Data/Options.cs index b88ac160..d4cad255 100644 --- a/MPF.Library/Data/Options.cs +++ b/MPF.Library/Data/Options.cs @@ -216,6 +216,15 @@ namespace MPF.Data set { _settings["PromptForDiscInformation"] = value.ToString(); } } + /// + /// Eject the disc after dumping + /// + public bool EjectAfterDump + { + get { return GetBooleanSetting(_settings, "EjectAfterDump", true); } + set { _settings["EjectAfterDump"] = value.ToString(); } + } + /// /// Ignore fixed drives when populating the list /// diff --git a/MPF.Library/Utilities/DumpEnvironment.cs b/MPF.Library/Utilities/DumpEnvironment.cs index 48554d2f..7657d97b 100644 --- a/MPF.Library/Utilities/DumpEnvironment.cs +++ b/MPF.Library/Utilities/DumpEnvironment.cs @@ -421,13 +421,11 @@ namespace MPF.Utilities /// /// Optional result progress callback /// Optional protection progress callback - /// True if disc should be ejected after information is gathered, false otherwise /// Optional user prompt to deal with submsision information /// Result instance with the outcome public async Task VerifyAndSaveDumpOutput( IProgress resultProgress = null, IProgress protectionProgress = null, - bool? ejectDisc = null, Func showUserPrompt = null) { resultProgress?.Report(Result.Success("Gathering submission information... please wait!")); @@ -442,8 +440,7 @@ namespace MPF.Utilities resultProgress?.Report(Result.Success("Extracting information complete!")); // Eject the disc automatically if confugured to - // TODO: Make this an Option instead - if (ejectDisc == true) + if (Options.EjectAfterDump == true) { resultProgress?.Report(Result.Success($"Ejecting disc in drive {Drive.Letter}")); EjectDisc(); diff --git a/MPF/Windows/MainWindow.xaml b/MPF/Windows/MainWindow.xaml index 839d50f1..3dab11a9 100644 --- a/MPF/Windows/MainWindow.xaml +++ b/MPF/Windows/MainWindow.xaml @@ -92,11 +92,10 @@ - +