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 @@
-
+
-
diff --git a/MPF/Windows/MainWindow.xaml.cs b/MPF/Windows/MainWindow.xaml.cs
index 4a3db5b3..a7fb0127 100644
--- a/MPF/Windows/MainWindow.xaml.cs
+++ b/MPF/Windows/MainWindow.xaml.cs
@@ -598,14 +598,10 @@ namespace MPF.Windows
return;
}
+ // Verify dump output and save it
if (result)
{
- // Verify dump output and save it
- result = await Env.VerifyAndSaveDumpOutput(resultProgress,
- protectionProgress,
- EjectWhenDoneCheckBox.IsChecked,
- ShowDiscInformationWindow
- );
+ result = await Env.VerifyAndSaveDumpOutput(resultProgress, protectionProgress, ShowDiscInformationWindow);
}
else
{
@@ -832,7 +828,7 @@ namespace MPF.Windows
Env.CancelDumping();
CopyProtectScanButton.IsEnabled = true;
- if (EjectWhenDoneCheckBox.IsChecked == true)
+ if (Env.Options.EjectAfterDump == true)
{
LogOutput.VerboseLogLn($"Ejecting disc in drive {Env.Drive.Letter}");
Env.EjectDisc();
diff --git a/MPF/Windows/OptionsWindow.xaml b/MPF/Windows/OptionsWindow.xaml
index c44282e5..5b2a4879 100644
--- a/MPF/Windows/OptionsWindow.xaml
+++ b/MPF/Windows/OptionsWindow.xaml
@@ -76,7 +76,7 @@
-
+
+
+