mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Move string contents for UI to view model
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
- Remove another redundant GetFullFile
|
||||
- Clean up usings after moving methods
|
||||
- Remove Chime
|
||||
- Move string contents for UI to view model
|
||||
|
||||
### 3.1.9a (2024-05-21)
|
||||
|
||||
|
||||
@@ -9,10 +9,6 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public static class Interface
|
||||
{
|
||||
// Button values
|
||||
public const string StartDumping = "Start Dumping";
|
||||
public const string StopDumping = "Stop Dumping";
|
||||
|
||||
// Byte arrays for signatures
|
||||
public static readonly byte[] SaturnSectorZeroStart = [0x53, 0x45, 0x47, 0x41, 0x20, 0x53, 0x45, 0x47, 0x41, 0x53, 0x41, 0x54, 0x55, 0x52, 0x4E, 0x20];
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace MPF.Core.Data
|
||||
|
||||
#region Constants
|
||||
|
||||
private const string DiscNotDetected = "Disc Not Detected";
|
||||
private const string DiscNotDetectedValue = "Disc Not Detected";
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace MPF.Core.Data
|
||||
{
|
||||
get
|
||||
{
|
||||
string? volumeLabel = DiscNotDetected;
|
||||
string? volumeLabel = DiscNotDetectedValue;
|
||||
if (!this.MarkedActive)
|
||||
return volumeLabel;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ using System.Threading.Tasks;
|
||||
using BinaryObjectScanner;
|
||||
using MPF.Core.Converters;
|
||||
using MPF.Core.Data;
|
||||
using MPF.Core.ExecutionContexts;
|
||||
using MPF.Core.UI.ComboBoxItems;
|
||||
using MPF.Core.Utilities;
|
||||
using SabreTools.RedumpLib.Data;
|
||||
@@ -517,6 +516,13 @@ namespace MPF.Core.UI.ViewModels
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constants
|
||||
|
||||
private const string StartDumpingValue = "Start Dumping";
|
||||
public const string StopDumpingValue = "Stop Dumping";
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Generic constructor
|
||||
/// </summary>
|
||||
@@ -544,7 +550,7 @@ namespace MPF.Core.UI.ViewModels
|
||||
DriveLetterComboBoxEnabled = true;
|
||||
DumpingProgramComboBoxEnabled = true;
|
||||
StartStopButtonEnabled = true;
|
||||
StartStopButtonText = Interface.StartDumping;
|
||||
StartStopButtonText = StartDumpingValue;
|
||||
MediaScanButtonEnabled = true;
|
||||
EnableParametersCheckBoxEnabled = true;
|
||||
LogPanelExpanded = _options.OpenLogWindowAtStartup;
|
||||
@@ -940,11 +946,11 @@ namespace MPF.Core.UI.ViewModels
|
||||
public async void ToggleStartStop()
|
||||
{
|
||||
// Dump or stop the dump
|
||||
if (this.StartStopButtonText as string == Interface.StartDumping)
|
||||
if (this.StartStopButtonText as string == StartDumpingValue)
|
||||
{
|
||||
StartDumping();
|
||||
}
|
||||
else if (this.StartStopButtonText as string == Interface.StopDumping)
|
||||
else if (this.StartStopButtonText as string == StopDumpingValue)
|
||||
{
|
||||
VerboseLogLn("Canceling dumping process...");
|
||||
_environment?.CancelDumping();
|
||||
@@ -1286,7 +1292,7 @@ namespace MPF.Core.UI.ViewModels
|
||||
DriveSpeedComboBoxEnabled = false;
|
||||
DumpingProgramComboBoxEnabled = false;
|
||||
EnableParametersCheckBoxEnabled = false;
|
||||
StartStopButtonText = Interface.StopDumping;
|
||||
StartStopButtonText = StopDumpingValue;
|
||||
MediaScanButtonEnabled = false;
|
||||
UpdateVolumeLabelEnabled = false;
|
||||
CopyProtectScanButtonEnabled = false;
|
||||
@@ -1308,7 +1314,7 @@ namespace MPF.Core.UI.ViewModels
|
||||
DriveSpeedComboBoxEnabled = true;
|
||||
DumpingProgramComboBoxEnabled = true;
|
||||
EnableParametersCheckBoxEnabled = true;
|
||||
StartStopButtonText = Interface.StartDumping;
|
||||
StartStopButtonText = StartDumpingValue;
|
||||
MediaScanButtonEnabled = true;
|
||||
UpdateVolumeLabelEnabled = true;
|
||||
CopyProtectScanButtonEnabled = true;
|
||||
|
||||
Reference in New Issue
Block a user