From 1befa4f1a72a9e8b0277b4ff04b0200dd884f6bc Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 24 Mar 2012 16:17:04 +0000 Subject: WinGui: (WPF) Fixes to the Audio and Subtitle panels. Add pdb's to installer. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4532 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Model/Encoding/AllowedPassthru.cs | 6 ++ .../Model/Encoding/SubtitleTrack.cs | 88 ++++++++++++++++------ 2 files changed, 69 insertions(+), 25 deletions(-) (limited to 'win/CS/HandBrake.ApplicationServices/Model/Encoding') diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AllowedPassthru.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AllowedPassthru.cs index 4b86fc9a1..31447355b 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AllowedPassthru.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AllowedPassthru.cs @@ -58,6 +58,12 @@ namespace HandBrake.ApplicationServices.Model.Encoding this.AudioEncoderFallback = initialValue.AudioEncoderFallback; } + /// + /// Gets or sets a value indicating whether IsEnabled. + /// Temp Measure until forms gui is retired. + /// + public bool IsEnabled { get; set; } + /// /// Gets or sets a value indicating whether AudioAllowAACPass. /// diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs index c15b9db02..b1ae05a0d 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs @@ -12,15 +12,27 @@ namespace HandBrake.ApplicationServices.Model.Encoding using System; using System.Windows.Forms; + using Caliburn.Micro; + using HandBrake.ApplicationServices.Parsing; /// /// Subtitle Information /// - public class SubtitleTrack : ModelBase + public class SubtitleTrack : PropertyChangedBase { #region Constants and Fields + /// + /// The burned in backing field. + /// + private bool burned; + + /// + /// The is default backing field. + /// + private bool isDefault; + /// /// The source track. /// @@ -28,6 +40,8 @@ namespace HandBrake.ApplicationServices.Model.Encoding #endregion + #region Constructors and Destructors + /// /// Initializes a new instance of the class. /// @@ -57,18 +71,43 @@ namespace HandBrake.ApplicationServices.Model.Encoding this.SourceTrack = subtitle.SourceTrack; } - #region Public Properties + #endregion + #region Properties /// /// Gets or sets a value indicating whether Burned. /// - public bool Burned { get; set; } + public bool Burned + { + get + { + return this.burned; + } + + set + { + this.burned = value; + this.NotifyOfPropertyChange(() => this.Burned); + } + } /// /// Gets or sets a value indicating whether Default. /// - public bool Default { get; set; } + public bool Default + { + get + { + return this.isDefault; + } + + set + { + this.isDefault = value; + this.NotifyOfPropertyChange(() => this.Default); + } + } /// /// Gets or sets a value indicating whether Forced. @@ -87,11 +126,23 @@ namespace HandBrake.ApplicationServices.Model.Encoding } /// - /// Gets or sets Track. + /// Gets A ListViewItem Containing information about this subitlte /// - [Obsolete("Use SourceTrack Instead")] - public string Track { get; set; } - + [Obsolete("Used only for the old forms gui. Will be removed.")] + public ListViewItem ListView + { + get + { + var listTrack = new ListViewItem(this.Track); + listTrack.SubItems.Add(this.Forced ? "Yes" : "No"); + listTrack.SubItems.Add(this.Burned ? "Yes" : "No"); + listTrack.SubItems.Add(this.Default ? "Yes" : "No"); + listTrack.SubItems.Add(this.SrtLang); + listTrack.SubItems.Add(this.SrtCharCode); + listTrack.SubItems.Add(this.SrtOffset.ToString()); + return listTrack; + } + } /// /// Gets or sets SourceTrack. @@ -106,7 +157,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding set { this.sourceTrack = value; - this.OnPropertyChanged("SourceTrack"); + this.NotifyOfPropertyChange(() => this.SourceTrack); if (this.sourceTrack != null) { this.Track = this.sourceTrack.ToString(); @@ -145,23 +196,10 @@ namespace HandBrake.ApplicationServices.Model.Encoding public SubtitleType SubtitleType { get; set; } /// - /// Gets A ListViewItem Containing information about this subitlte + /// Gets or sets Track. /// - [Obsolete("Used only for the old forms gui. Will be removed.")] - public ListViewItem ListView - { - get - { - var listTrack = new ListViewItem(this.Track); - listTrack.SubItems.Add(this.Forced ? "Yes" : "No"); - listTrack.SubItems.Add(this.Burned ? "Yes" : "No"); - listTrack.SubItems.Add(this.Default ? "Yes" : "No"); - listTrack.SubItems.Add(this.SrtLang); - listTrack.SubItems.Add(this.SrtCharCode); - listTrack.SubItems.Add(this.SrtOffset.ToString()); - return listTrack; - } - } + [Obsolete("Use SourceTrack Instead")] + public string Track { get; set; } #endregion } -- cgit v1.2.3