diff options
author | sr55 <[email protected]> | 2017-09-17 15:43:47 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2017-09-17 15:44:02 +0100 |
commit | 361f4d9e6c055faa48c3ca61a97872d0216261f6 (patch) | |
tree | c298da50abab13e5f7ae07cece8a0bc77fa6fe3d /win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs | |
parent | 491e02354e74118ba9aca4ef201c8d2c3a42bda4 (diff) |
WinGui: Initial ground work on code that will detect when the user modifies settings that don't match the currently selected preset.
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs index f4afb5109..8d2635485 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs @@ -17,6 +17,7 @@ namespace HandBrakeWPF.ViewModels using HandBrake.ApplicationServices.Interop.Model;
using HandBrake.ApplicationServices.Interop.Model.Encoding;
+ using HandBrakeWPF.EventArgs;
using HandBrakeWPF.Helpers;
using HandBrakeWPF.Properties;
using HandBrakeWPF.Services.Presets.Model;
@@ -134,6 +135,8 @@ namespace HandBrakeWPF.ViewModels #endregion
+ public event EventHandler<TabStatusEventArgs> TabStatusChanged;
+
#region Properties
/// <summary>
@@ -822,10 +825,30 @@ namespace HandBrakeWPF.ViewModels this.NotifyOfPropertyChange(() => this.Task);
}
+ public bool MatchesPreset(Preset preset)
+ {
+ if (preset.Task.Anamorphic != this.SelectedAnamorphicMode)
+ {
+ return false;
+ }
+
+ if (preset.Task.Modulus != this.SelectedModulus)
+ {
+ return false;
+ }
+
+ return true;
+ }
+
#endregion
#region Methods
+ protected virtual void OnTabStatusChanged(TabStatusEventArgs e)
+ {
+ this.TabStatusChanged?.Invoke(this, e);
+ }
+
/// <summary>
/// The init.
/// </summary>
|