diff --git a/MPF/ViewModels.cs b/MPF/ViewModels.cs index 664eba33..e91a8367 100644 --- a/MPF/ViewModels.cs +++ b/MPF/ViewModels.cs @@ -1,151 +1,12 @@ -using System; - -namespace MPF +namespace MPF { + /// + /// Globally referencable options + /// public class OptionsViewModel { private readonly UIOptions _uiOptions; - #region Internal Program - - public string AaruPath - { - get { return _uiOptions.Options.AaruPath; } - set { _uiOptions.Options.AaruPath = value; } - } - - public string CreatorPath - { - get { return _uiOptions.Options.CreatorPath; } - set { _uiOptions.Options.CreatorPath = value; } - } - - public string DDPath - { - get { return _uiOptions.Options.DDPath; } - set { _uiOptions.Options.DDPath = value; } - } - - public string InternalProgram - { - get { return _uiOptions.Options.InternalProgram; } - set { _uiOptions.Options.InternalProgram = value; } - } - - #endregion - - #region UI Defaults - - public string DefaultOutputPath - { - get { return _uiOptions.Options.DefaultOutputPath; } - set { _uiOptions.Options.DefaultOutputPath = value; } - } - - public string DefaultSystem - { - get { return _uiOptions.Options.DefaultSystem; } - set { _uiOptions.Options.DefaultSystem = value; } - } - - #endregion - - #region Dumping Speeds - - public int PreferredDumpSpeedCD - { - get { return _uiOptions.Options.PreferredDumpSpeedCD; } - set { _uiOptions.Options.PreferredDumpSpeedCD = value; } - } - - public int PreferredDumpSpeedDVD - { - get { return _uiOptions.Options.PreferredDumpSpeedDVD; } - set { _uiOptions.Options.PreferredDumpSpeedDVD = value; } - } - - public int PreferredDumpSpeedBD - { - get { return _uiOptions.Options.PreferredDumpSpeedBD; } - set { _uiOptions.Options.PreferredDumpSpeedBD = value; } - } - - #endregion - - #region Extra Dumping Options - - public bool QuietMode - { - get { return _uiOptions.Options.QuietMode; } - set { _uiOptions.Options.QuietMode = value; } - } - - public bool ParanoidMode - { - get { return _uiOptions.Options.ParanoidMode; } - set { _uiOptions.Options.ParanoidMode = value; } - } - - public bool ScanForProtection - { - get { return _uiOptions.Options.ScanForProtection; } - set { _uiOptions.Options.ScanForProtection = value; } - } - - public string RereadAmountForC2 - { - get { return Convert.ToString(_uiOptions.Options.RereadAmountForC2); } - set - { - if (Int32.TryParse(value, out int result)) - _uiOptions.Options.RereadAmountForC2 = result; - } - } - - public bool AddPlaceholders - { - get { return _uiOptions.Options.AddPlaceholders; } - set { _uiOptions.Options.AddPlaceholders = value; } - } - - public bool PromptForDiscInformation - { - get { return _uiOptions.Options.PromptForDiscInformation; } - set { _uiOptions.Options.PromptForDiscInformation = value; } - } - - public bool IgnoreFixedDrives - { - get { return _uiOptions.Options.IgnoreFixedDrives; } - set { _uiOptions.Options.IgnoreFixedDrives = value; } - } - - public bool ResetDriveAfterDump - { - get { return _uiOptions.Options.ResetDriveAfterDump; } - set { _uiOptions.Options.ResetDriveAfterDump = value; } - } - - #endregion - - #region Skip Options - - public bool SkipMediaTypeDetection - { - get { return _uiOptions.Options.SkipMediaTypeDetection; } - set { _uiOptions.Options.SkipMediaTypeDetection = value; } - } - - public bool SkipSystemDetection - { - get { return _uiOptions.Options.SkipSystemDetection; } - set { _uiOptions.Options.SkipSystemDetection = value; } - } - - #endregion - - #region Logging Options - public bool VerboseLogging { get { return _uiOptions.Options.VerboseLogging; } @@ -156,34 +17,6 @@ namespace MPF } } - public bool OpenLogWindowAtStartup - { - get { return _uiOptions.Options.OpenLogWindowAtStartup; } - set - { - _uiOptions.Options.OpenLogWindowAtStartup = value; - _uiOptions.Save(); // TODO: Why does this save here? - } - } - - #endregion - - #region Redump Login Information - - public string Username - { - get { return _uiOptions.Options.Username; } - set { _uiOptions.Options.Username = value; } - } - - public string Password - { - get { return _uiOptions.Options.Password; } - set { _uiOptions.Options.Password = value; } - } - - #endregion - public OptionsViewModel(UIOptions uiOptions) { this._uiOptions = uiOptions; diff --git a/MPF/Windows/OptionsWindow.xaml b/MPF/Windows/OptionsWindow.xaml index 70d08b90..838ba627 100644 --- a/MPF/Windows/OptionsWindow.xaml +++ b/MPF/Windows/OptionsWindow.xaml @@ -28,21 +28,15 @@