summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs3
-rw-r--r--win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviours.cs3
-rw-r--r--win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs51
3 files changed, 55 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs b/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs
index e6bb5a398..6ffd45db1 100644
--- a/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs
+++ b/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs
@@ -10,6 +10,7 @@
namespace HandBrakeWPF.Model.Audio
{
using System.ComponentModel;
+ using System.Linq;
using Caliburn.Micro;
@@ -46,7 +47,7 @@ namespace HandBrakeWPF.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/HandBrakeWPF/Model/Subtitles/SubtitleBehaviours.cs b/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviours.cs
index 8bf58fb60..8570f00e7 100644
--- a/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviours.cs
+++ b/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviours.cs
@@ -10,6 +10,7 @@
namespace HandBrakeWPF.Model.Subtitles
{
using System.ComponentModel;
+ using System.Linq;
using Caliburn.Micro;
@@ -56,7 +57,7 @@ namespace HandBrakeWPF.Model.Subtitles
public SubtitleBehaviours(SubtitleBehaviours 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/HandBrakeWPF/Services/Presets/Model/Preset.cs b/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs
index 0f18c5b86..6f1da9c99 100644
--- a/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs
+++ b/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs
@@ -150,5 +150,56 @@ namespace HandBrakeWPF.Services.Presets.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