diff options
author | sr55 <[email protected]> | 2015-04-04 21:09:12 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-04-04 21:09:12 +0000 |
commit | 343ffe36398605c25349cc5d49a043706d42f6b5 (patch) | |
tree | 7db7b5ca8efad28356159892b3cea704f2900a3a /win/CS/HandBrakeWPF/Model | |
parent | 8866868cf609fc66a304e80a11671727319f61d1 (diff) |
WinGui: Adding Subtitle Burn-in Behaviour Support.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7052 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Model')
-rw-r--r-- | win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviours.cs | 39 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBurnInBehaviourModes.cs | 31 |
2 files changed, 55 insertions, 15 deletions
diff --git a/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviours.cs b/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviours.cs index 8570f00e7..db5b7eb39 100644 --- a/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviours.cs +++ b/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviours.cs @@ -19,25 +19,11 @@ namespace HandBrakeWPF.Model.Subtitles /// </summary>
public class SubtitleBehaviours : PropertyChangedBase
{
- /// <summary>
- /// The selected behaviour.
- /// </summary>
private SubtitleBehaviourModes selectedBehaviour;
-
- /// <summary>
- /// The selected langauges.
- /// </summary>
private BindingList<string> selectedLangauges;
-
- /// <summary>
- /// The add foreign audio scan track.
- /// </summary>
private bool addForeignAudioScanTrack;
-
- /// <summary>
- /// The add closed captions.
- /// </summary>
private bool addClosedCaptions;
+ private SubtitleBurnInBehaviourModes selectedBurnInBehaviour;
/// <summary>
/// Initializes a new instance of the <see cref="SubtitleBehaviours"/> class.
@@ -45,6 +31,7 @@ namespace HandBrakeWPF.Model.Subtitles public SubtitleBehaviours()
{
this.SelectedBehaviour = SubtitleBehaviourModes.None;
+ this.SelectedBurnInBehaviour = SubtitleBurnInBehaviourModes.None;
this.SelectedLangauges = new BindingList<string>();
}
@@ -57,6 +44,7 @@ namespace HandBrakeWPF.Model.Subtitles public SubtitleBehaviours(SubtitleBehaviours behaviours)
{
this.SelectedBehaviour = behaviours.selectedBehaviour;
+ this.SelectedBurnInBehaviour = behaviours.selectedBurnInBehaviour;
this.SelectedLangauges = new BindingList<string>(behaviours.SelectedLangauges.ToList());
}
@@ -81,6 +69,26 @@ namespace HandBrakeWPF.Model.Subtitles }
/// <summary>
+ /// Gets or sets the selected burn in behaviour.
+ /// </summary>
+ public SubtitleBurnInBehaviourModes SelectedBurnInBehaviour
+ {
+ get
+ {
+ return this.selectedBurnInBehaviour;
+ }
+ set
+ {
+ if (value == this.selectedBurnInBehaviour)
+ {
+ return;
+ }
+ this.selectedBurnInBehaviour = value;
+ this.NotifyOfPropertyChange(() => this.SelectedBurnInBehaviour);
+ }
+ }
+
+ /// <summary>
/// Gets or sets the selected langages.
/// </summary>
public BindingList<string> SelectedLangauges
@@ -151,6 +159,7 @@ namespace HandBrakeWPF.Model.Subtitles SubtitleBehaviours cloned = new SubtitleBehaviours
{
SelectedBehaviour = this.selectedBehaviour,
+ SelectedBurnInBehaviour = this.selectedBurnInBehaviour,
SelectedLangauges = new BindingList<string>(),
AddClosedCaptions = this.addClosedCaptions,
AddForeignAudioScanTrack = this.addForeignAudioScanTrack,
diff --git a/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBurnInBehaviourModes.cs b/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBurnInBehaviourModes.cs new file mode 100644 index 000000000..174b4a5e8 --- /dev/null +++ b/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBurnInBehaviourModes.cs @@ -0,0 +1,31 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="SubtitleBurnInBehaviourModes.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>
+// The subtitle behaviours modes.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Model.Subtitles
+{
+ using System.ComponentModel.DataAnnotations;
+
+ /// <summary>
+ /// The subtitle behaviours modes.
+ /// </summary>
+ public enum SubtitleBurnInBehaviourModes
+ {
+ [Display(Name = "None")]
+ None = 0,
+
+ [Display(Name = "Foreign Audio Track")]
+ ForeignAudio,
+
+ [Display(Name = "First Track")]
+ FirstTrack,
+
+ [Display(Name = "Foreign Audio Preferred, else First")]
+ ForeignAudioPreferred,
+ }
+}
|