diff --git a/CHANGELIST.md b/CHANGELIST.md index 35f78055..3c81545b 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -82,6 +82,7 @@ - Rename Protection to ProtectionTool - Move ProtectionTool to Core.Utilities - Move Drive to root of Core +- Move Options to root of Core ### 3.1.9a (2024-05-21) diff --git a/MPF.Core/DumpEnvironment.cs b/MPF.Core/DumpEnvironment.cs index 45d66091..e8e4d1ee 100644 --- a/MPF.Core/DumpEnvironment.cs +++ b/MPF.Core/DumpEnvironment.cs @@ -47,7 +47,7 @@ namespace MPF.Core /// /// Options object representing user-defined options /// - private readonly Data.Options _options; + private readonly Core.Options _options; /// /// Processor object representing how to process the outputs @@ -130,7 +130,7 @@ namespace MPF.Core /// /// /// - public DumpEnvironment(Data.Options options, + public DumpEnvironment(Core.Options options, string outputPath, Drive? drive, RedumpSystem? system, diff --git a/MPF.Core/Data/Options.cs b/MPF.Core/Options.cs similarity index 99% rename from MPF.Core/Data/Options.cs rename to MPF.Core/Options.cs index 397e7f64..2ccbbab4 100644 --- a/MPF.Core/Data/Options.cs +++ b/MPF.Core/Options.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; +using MPF.Core.Data; using MPF.Core.Utilities; using SabreTools.RedumpLib.Data; -namespace MPF.Core.Data +namespace MPF.Core { public class Options { diff --git a/MPF.Core/UI/ViewModels/CheckDumpViewModel.cs b/MPF.Core/UI/ViewModels/CheckDumpViewModel.cs index d0a09f27..6c667815 100644 --- a/MPF.Core/UI/ViewModels/CheckDumpViewModel.cs +++ b/MPF.Core/UI/ViewModels/CheckDumpViewModel.cs @@ -22,11 +22,11 @@ namespace MPF.Core.UI.ViewModels /// /// Access to the current options /// - public Data.Options Options + public Core.Options Options { get => _options; } - private readonly Data.Options _options; + private readonly Core.Options _options; /// /// Indicates if SelectionChanged events can be executed diff --git a/MPF.Core/UI/ViewModels/CreateIRDViewModel.cs b/MPF.Core/UI/ViewModels/CreateIRDViewModel.cs index 269065ad..cb8ce7e4 100644 --- a/MPF.Core/UI/ViewModels/CreateIRDViewModel.cs +++ b/MPF.Core/UI/ViewModels/CreateIRDViewModel.cs @@ -15,11 +15,11 @@ namespace MPF.Core.UI.ViewModels /// /// Access to the current options /// - public Data.Options Options + public Core.Options Options { get => _options; } - private readonly Data.Options _options; + private readonly Core.Options _options; /// /// Indicates if SelectionChanged events can be executed diff --git a/MPF.Core/UI/ViewModels/MainViewModel.cs b/MPF.Core/UI/ViewModels/MainViewModel.cs index 390e658d..463cff62 100644 --- a/MPF.Core/UI/ViewModels/MainViewModel.cs +++ b/MPF.Core/UI/ViewModels/MainViewModel.cs @@ -19,7 +19,7 @@ namespace MPF.Core.UI.ViewModels /// /// Access to the current options /// - public Data.Options Options + public Core.Options Options { get => _options; set @@ -28,7 +28,7 @@ namespace MPF.Core.UI.ViewModels OptionsLoader.SaveToConfig(_options); } } - private Data.Options _options; + private Core.Options _options; /// /// Indicates if SelectionChanged events can be executed @@ -962,13 +962,13 @@ namespace MPF.Core.UI.ViewModels /// /// Indicates if the settings were saved or not /// Options representing the new, saved values - public void UpdateOptions(bool savedSettings, Data.Options? newOptions) + public void UpdateOptions(bool savedSettings, Core.Options? newOptions) { // Get which options to save var optionsToSave = savedSettings ? newOptions : Options; // Ensure the first run flag is unset - var continuingOptions = new Data.Options(optionsToSave) { FirstRun = false }; + var continuingOptions = new Core.Options(optionsToSave) { FirstRun = false }; this.Options = continuingOptions; // If settings were changed, reinitialize the UI diff --git a/MPF.Core/Utilities/InfoTool.cs b/MPF.Core/Utilities/InfoTool.cs index 8138c9e2..68eacf81 100644 --- a/MPF.Core/Utilities/InfoTool.cs +++ b/MPF.Core/Utilities/InfoTool.cs @@ -85,7 +85,7 @@ namespace MPF.Core.Utilities /// Optional progress callback /// Detected copy protection(s) if possible, null on error internal static async Task<(string?, Dictionary>?)> GetCopyProtection(Drive? drive, - Data.Options options, + Core.Options options, IProgress? progress = null) { if (options.ScanForProtection && drive?.Name != null) diff --git a/MPF.Core/Utilities/ProtectionTool.cs b/MPF.Core/Utilities/ProtectionTool.cs index 54ee6dd0..fdef3753 100644 --- a/MPF.Core/Utilities/ProtectionTool.cs +++ b/MPF.Core/Utilities/ProtectionTool.cs @@ -21,7 +21,7 @@ namespace MPF.Core.Utilities /// Optional progress callback /// Set of all detected copy protections with an optional error string public static async Task<(Dictionary>?, string?)> RunProtectionScanOnPath(string path, - Data.Options options, + Core.Options options, IProgress? progress = null) { try diff --git a/MPF.Core/Utilities/SubmissionInfoTool.cs b/MPF.Core/Utilities/SubmissionInfoTool.cs index 35bfd0ab..14cbbcb0 100644 --- a/MPF.Core/Utilities/SubmissionInfoTool.cs +++ b/MPF.Core/Utilities/SubmissionInfoTool.cs @@ -44,7 +44,7 @@ namespace MPF.Core.Utilities Drive? drive, RedumpSystem? system, MediaType? mediaType, - Data.Options options, + Core.Options options, BaseProcessor processor, IProgress? resultProgress = null, IProgress? protectionProgress = null) @@ -149,9 +149,9 @@ namespace MPF.Core.Utilities /// Existing SubmissionInfo object to fill /// Optional result progress callback #if NET40 - public static bool FillFromRedump(Data.Options options, SubmissionInfo info, IProgress? resultProgress = null) + public static bool FillFromRedump(Core.Options options, SubmissionInfo info, IProgress? resultProgress = null) #else - public async static Task FillFromRedump(Data.Options options, SubmissionInfo info, IProgress? resultProgress = null) + public async static Task FillFromRedump(Core.Options options, SubmissionInfo info, IProgress? resultProgress = null) #endif { // If no username is provided diff --git a/MPF.Test/Modules/DiscImageCreatorTests.cs b/MPF.Test/Modules/DiscImageCreatorTests.cs index 7c5ecc69..e5fd3439 100644 --- a/MPF.Test/Modules/DiscImageCreatorTests.cs +++ b/MPF.Test/Modules/DiscImageCreatorTests.cs @@ -1,6 +1,6 @@ using System; using System.Collections.Generic; -using MPF.Core.Data; +using MPF.Core; using MPF.Core.ExecutionContexts.DiscImageCreator; using SabreTools.RedumpLib.Data; using Xunit; diff --git a/MPF.UI.Core/Windows/DiscInformationWindow.xaml.cs b/MPF.UI.Core/Windows/DiscInformationWindow.xaml.cs index 259524e6..10e3c92e 100644 --- a/MPF.UI.Core/Windows/DiscInformationWindow.xaml.cs +++ b/MPF.UI.Core/Windows/DiscInformationWindow.xaml.cs @@ -1,7 +1,7 @@ using System.Linq; using System.Windows; using System.Windows.Controls; -using MPF.Core.Data; +using MPF.Core; using MPF.Core.UI.ViewModels; using MPF.Core.Utilities; using MPF.UI.Core.UserControls; diff --git a/MPF.UI.Core/Windows/OptionsWindow.xaml.cs b/MPF.UI.Core/Windows/OptionsWindow.xaml.cs index 9e895bfb..9ad1fb62 100644 --- a/MPF.UI.Core/Windows/OptionsWindow.xaml.cs +++ b/MPF.UI.Core/Windows/OptionsWindow.xaml.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Forms; -using MPF.Core.Data; +using MPF.Core; using MPF.Core.UI.ViewModels; using WPFCustomMessageBox;