diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs index a65fca5eb..5409e7502 100644 --- a/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs @@ -55,6 +55,7 @@ namespace HandBrakeWPF.ViewModels this.userSettingService = userSettingService; } + public event EventHandler<TabStatusEventArgs> TabStatusChanged; public event EventHandler<OutputFormatChangedEventArgs> OutputFormatChanged; public Preset Preset @@ -309,6 +310,31 @@ namespace HandBrakeWPF.ViewModels this.NotifyOfPropertyChange(() => this.AlignAVStart); } + public bool MatchesPreset(Preset preset) + { + if (preset.Task.OutputFormat != this.SelectedOutputFormat) + { + return false; + } + + if (preset.Task.OptimizeMP4 != this.OptimizeMP4) + { + return false; + } + + if (preset.Task.AlignAVStart != this.AlignAVStart) + { + return false; + } + + if (preset.Task.IPod5GSupport != this.IPod5GSupport) + { + return false; + } + + return true; + } + public void UpdateDisplayedInfo() { if (this.CurrentTitle == null) @@ -377,6 +403,11 @@ namespace HandBrakeWPF.ViewModels #region Private Methods + protected virtual void OnTabStatusChanged(TabStatusEventArgs e) + { + this.TabStatusChanged?.Invoke(this, e); + } + private void UpdateSettings(Preset selectedPreset) { // Main Window Settings |