diff options
author | sr55 <[email protected]> | 2019-04-25 15:16:33 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2019-04-25 15:16:33 +0100 |
commit | 3c5adac3feef83d30cba159e97715a3df726c0b0 (patch) | |
tree | ad1e0a460049dd375eda4cd20e7c8061d9e8b06a | |
parent | 48fea07ce86bad4f349fd153460823898a0f236b (diff) |
WinGui: Refactor Filters View Model - (Deinterlace and Detection Filters)
5 files changed, 264 insertions, 235 deletions
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index 2a5c2d21c..e85382f0e 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -272,6 +272,7 @@ <Compile Include="Utilities\UwpDetect.cs" />
<Compile Include="Utilities\Win32.cs" />
<Compile Include="Utilities\Win7.cs" />
+ <Compile Include="ViewModelItems\Filters\DeinterlaceFilterItem.cs" />
<Compile Include="ViewModelItems\Filters\DenoiseItem.cs" />
<Compile Include="ViewModelItems\Filters\DetelecineItem.cs" />
<Compile Include="ViewModelItems\Filters\SharpenItem.cs" />
diff --git a/win/CS/HandBrakeWPF/ViewModelItems/Filters/DeinterlaceFilterItem.cs b/win/CS/HandBrakeWPF/ViewModelItems/Filters/DeinterlaceFilterItem.cs new file mode 100644 index 000000000..8fd5ebb77 --- /dev/null +++ b/win/CS/HandBrakeWPF/ViewModelItems/Filters/DeinterlaceFilterItem.cs @@ -0,0 +1,235 @@ +// -------------------------------------------------------------------------------------------------------------------- +// <copyright file="DeinterlaceFilterItem.cs" company="HandBrake Project (http://handbrake.fr)"> +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// </copyright> +// <summary> +// Defines the DeinterlaceFilter type. +// </summary> +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.ViewModelItems.Filters +{ + using System.Collections.Generic; + using System.ComponentModel; + using System.Linq; + + using Caliburn.Micro; + + using HandBrake.Interop.Interop; + using HandBrake.Interop.Interop.HbLib; + using HandBrake.Interop.Interop.Model.Encoding; + + using HandBrakeWPF.Services.Encode.Model; + using HandBrakeWPF.Services.Presets.Model; + using HandBrakeWPF.Services.Scan.Model; + using HandBrakeWPF.Utilities; + + using Action = System.Action; + + public class DeinterlaceFilterItem : PropertyChangedBase + { + private readonly Action triggerTabChanged; + + public DeinterlaceFilterItem(EncodeTask currentTask, Action triggerTabChanged) + { + this.triggerTabChanged = triggerTabChanged; + this.CurrentTask = currentTask; + this.SelectedDeinterlaceFilter = DeinterlaceFilter.Off; + } + + public EncodeTask CurrentTask { get; private set; } + + public IEnumerable<DeinterlaceFilter> DeinterlaceFilterOptions => EnumHelper<DeinterlaceFilter>.GetEnumList(); + + public IEnumerable<CombDetect> CombDetectPresets => EnumHelper<CombDetect>.GetEnumList(); + + public bool IsDeinterlaceEnabled => this.CurrentTask.DeinterlaceFilter != DeinterlaceFilter.Off; + + public bool ShowCustomDeinterlace => this.IsDeinterlaceEnabled && this.CurrentTask.DeinterlacePreset?.ShortName == "custom"; + + public bool ShowCombDetectCustom => this.SelectedCombDetectPreset == CombDetect.Custom; + + public DeinterlaceFilter SelectedDeinterlaceFilter + { + get + { + return this.CurrentTask.DeinterlaceFilter; + } + + set + { + if (value == this.CurrentTask.DeinterlaceFilter) + { + return; + } + + this.CurrentTask.DeinterlaceFilter = value; + + this.NotifyOfPropertyChange(() => this.SelectedDeinterlaceFilter); + this.NotifyOfPropertyChange(() => this.ShowCustomDeinterlace); + this.NotifyOfPropertyChange(() => this.DeinterlacePresets); + this.NotifyOfPropertyChange(() => this.IsDeinterlaceEnabled); + + if (!this.DeinterlacePresets.Contains(this.SelectedDeInterlacePreset)) + { + this.SelectedDeInterlacePreset = this.DeinterlacePresets.FirstOrDefault(p => p.ShortName == "default"); + } + + this.triggerTabChanged(); + } + } + + public IEnumerable<HBPresetTune> DeinterlacePresets + { + get + { + switch (this.SelectedDeinterlaceFilter) + { + case DeinterlaceFilter.Yadif: + return new BindingList<HBPresetTune>(HandBrakeFilterHelpers.GetFilterPresets((int)hb_filter_ids.HB_FILTER_DEINTERLACE)); + case DeinterlaceFilter.Decomb: + return new BindingList<HBPresetTune>(HandBrakeFilterHelpers.GetFilterPresets((int)hb_filter_ids.HB_FILTER_DECOMB)); + default: + return new BindingList<HBPresetTune>(); + } + } + } + + public HBPresetTune SelectedDeInterlacePreset + { + get + { + return this.CurrentTask.DeinterlacePreset; + } + + set + { + this.CurrentTask.DeinterlacePreset = value; + this.NotifyOfPropertyChange(() => this.SelectedDeInterlacePreset); + + if (value?.ShortName == "custom") this.CustomDeinterlaceSettings = string.Empty; + + // Show / Hide the Custom Control + this.NotifyOfPropertyChange(() => this.ShowCustomDeinterlace); + this.triggerTabChanged(); + } + } + + public CombDetect SelectedCombDetectPreset + { + get + { + return this.CurrentTask.CombDetect; + } + + set + { + this.CurrentTask.CombDetect = value; + this.NotifyOfPropertyChange(() => this.SelectedCombDetectPreset); + + if (value != CombDetect.Custom) this.CustomCombDetect = string.Empty; + + // Show / Hide the Custom Control + this.NotifyOfPropertyChange(() => this.ShowCombDetectCustom); + this.triggerTabChanged(); + } + } + + /// <summary> + /// Gets or sets the custom comb detect. + /// </summary> + public string CustomCombDetect + { + get + { + return this.CurrentTask.CustomCombDetect; + } + + set + { + this.CurrentTask.CustomCombDetect = value; + this.NotifyOfPropertyChange(() => this.CustomCombDetect); + this.triggerTabChanged(); + } + } + + public string CustomDeinterlaceSettings + { + get + { + return this.CurrentTask.CustomDeinterlaceSettings; + } + + set + { + this.CurrentTask.CustomDeinterlaceSettings = value; + this.NotifyOfPropertyChange(() => this.CustomDeinterlaceSettings); + this.triggerTabChanged(); + } + } + + public void SetPreset(Preset preset, EncodeTask task) + { + this.CurrentTask = task; + + if (preset == null) + { + this.SelectedDeinterlaceFilter = DeinterlaceFilter.Off; + return; + } + + this.SelectedDeinterlaceFilter = preset.Task.DeinterlaceFilter; + this.SelectedDeInterlacePreset = preset.Task.DeinterlacePreset; + this.CustomDeinterlaceSettings = preset.Task.CustomDeinterlaceSettings; + this.SelectedCombDetectPreset = preset.Task.CombDetect; + this.CustomCombDetect = preset.Task.CustomCombDetect; + } + + public void UpdateTask(EncodeTask task) + { + this.CurrentTask = task; + this.NotifyOfPropertyChange(() => this.SelectedDeinterlaceFilter); + this.NotifyOfPropertyChange(() => this.SelectedDeInterlacePreset); + this.NotifyOfPropertyChange(() => this.CustomDeinterlaceSettings); + this.NotifyOfPropertyChange(() => this.ShowCustomDeinterlace); + this.NotifyOfPropertyChange(() => this.CustomCombDetect); + this.NotifyOfPropertyChange(() => this.SelectedCombDetectPreset); + this.NotifyOfPropertyChange(() => this.ShowCombDetectCustom); + } + + public bool MatchesPreset(Preset preset) + { + if (preset.Task.DeinterlaceFilter != this.SelectedDeinterlaceFilter) + { + return false; + } + + if (preset.Task.DeinterlacePreset != this.SelectedDeInterlacePreset) + { + return false; + } + + if (preset.Task.CustomDeinterlaceSettings != this.CustomDeinterlaceSettings) + { + return false; + } + + if (preset.Task.CombDetect != this.SelectedCombDetectPreset) + { + return false; + } + + if ((preset.Task.CustomCombDetect ?? string.Empty) != (this.CustomCombDetect ?? string.Empty)) + { + return false; + } + + return true; + } + + public void SetSource(Source source, Title title, Preset preset, EncodeTask task) + { + this.CurrentTask = task; + } + } +} diff --git a/win/CS/HandBrakeWPF/ViewModelItems/Filters/DetelecineItem.cs b/win/CS/HandBrakeWPF/ViewModelItems/Filters/DetelecineItem.cs index 755edd536..8bf775dbc 100644 --- a/win/CS/HandBrakeWPF/ViewModelItems/Filters/DetelecineItem.cs +++ b/win/CS/HandBrakeWPF/ViewModelItems/Filters/DetelecineItem.cs @@ -34,9 +34,6 @@ namespace HandBrakeWPF.ViewModelItems.Filters public EncodeTask CurrentTask { get; private set; } - - public DetelecineItem DetelecineFilter { get; set; } - public Detelecine SelectedDetelecine { get diff --git a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs index 171d29a29..50d4a2d1f 100644 --- a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs @@ -39,8 +39,6 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public class FiltersViewModel : ViewModelBase, IFiltersViewModel
{
- private DeinterlaceFilter deinterlaceFilter;
-
#region Constructors and Destructors
/// <summary>
@@ -56,11 +54,11 @@ namespace HandBrakeWPF.ViewModels {
this.CurrentTask = new EncodeTask();
this.DeblockValue = 4; // OFF
- this.SelectedDeinterlaceFilter = DeinterlaceFilter.Off;
-
+
this.SharpenFilter = new SharpenItem(this.CurrentTask, () => this.OnTabStatusChanged(null));
this.DenoiseFilter = new DenoiseItem(this.CurrentTask, () => this.OnTabStatusChanged(null));
this.DetelecineFilter = new DetelecineItem(this.CurrentTask, () => this.OnTabStatusChanged(null));
+ this.DeinterlaceFilter = new DeinterlaceFilterItem(this.CurrentTask, () => this.OnTabStatusChanged(null));
}
#endregion
@@ -122,167 +120,14 @@ namespace HandBrakeWPF.ViewModels }
}
- #region Interlace Detection
-
- /// <summary>
- /// Comb Detection Presets
- /// </summary>
- public IEnumerable<CombDetect> CombDetectPresets
- {
- get
- {
- return EnumHelper<CombDetect>.GetEnumList();
- }
- }
-
- /// <summary>
- /// Show the CombDetect Custom Box.
- /// </summary>
- public bool ShowCombDetectCustom => this.SelectedCombDetectPreset == CombDetect.Custom;
-
- /// <summary>
- /// Gets or sets the selected comb detect preset.
- /// </summary>
- public CombDetect SelectedCombDetectPreset
- {
- get
- {
- return this.CurrentTask.CombDetect;
- }
-
- set
- {
- this.CurrentTask.CombDetect = value;
- this.NotifyOfPropertyChange(() => this.SelectedCombDetectPreset);
-
- if (value != CombDetect.Custom) this.CustomCombDetect = string.Empty;
-
- // Show / Hide the Custom Control
- this.NotifyOfPropertyChange(() => this.ShowCombDetectCustom);
- this.OnTabStatusChanged(null);
- }
- }
-
- /// <summary>
- /// Gets or sets the custom comb detect.
- /// </summary>
- public string CustomCombDetect
- {
- get
- {
- return this.CurrentTask.CustomCombDetect;
- }
-
- set
- {
- this.CurrentTask.CustomCombDetect = value;
- this.NotifyOfPropertyChange(() => this.CustomCombDetect);
- this.OnTabStatusChanged(null);
- }
- }
-
- #endregion
-
- #region Deinterlace and Decomb
-
- public IEnumerable<DeinterlaceFilter> DeinterlaceFilterOptions => EnumHelper<DeinterlaceFilter>.GetEnumList();
-
- public DeinterlaceFilter SelectedDeinterlaceFilter
- {
- get
- {
- return this.deinterlaceFilter;
- }
-
- set
- {
- if (value == this.deinterlaceFilter)
- {
- return;
- }
-
- this.deinterlaceFilter = value;
- this.CurrentTask.DeinterlaceFilter = value;
-
- this.NotifyOfPropertyChange(() => this.SelectedDeinterlaceFilter);
- this.NotifyOfPropertyChange(() => this.ShowCustomDeinterlace);
- this.NotifyOfPropertyChange(() => this.DeinterlacePresets);
- this.NotifyOfPropertyChange(() => this.IsDeinterlaceEnabled);
-
- if (!this.DeinterlacePresets.Contains(this.SelectedDeInterlacePreset))
- {
- this.SelectedDeInterlacePreset = this.DeinterlacePresets.FirstOrDefault(p => p.ShortName == "default");
- }
-
- this.OnTabStatusChanged(null);
- }
- }
-
- public IEnumerable<HBPresetTune> DeinterlacePresets
- {
- get
- {
- switch (this.SelectedDeinterlaceFilter)
- {
- case DeinterlaceFilter.Yadif:
- return new BindingList<HBPresetTune>(HandBrakeFilterHelpers.GetFilterPresets((int)hb_filter_ids.HB_FILTER_DEINTERLACE));
- case DeinterlaceFilter.Decomb:
- return new BindingList<HBPresetTune>(HandBrakeFilterHelpers.GetFilterPresets((int)hb_filter_ids.HB_FILTER_DECOMB));
- default:
- return new BindingList<HBPresetTune>();
- }
- }
- }
-
- public HBPresetTune SelectedDeInterlacePreset
- {
- get
- {
- return this.CurrentTask.DeinterlacePreset;
- }
- set
- {
- this.CurrentTask.DeinterlacePreset = value;
- this.NotifyOfPropertyChange(() => this.SelectedDeInterlacePreset);
-
- if (value?.ShortName == "custom") this.CustomDeinterlaceSettings = string.Empty;
-
- // Show / Hide the Custom Control
- this.NotifyOfPropertyChange(() => this.ShowCustomDeinterlace);
- this.OnTabStatusChanged(null);
- }
- }
-
- public bool IsDeinterlaceEnabled => this.CurrentTask.DeinterlaceFilter != DeinterlaceFilter.Off;
-
- public bool ShowCustomDeinterlace => this.IsDeinterlaceEnabled && this.CurrentTask.DeinterlacePreset?.ShortName == "custom";
-
- /// <summary>
- /// Gets or sets CustomDecomb.
- /// </summary>
- public string CustomDeinterlaceSettings
- {
- get
- {
- return this.CurrentTask.CustomDeinterlaceSettings;
- }
-
- set
- {
- this.CurrentTask.CustomDeinterlaceSettings = value;
- this.NotifyOfPropertyChange(() => this.CustomDeinterlaceSettings);
- this.OnTabStatusChanged(null);
- }
- }
+ public DenoiseItem DenoiseFilter { get; set; }
- #endregion
+ public SharpenItem SharpenFilter { get; set; }
public DetelecineItem DetelecineFilter { get; set; }
- public DenoiseItem DenoiseFilter { get; set; }
-
- public SharpenItem SharpenFilter { get; set; }
+ public DeinterlaceFilterItem DeinterlaceFilter { get; set; }
/// <summary>
/// The rotation options.
@@ -325,21 +170,6 @@ namespace HandBrakeWPF.ViewModels }
}
- #region Sharpen Filter
-
- public IEnumerable<Sharpen> SharpenOptions
- {
- get
- {
- return EnumHelper<Sharpen>.GetEnumList();
- }
- }
-
- public object SharpenPresets { get; set; }
-
- public object SharpenTunes { get; set; }
-
- #endregion
#endregion
@@ -361,10 +191,7 @@ namespace HandBrakeWPF.ViewModels if (preset != null)
{
// Properties
- this.SelectedDeinterlaceFilter = preset.Task.DeinterlaceFilter;
- this.SelectedDeInterlacePreset = preset.Task.DeinterlacePreset;
-
- this.SelectedCombDetectPreset = preset.Task.CombDetect;
+
this.Grayscale = preset.Task.Grayscale;
this.DeblockValue = preset.Task.Deblock == 0 ? 4 : preset.Task.Deblock;
@@ -372,18 +199,14 @@ namespace HandBrakeWPF.ViewModels this.SharpenFilter.SetPreset(preset, task);
this.DenoiseFilter.SetPreset(preset, task);
this.DetelecineFilter.SetPreset(preset, task);
-
- // Custom Values
- this.CustomDeinterlaceSettings = preset.Task.CustomDeinterlaceSettings;
- this.CustomCombDetect = preset.Task.CustomCombDetect;
-
+ this.DeinterlaceFilter.SetPreset(preset, task);
+
this.SelectedRotation = preset.Task.Rotation;
this.FlipVideo = preset.Task.FlipVideo;
}
else
{
// Default everything to off
- this.SelectedDeinterlaceFilter = DeinterlaceFilter.Off;
this.Grayscale = false;
this.DeblockValue = 0;
@@ -401,65 +224,37 @@ namespace HandBrakeWPF.ViewModels public void UpdateTask(EncodeTask task)
{
this.CurrentTask = task;
- this.NotifyOfPropertyChange(() => this.SelectedDeinterlaceFilter);
- this.NotifyOfPropertyChange(() => this.SelectedDeInterlacePreset);
this.NotifyOfPropertyChange(() => this.Grayscale);
this.NotifyOfPropertyChange(() => this.DeblockValue);
- this.NotifyOfPropertyChange(() => this.SelectedCombDetectPreset);
+
this.NotifyOfPropertyChange(() => this.FlipVideo);
this.NotifyOfPropertyChange(() => this.SelectedRotation);
- this.NotifyOfPropertyChange(() => this.CustomDeinterlaceSettings);
- this.NotifyOfPropertyChange(() => this.CustomCombDetect);
-
- this.NotifyOfPropertyChange(() => this.ShowCustomDeinterlace);
- this.NotifyOfPropertyChange(() => this.ShowCombDetectCustom);
-
this.SharpenFilter.UpdateTask(task);
this.DenoiseFilter.UpdateTask(task);
this.DetelecineFilter.UpdateTask(task);
+ this.DeinterlaceFilter.UpdateTask(task);
}
public bool MatchesPreset(Preset preset)
{
-
- if (preset.Task.DeinterlaceFilter != this.SelectedDeinterlaceFilter)
- {
- return false;
- }
-
- if (preset.Task.DeinterlacePreset != this.SelectedDeInterlacePreset)
- {
- return false;
- }
-
- if (preset.Task.CustomDeinterlaceSettings != this.CustomDeinterlaceSettings)
- {
- return false;
- }
-
- if (preset.Task.CombDetect != this.SelectedCombDetectPreset)
- {
- return false;
- }
-
- if ((preset.Task.CustomCombDetect ?? string.Empty) != (this.CustomCombDetect ?? string.Empty))
+ if (!this.DenoiseFilter.MatchesPreset(preset))
{
return false;
}
- if (!this.DenoiseFilter.MatchesPreset(preset))
+ if (!this.SharpenFilter.MatchesPreset(preset))
{
return false;
}
- if (!this.SharpenFilter.MatchesPreset(preset))
+ if (!this.DetelecineFilter.MatchesPreset(preset))
{
return false;
}
- if (!this.DetelecineFilter.MatchesPreset(preset))
+ if (!this.DeinterlaceFilter.MatchesPreset(preset))
{
return false;
}
@@ -510,6 +305,7 @@ namespace HandBrakeWPF.ViewModels this.SharpenFilter.SetSource(source, title, preset, task);
this.DenoiseFilter.SetSource(source, title, preset, task);
this.DetelecineFilter.SetSource(source, title, preset, task);
+ this.DeinterlaceFilter.SetSource(source, title, preset, task);
}
#endregion
diff --git a/win/CS/HandBrakeWPF/Views/FiltersView.xaml b/win/CS/HandBrakeWPF/Views/FiltersView.xaml index 8379c6eb6..a311900eb 100644 --- a/win/CS/HandBrakeWPF/Views/FiltersView.xaml +++ b/win/CS/HandBrakeWPF/Views/FiltersView.xaml @@ -61,33 +61,33 @@ <!-- Interlace Detection -->
<TextBlock Text="{x:Static Properties:Resources.FiltersView_InterlaceDetection}" VerticalAlignment="Center" Margin="0,0,5,0" Grid.Row="1" />
- <ComboBox Width="120" Grid.Row="1" Grid.Column="1" ItemsSource="{Binding CombDetectPresets, Converter={StaticResource boolComboConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"
- SelectedItem="{Binding SelectedCombDetectPreset, Converter={StaticResource boolComboConverter}}" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_InterlaceDetection}"
+ <ComboBox Width="120" Grid.Row="1" Grid.Column="1" ItemsSource="{Binding DeinterlaceFilter.CombDetectPresets, Converter={StaticResource boolComboConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"
+ SelectedItem="{Binding DeinterlaceFilter.SelectedCombDetectPreset, Converter={StaticResource boolComboConverter}}" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_InterlaceDetection}"
VerticalContentAlignment="Center" AutomationProperties.Name="{x:Static Properties:Resources.FiltersView_InterlaceDetection}"/>
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="2">
- <TextBlock Text="Custom:" VerticalAlignment="Center" Margin="0,0,5,0" Visibility="{Binding ShowCombDetectCustom, Converter={StaticResource boolToVisConverter}}" />
- <TextBox Width="120" Text="{Binding CustomCombDetect, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalAlignment="Left"
- Visibility="{Binding ShowCombDetectCustom, Converter={StaticResource boolToVisConverter}}" MinHeight="22" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_InterlaceDetectionCustom}" />
+ <TextBlock Text="Custom:" VerticalAlignment="Center" Margin="0,0,5,0" Visibility="{Binding DeinterlaceFilter.ShowCombDetectCustom, Converter={StaticResource boolToVisConverter}}" />
+ <TextBox Width="120" Text="{Binding DeinterlaceFilter.CustomCombDetect, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalAlignment="Left"
+ Visibility="{Binding DeinterlaceFilter.ShowCombDetectCustom, Converter={StaticResource boolToVisConverter}}" MinHeight="22" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_InterlaceDetectionCustom}" />
</StackPanel>
<!-- Deinterlace -->
<TextBlock Text="{x:Static Properties:Resources.FiltersView_Deinterlace}" VerticalAlignment="Center" Grid.Row="2" Grid.Column="0" Margin="0,0,0,10" />
<StackPanel Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,0,10">
- <ComboBox Width="120" ItemsSource="{Binding DeinterlaceFilterOptions, Converter={StaticResource boolComboConverter}}" HorizontalAlignment="Left"
- SelectedItem="{Binding SelectedDeinterlaceFilter, Converter={StaticResource boolComboConverter}}" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_Deinterlace}"
+ <ComboBox Width="120" ItemsSource="{Binding DeinterlaceFilter.DeinterlaceFilterOptions, Converter={StaticResource boolComboConverter}}" HorizontalAlignment="Left"
+ SelectedItem="{Binding DeinterlaceFilter.SelectedDeinterlaceFilter, Converter={StaticResource boolComboConverter}}" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_Deinterlace}"
AutomationProperties.Name="{x:Static Properties:Resources.FiltersView_Deinterlace}" />
</StackPanel>
<StackPanel Grid.Row="2" Grid.Column="2" Orientation="Horizontal" Margin="0,0,0,10">
- <TextBlock Text="{x:Static Properties:Resources.FiltersView_DeinterlacePreset}" VerticalAlignment="Center" Margin="0,0,5,0" Visibility="{Binding IsDeinterlaceEnabled, Converter={StaticResource boolToVisConverter}}" />
- <ComboBox Width="120" ItemsSource="{Binding DeinterlacePresets}" HorizontalAlignment="Left" VerticalAlignment="Center"
- SelectedItem="{Binding SelectedDeInterlacePreset}" DisplayMemberPath="Name" Visibility="{Binding IsDeinterlaceEnabled, Converter={StaticResource boolToVisConverter}}"
+ <TextBlock Text="{x:Static Properties:Resources.FiltersView_DeinterlacePreset}" VerticalAlignment="Center" Margin="0,0,5,0" Visibility="{Binding DeinterlaceFilter.IsDeinterlaceEnabled, Converter={StaticResource boolToVisConverter}}" />
+ <ComboBox Width="120" ItemsSource="{Binding DeinterlaceFilter.DeinterlacePresets}" HorizontalAlignment="Left" VerticalAlignment="Center"
+ SelectedItem="{Binding DeinterlaceFilter.SelectedDeInterlacePreset}" DisplayMemberPath="Name" Visibility="{Binding DeinterlaceFilter.IsDeinterlaceEnabled, Converter={StaticResource boolToVisConverter}}"
AutomationProperties.Name="{x:Static Properties:Resources.FiltersView_DeinterlacePresetAuto}" />
- <TextBlock Text="Custom:" VerticalAlignment="Center" Margin="5,0,5,0" Visibility="{Binding ShowCustomDeinterlace, Converter={StaticResource boolToVisConverter}}" />
- <TextBox Width="120" Text="{Binding CustomDeinterlaceSettings, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalAlignment="Left"
- Visibility="{Binding ShowCustomDeinterlace, Converter={StaticResource boolToVisConverter}}" MinHeight="22" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_DeinterlaceCustom}" />
+ <TextBlock Text="Custom:" VerticalAlignment="Center" Margin="5,0,5,0" Visibility="{Binding DeinterlaceFilter.ShowCustomDeinterlace, Converter={StaticResource boolToVisConverter}}" />
+ <TextBox Width="120" Text="{Binding DeinterlaceFilter.CustomDeinterlaceSettings, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalAlignment="Left"
+ Visibility="{Binding DeinterlaceFilter.ShowCustomDeinterlace, Converter={StaticResource boolToVisConverter}}" MinHeight="22" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_DeinterlaceCustom}" />
</StackPanel>
|