summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Model
diff options
context:
space:
mode:
authorsr55 <[email protected]>2014-02-22 17:10:47 +0000
committersr55 <[email protected]>2014-02-22 17:10:47 +0000
commit257b3cc03cb5dc4cf1c2006dd14282cd2ff904d5 (patch)
tree1e83af5e7eae55c2f129dc58a1094bbc66ae04de /win/CS/HandBrake.ApplicationServices/Model
parent98d752774490f3d15107fa1bb9f69ccedeaa2a53 (diff)
WinGui: Further work on the new Audio and Subtitle automatic behaviour system.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6060 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Model')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/Audio/AudioBehaviours.cs12
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/Preset.cs21
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/Subtitle/SubtitleBehaviours.cs12
3 files changed, 44 insertions, 1 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Audio/AudioBehaviours.cs b/win/CS/HandBrake.ApplicationServices/Model/Audio/AudioBehaviours.cs
index 119c8d26d..4363ec56d 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/Audio/AudioBehaviours.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/Audio/AudioBehaviours.cs
@@ -38,6 +38,18 @@ namespace HandBrake.ApplicationServices.Model.Audio
}
/// <summary>
+ /// Initializes a new instance of the <see cref="AudioBehaviours"/> class.
+ /// </summary>
+ /// <param name="behaviours">
+ /// The behaviours.
+ /// </param>
+ public AudioBehaviours(AudioBehaviours behaviours)
+ {
+ this.SelectedBehaviour = behaviours.SelectedBehaviour;
+ this.SelectedLangauges = new BindingList<string>(behaviours.selectedLangauges);
+ }
+
+ /// <summary>
/// Gets or sets the selected behaviour.
/// </summary>
public AudioBehaviourModes SelectedBehaviour
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Preset.cs b/win/CS/HandBrake.ApplicationServices/Model/Preset.cs
index 57faf2968..e281e12b6 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/Preset.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/Preset.cs
@@ -28,7 +28,6 @@ namespace HandBrake.ApplicationServices.Model
#endregion
-
#region Properties
/// <summary>
@@ -108,6 +107,26 @@ namespace HandBrake.ApplicationServices.Model
#region Public Methods
/// <summary>
+ /// Update this preset.
+ /// The given parameters should be copy-constructed.
+ /// </summary>
+ /// <param name="task">
+ /// The task.
+ /// </param>
+ /// <param name="audioBehaviours">
+ /// The audio behaviours.
+ /// </param>
+ /// <param name="subtitleBehaviours">
+ /// The subtitle behaviours.
+ /// </param>
+ public void Update(EncodeTask task, AudioBehaviours audioBehaviours, SubtitleBehaviours subtitleBehaviours)
+ {
+ this.Task = task;
+ this.AudioTrackBehaviours = audioBehaviours;
+ this.SubtitleTrackBehaviours = subtitleBehaviours;
+ }
+
+ /// <summary>
/// Override the ToString Method
/// </summary>
/// <returns>
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Subtitle/SubtitleBehaviours.cs b/win/CS/HandBrake.ApplicationServices/Model/Subtitle/SubtitleBehaviours.cs
index 28f5176d1..c96357c3b 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/Subtitle/SubtitleBehaviours.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/Subtitle/SubtitleBehaviours.cs
@@ -48,6 +48,18 @@ namespace HandBrake.ApplicationServices.Model.Subtitle
}
/// <summary>
+ /// Initializes a new instance of the <see cref="SubtitleBehaviours"/> class.
+ /// </summary>
+ /// <param name="behaviours">
+ /// The behaviours.
+ /// </param>
+ public SubtitleBehaviours(SubtitleBehaviours behaviours)
+ {
+ this.SelectedBehaviour = behaviours.selectedBehaviour;
+ this.SelectedLangauges = new BindingList<string>(behaviours.SelectedLangauges);
+ }
+
+ /// <summary>
/// Gets or sets the selected behaviour.
/// </summary>
public SubtitleBehaviourModes SelectedBehaviour