diff options
author | [email protected] <sr55> | 2016-01-29 20:55:10 +0000 |
---|---|---|
committer | [email protected] <sr55> | 2016-01-29 20:55:10 +0000 |
commit | db29f87dc3bf3909d263491390d0f56418616e26 (patch) | |
tree | e0adda8c59fb4344fa8cff5ea6465afa130cc260 /win/CS/HandBrakeWPF/ViewModels | |
parent | da7b1d29c60f740037883f44e07415580fc5d9a9 (diff) |
WinGui: Add support for the rotate and flip filter.
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs | 50 |
1 files changed, 48 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs index f136035ab..79718e2f2 100644 --- a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs @@ -10,11 +10,11 @@ namespace HandBrakeWPF.ViewModels
{
using System.Collections.Generic;
+ using System.ComponentModel;
using System.Globalization;
using Caliburn.Micro;
- using HandBrake.ApplicationServices.Utilities;
using HandBrake.ApplicationServices.Interop.Model.Encoding;
using HandBrakeWPF.Services.Interfaces;
@@ -496,6 +496,42 @@ namespace HandBrakeWPF.ViewModels }
}
+ public BindingList<int> RotationOptions => new BindingList<int> { 0, 90, 180, 270 };
+
+ /// <summary>
+ /// Selected Rotation.
+ /// </summary>
+ public int SelectedRotation
+ {
+ get
+ {
+ return this.CurrentTask.Rotation;
+ }
+
+ set
+ {
+ this.CurrentTask.Rotation = value;
+ this.NotifyOfPropertyChange(() => this.SelectedRotation);
+ }
+ }
+
+ /// <summary>
+ /// Flip the Video
+ /// </summary>
+ public bool FlipVideo
+ {
+ get
+ {
+ return this.CurrentTask.FlipVideo;
+ }
+
+ set
+ {
+ this.CurrentTask.FlipVideo = value;
+ this.NotifyOfPropertyChange(() => this.FlipVideo);
+ }
+ }
+
#endregion
#region Implemented Interfaces
@@ -531,7 +567,7 @@ namespace HandBrakeWPF.ViewModels {
this.SelectedDeinterlaceFilter = DeinterlaceFilter.Decomb;
}
- else
+ else
{
this.SelectedDeinterlaceFilter = DeinterlaceFilter.Off;
}
@@ -547,6 +583,10 @@ namespace HandBrakeWPF.ViewModels this.CustomDeinterlace = preset.Task.CustomDeinterlace;
this.CustomDetelecine = preset.Task.CustomDetelecine;
this.CustomDenoise = preset.Task.CustomDenoise;
+
+
+ this.SelectedRotation = preset.Task.Rotation;
+ this.FlipVideo = preset.Task.FlipVideo;
}
else
{
@@ -557,6 +597,9 @@ namespace HandBrakeWPF.ViewModels this.SelectedDetelecine = Detelecine.Off;
this.Grayscale = false;
this.DeblockValue = 0;
+
+ this.SelectedRotation = 0;
+ this.FlipVideo = false;
}
}
@@ -586,6 +629,9 @@ namespace HandBrakeWPF.ViewModels this.NotifyOfPropertyChange(() => this.IsDecombMode);
this.NotifyOfPropertyChange(() => this.IsDeinterlaceDecomb);
+ this.NotifyOfPropertyChange(() => this.FlipVideo);
+ this.NotifyOfPropertyChange(() => this.SelectedRotation);
+
}
/// <summary>
|