namespace HandBrake.ApplicationServices.Model.Audio\r
{\r
using System.ComponentModel;\r
+ using System.Linq;\r
\r
using Caliburn.Micro;\r
\r
public AudioBehaviours(AudioBehaviours behaviours)\r
{\r
this.SelectedBehaviour = behaviours.SelectedBehaviour;\r
- this.SelectedLangauges = new BindingList<string>(behaviours.selectedLangauges);\r
+ this.SelectedLangauges = new BindingList<string>(behaviours.selectedLangauges.ToList());\r
}\r
\r
/// <summary>\r
}\r
\r
#endregion\r
+\r
+ /// <summary>\r
+ /// The equals.\r
+ /// </summary>\r
+ /// <param name="other">\r
+ /// The other.\r
+ /// </param>\r
+ /// <returns>\r
+ /// The <see cref="bool"/>.\r
+ /// </returns>\r
+ protected bool Equals(Preset other)\r
+ {\r
+ return string.Equals(this.Name, other.Name);\r
+ }\r
+\r
+ /// <summary>\r
+ /// The equals.\r
+ /// </summary>\r
+ /// <param name="obj">\r
+ /// The obj.\r
+ /// </param>\r
+ /// <returns>\r
+ /// The <see cref="bool"/>.\r
+ /// </returns>\r
+ public override bool Equals(object obj)\r
+ {\r
+ if (ReferenceEquals(null, obj))\r
+ {\r
+ return false;\r
+ }\r
+ if (ReferenceEquals(this, obj))\r
+ {\r
+ return true;\r
+ }\r
+ if (obj.GetType() != this.GetType())\r
+ {\r
+ return false;\r
+ }\r
+ return Equals((Preset)obj);\r
+ }\r
+\r
+ /// <summary>\r
+ /// The get hash code.\r
+ /// </summary>\r
+ /// <returns>\r
+ /// The <see cref="int"/>.\r
+ /// </returns>\r
+ public override int GetHashCode()\r
+ {\r
+ return (this.Name != null ? this.Name.GetHashCode() : 0);\r
+ }\r
}\r
}
\ No newline at end of file
namespace HandBrake.ApplicationServices.Model.Subtitle\r
{\r
using System.ComponentModel;\r
+ using System.Linq;\r
\r
using Caliburn.Micro;\r
\r
public SubtitleBehaviours(SubtitleBehaviours behaviours)\r
{\r
this.SelectedBehaviour = behaviours.selectedBehaviour;\r
- this.SelectedLangauges = new BindingList<string>(behaviours.SelectedLangauges);\r
+ this.SelectedLangauges = new BindingList<string>(behaviours.SelectedLangauges.ToList());\r
}\r
\r
/// <summary>\r