diff options
3 files changed, 55 insertions, 2 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Audio/AudioBehaviours.cs b/win/CS/HandBrake.ApplicationServices/Model/Audio/AudioBehaviours.cs index 4363ec56d..83b724972 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Audio/AudioBehaviours.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Audio/AudioBehaviours.cs @@ -10,6 +10,7 @@ namespace HandBrake.ApplicationServices.Model.Audio
{
using System.ComponentModel;
+ using System.Linq;
using Caliburn.Micro;
@@ -46,7 +47,7 @@ namespace HandBrake.ApplicationServices.Model.Audio public AudioBehaviours(AudioBehaviours behaviours)
{
this.SelectedBehaviour = behaviours.SelectedBehaviour;
- this.SelectedLangauges = new BindingList<string>(behaviours.selectedLangauges);
+ this.SelectedLangauges = new BindingList<string>(behaviours.selectedLangauges.ToList());
}
/// <summary>
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Preset.cs b/win/CS/HandBrake.ApplicationServices/Model/Preset.cs index 2bddd75aa..de07ae48d 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Preset.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Preset.cs @@ -146,5 +146,56 @@ namespace HandBrake.ApplicationServices.Model }
#endregion
+
+ /// <summary>
+ /// The equals.
+ /// </summary>
+ /// <param name="other">
+ /// The other.
+ /// </param>
+ /// <returns>
+ /// The <see cref="bool"/>.
+ /// </returns>
+ protected bool Equals(Preset other)
+ {
+ return string.Equals(this.Name, other.Name);
+ }
+
+ /// <summary>
+ /// The equals.
+ /// </summary>
+ /// <param name="obj">
+ /// The obj.
+ /// </param>
+ /// <returns>
+ /// The <see cref="bool"/>.
+ /// </returns>
+ public override bool Equals(object obj)
+ {
+ if (ReferenceEquals(null, obj))
+ {
+ return false;
+ }
+ if (ReferenceEquals(this, obj))
+ {
+ return true;
+ }
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+ return Equals((Preset)obj);
+ }
+
+ /// <summary>
+ /// The get hash code.
+ /// </summary>
+ /// <returns>
+ /// The <see cref="int"/>.
+ /// </returns>
+ public override int GetHashCode()
+ {
+ return (this.Name != null ? this.Name.GetHashCode() : 0);
+ }
}
}
\ No newline at end of file diff --git a/win/CS/HandBrake.ApplicationServices/Model/Subtitle/SubtitleBehaviours.cs b/win/CS/HandBrake.ApplicationServices/Model/Subtitle/SubtitleBehaviours.cs index c96357c3b..d944100db 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Subtitle/SubtitleBehaviours.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Subtitle/SubtitleBehaviours.cs @@ -10,6 +10,7 @@ namespace HandBrake.ApplicationServices.Model.Subtitle
{
using System.ComponentModel;
+ using System.Linq;
using Caliburn.Micro;
@@ -56,7 +57,7 @@ namespace HandBrake.ApplicationServices.Model.Subtitle public SubtitleBehaviours(SubtitleBehaviours behaviours)
{
this.SelectedBehaviour = behaviours.selectedBehaviour;
- this.SelectedLangauges = new BindingList<string>(behaviours.SelectedLangauges);
+ this.SelectedLangauges = new BindingList<string>(behaviours.SelectedLangauges.ToList());
}
/// <summary>
|