diff --git a/CHANGELIST.md b/CHANGELIST.md index 3265d5ba..8321be17 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -61,6 +61,7 @@ - Make processor private to DumpEnvironment - Make context private to DumpEnvironment - Make media type private to DumpEnvironment +- Make system private to DumpEnvironment ### 3.1.9a (2024-05-21) diff --git a/MPF.Core/DumpEnvironment.cs b/MPF.Core/DumpEnvironment.cs index 93efb3d1..a656b87d 100644 --- a/MPF.Core/DumpEnvironment.cs +++ b/MPF.Core/DumpEnvironment.cs @@ -35,11 +35,6 @@ namespace MPF.Core /// public Drive? Drive { get; } - /// - /// Currently selected system - /// - public RedumpSystem? System { get; } - /// /// ExecutionContext object representing how to invoke the internal program /// @@ -60,6 +55,11 @@ namespace MPF.Core /// private BaseProcessor? _processor; + /// + /// Currently selected system + /// + private readonly RedumpSystem? _system; + /// /// Currently selected media type /// @@ -86,6 +86,9 @@ namespace MPF.Core } } + /// + public bool DetectedByWindows() => _system.DetectedByWindows(); + /// public bool DoesSupportDriveSpeed() => _type.DoesSupportDriveSpeed(); @@ -299,7 +305,7 @@ namespace MPF.Core } /// - public ResultEventArgs GetSupportStatus() => Tools.GetSupportStatus(System, _type); + public ResultEventArgs GetSupportStatus() => Tools.GetSupportStatus(_system, _type); /// public bool IsDumpingCommand() @@ -419,7 +425,7 @@ namespace MPF.Core var submissionInfo = await SubmissionInfoTool.ExtractOutputInformation( OutputPath, Drive, - System, + _system, _type, _options, _processor, @@ -535,7 +541,7 @@ namespace MPF.Core } // Create PS3 IRD, if required - if (_options.CreateIRDAfterDumping && System == RedumpSystem.SonyPlayStation3 && _type == MediaType.BluRay) + if (_options.CreateIRDAfterDumping && _system == RedumpSystem.SonyPlayStation3 && _type == MediaType.BluRay) { resultProgress?.Report(ResultEventArgs.Success("Creating IRD... please wait!")); (bool deleteSuccess, string deleteResult) = await InfoTool.WriteIRD(OutputPath, submissionInfo?.Extras?.DiscKey, submissionInfo?.Extras?.DiscID, submissionInfo?.Extras?.PIC, submissionInfo?.SizeAndChecksums?.Layerbreak, submissionInfo?.SizeAndChecksums?.CRC32); @@ -637,7 +643,7 @@ namespace MPF.Core return ResultEventArgs.Failure("Error! Cannot dump same drive that executable resides on!"); // Validate that the current configuration is supported - return Tools.GetSupportStatus(System, _type); + return Tools.GetSupportStatus(_system, _type); } /// diff --git a/MPF.Core/UI/ViewModels/MainViewModel.cs b/MPF.Core/UI/ViewModels/MainViewModel.cs index 0ef699de..9c8187b1 100644 --- a/MPF.Core/UI/ViewModels/MainViewModel.cs +++ b/MPF.Core/UI/ViewModels/MainViewModel.cs @@ -1801,7 +1801,7 @@ namespace MPF.Core.UI.ViewModels if (_environment?.Drive?.MarkedActive != true && _displayUserMessage != null) { string message = "The currently selected drive does not appear to contain a disc! " - + (!_environment!.System.DetectedByWindows() ? $"This is normal for {_environment.System.LongName()} as the discs may not be readable on Windows. " : string.Empty) + + (!_environment!.DetectedByWindows() ? $"This is normal for {_environment.SystemName} as the discs may not be readable on Windows. " : string.Empty) + "Do you want to continue?"; bool? mbresult = _displayUserMessage("No Disc Detected", message, 2, false);