mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Move Options to root of Core
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace MPF.Core
|
||||
/// <summary>
|
||||
/// Options object representing user-defined options
|
||||
/// </summary>
|
||||
private readonly Data.Options _options;
|
||||
private readonly Core.Options _options;
|
||||
|
||||
/// <summary>
|
||||
/// Processor object representing how to process the outputs
|
||||
@@ -130,7 +130,7 @@ namespace MPF.Core
|
||||
/// <param name="type"></param>
|
||||
/// <param name="internalProgram"></param>
|
||||
/// <param name="parameters"></param>
|
||||
public DumpEnvironment(Data.Options options,
|
||||
public DumpEnvironment(Core.Options options,
|
||||
string outputPath,
|
||||
Drive? drive,
|
||||
RedumpSystem? system,
|
||||
|
||||
@@ -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
|
||||
{
|
||||
@@ -22,11 +22,11 @@ namespace MPF.Core.UI.ViewModels
|
||||
/// <summary>
|
||||
/// Access to the current options
|
||||
/// </summary>
|
||||
public Data.Options Options
|
||||
public Core.Options Options
|
||||
{
|
||||
get => _options;
|
||||
}
|
||||
private readonly Data.Options _options;
|
||||
private readonly Core.Options _options;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if SelectionChanged events can be executed
|
||||
|
||||
@@ -15,11 +15,11 @@ namespace MPF.Core.UI.ViewModels
|
||||
/// <summary>
|
||||
/// Access to the current options
|
||||
/// </summary>
|
||||
public Data.Options Options
|
||||
public Core.Options Options
|
||||
{
|
||||
get => _options;
|
||||
}
|
||||
private readonly Data.Options _options;
|
||||
private readonly Core.Options _options;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if SelectionChanged events can be executed
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace MPF.Core.UI.ViewModels
|
||||
/// <summary>
|
||||
/// Access to the current options
|
||||
/// </summary>
|
||||
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;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if SelectionChanged events can be executed
|
||||
@@ -962,13 +962,13 @@ namespace MPF.Core.UI.ViewModels
|
||||
/// </summary>
|
||||
/// <param name="savedSettings">Indicates if the settings were saved or not</param>
|
||||
/// <param name="newOptions">Options representing the new, saved values</param>
|
||||
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
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace MPF.Core.Utilities
|
||||
/// <param name="progress">Optional progress callback</param>
|
||||
/// <returns>Detected copy protection(s) if possible, null on error</returns>
|
||||
internal static async Task<(string?, Dictionary<string, List<string>>?)> GetCopyProtection(Drive? drive,
|
||||
Data.Options options,
|
||||
Core.Options options,
|
||||
IProgress<ProtectionProgress>? progress = null)
|
||||
{
|
||||
if (options.ScanForProtection && drive?.Name != null)
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace MPF.Core.Utilities
|
||||
/// <param name="progress">Optional progress callback</param>
|
||||
/// <returns>Set of all detected copy protections with an optional error string</returns>
|
||||
public static async Task<(Dictionary<string, List<string>>?, string?)> RunProtectionScanOnPath(string path,
|
||||
Data.Options options,
|
||||
Core.Options options,
|
||||
IProgress<ProtectionProgress>? progress = null)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace MPF.Core.Utilities
|
||||
Drive? drive,
|
||||
RedumpSystem? system,
|
||||
MediaType? mediaType,
|
||||
Data.Options options,
|
||||
Core.Options options,
|
||||
BaseProcessor processor,
|
||||
IProgress<ResultEventArgs>? resultProgress = null,
|
||||
IProgress<ProtectionProgress>? protectionProgress = null)
|
||||
@@ -149,9 +149,9 @@ namespace MPF.Core.Utilities
|
||||
/// <param name="info">Existing SubmissionInfo object to fill</param>
|
||||
/// <param name="resultProgress">Optional result progress callback</param>
|
||||
#if NET40
|
||||
public static bool FillFromRedump(Data.Options options, SubmissionInfo info, IProgress<ResultEventArgs>? resultProgress = null)
|
||||
public static bool FillFromRedump(Core.Options options, SubmissionInfo info, IProgress<ResultEventArgs>? resultProgress = null)
|
||||
#else
|
||||
public async static Task<bool> FillFromRedump(Data.Options options, SubmissionInfo info, IProgress<ResultEventArgs>? resultProgress = null)
|
||||
public async static Task<bool> FillFromRedump(Core.Options options, SubmissionInfo info, IProgress<ResultEventArgs>? resultProgress = null)
|
||||
#endif
|
||||
{
|
||||
// If no username is provided
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user