From 9198adad3267514973582c4a518ccb6bf8d37d0d Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 30 Nov 2014 19:55:07 +0000 Subject: WinGui: Add picture settings to the Queue Tooltip git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6573 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Model/EncodeTask.cs | 44 +++++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) (limited to 'win/CS/HandBrake.ApplicationServices/Model') diff --git a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs index 201ffc1e1..661ad12eb 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs @@ -9,6 +9,7 @@ namespace HandBrake.ApplicationServices.Model { + using System; using System.Collections.ObjectModel; using System.Linq; @@ -199,6 +200,7 @@ namespace HandBrake.ApplicationServices.Model #endregion #region Output Settings + /// /// Gets or sets OutputFormat. /// @@ -213,6 +215,7 @@ namespace HandBrake.ApplicationServices.Model /// Gets or sets a value indicating whether IPod5GSupport. /// public bool IPod5GSupport { get; set; } + #endregion #region Picture @@ -276,6 +279,7 @@ namespace HandBrake.ApplicationServices.Model /// Gets or sets Modulus. /// public int? Modulus { get; set; } + #endregion #region Filters @@ -339,6 +343,7 @@ namespace HandBrake.ApplicationServices.Model /// Gets or sets a value indicating whether Grayscale. /// public bool Grayscale { get; set; } + #endregion #region Video @@ -397,6 +402,7 @@ namespace HandBrake.ApplicationServices.Model /// Gets or sets AllowedPassthruOptions. /// public AllowedPassthru AllowedPassthruOptions { get; set; } + #endregion #region Subtitles @@ -405,6 +411,7 @@ namespace HandBrake.ApplicationServices.Model /// Gets or sets SubtitleTracks. /// public ObservableCollection SubtitleTracks { get; set; } + #endregion #region Chapters @@ -520,8 +527,11 @@ namespace HandBrake.ApplicationServices.Model { if (this.OutputFormat == OutputFormat.Mp4) { - bool audio = this.AudioTracks.Any(item => item.Encoder == AudioEncoder.Ac3Passthrough || - item.Encoder == AudioEncoder.Ac3 || item.Encoder == AudioEncoder.DtsPassthrough || item.Encoder == AudioEncoder.Passthrough); + bool audio = + this.AudioTracks.Any( + item => + item.Encoder == AudioEncoder.Ac3Passthrough || item.Encoder == AudioEncoder.Ac3 + || item.Encoder == AudioEncoder.DtsPassthrough || item.Encoder == AudioEncoder.Passthrough); bool subtitles = this.SubtitleTracks.Any(track => track.SubtitleType != SubtitleType.VobSub); @@ -565,6 +575,36 @@ namespace HandBrake.ApplicationServices.Model } } } + + /// + /// Gets the picture settings desc. + /// + public string PictureSettingsDesc + { + get + { + string resolution = string.Empty; + switch (this.Anamorphic) + { + case Anamorphic.Strict: + resolution = "Anamorphic: Strict"; + break; + case Anamorphic.Loose: + resolution = "Anamorphic: Loose, Width: " + this.Width; + break; + case Anamorphic.Custom: + resolution = "Anamorphic: Custom, Resolution: " + this.Width + "x" + this.Height; + break; + case Anamorphic.None: + resolution = "Resolution: " + this.Width + "x" + this.Height; + break; + } + + return resolution + Environment.NewLine + "Crop Top: " + this.Cropping.Top + ", Botton: " + this.Cropping.Bottom + ", Left: " + + this.Cropping.Left + ", Right: " + this.Cropping.Right; + } + } + #endregion } } -- cgit v1.2.3