diff options
author | sr55 <[email protected]> | 2018-07-08 18:23:50 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2018-07-08 18:23:50 +0100 |
commit | e3a2f723adc662f1ba5707cdeeea62449c70fd7d (patch) | |
tree | 4441e761ff13613831d0fafb93dc75747d239852 /win/CS/HandBrake.Interop/Interop/Model | |
parent | e8c7818b83befe3a3e2fad73c61041b16d8d0055 (diff) |
WinGui: Simplify the Deinterlace / Decomb / Interlace Detection Tab and associated code. Tweak the layout of the deinterlace controls to match the Mac/Linux UI's. Pull Presets from libhb.
Diffstat (limited to 'win/CS/HandBrake.Interop/Interop/Model')
3 files changed, 25 insertions, 86 deletions
diff --git a/win/CS/HandBrake.Interop/Interop/Model/Encoding/Decomb.cs b/win/CS/HandBrake.Interop/Interop/Model/Encoding/Decomb.cs deleted file mode 100644 index 1fe70b421..000000000 --- a/win/CS/HandBrake.Interop/Interop/Model/Encoding/Decomb.cs +++ /dev/null @@ -1,34 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// <copyright file="Decomb.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> -// Defines the Decomb type. -// </summary> -// -------------------------------------------------------------------------------------------------------------------- - -namespace HandBrake.Interop.Interop.Model.Encoding -{ - using HandBrake.Interop.Attributes; - - /// <summary> - /// The decomb. - /// </summary> - public enum Decomb - { - [ShortName("default")] - Default, - - [ShortName("bob")] - Bob, - - [ShortName("custom")] - Custom, - - [ShortName("eedi2")] - EEDI2, - - [ShortName("eedi2bob")] - EEDI2Bob - } -} diff --git a/win/CS/HandBrake.Interop/Interop/Model/Encoding/Deinterlace.cs b/win/CS/HandBrake.Interop/Interop/Model/Encoding/Deinterlace.cs deleted file mode 100644 index 07c519a35..000000000 --- a/win/CS/HandBrake.Interop/Interop/Model/Encoding/Deinterlace.cs +++ /dev/null @@ -1,31 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// <copyright file="Deinterlace.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> -// Defines the Deinterlace type. -// </summary> -// -------------------------------------------------------------------------------------------------------------------- - -namespace HandBrake.Interop.Interop.Model.Encoding -{ - using HandBrake.Interop.Attributes; - - /// <summary> - /// The deinterlace. - /// </summary> - public enum Deinterlace - { - [ShortName("custom")] - Custom, - - [ShortName("default")] - Default, - - [ShortName("skip-spatial")] - SkipSpatialCheck, - - [ShortName("bob")] - Bob - } -} diff --git a/win/CS/HandBrake.Interop/Interop/Model/Encoding/HBPresetTune.cs b/win/CS/HandBrake.Interop/Interop/Model/Encoding/HBPresetTune.cs index 2954128d7..8f62b30ac 100644 --- a/win/CS/HandBrake.Interop/Interop/Model/Encoding/HBPresetTune.cs +++ b/win/CS/HandBrake.Interop/Interop/Model/Encoding/HBPresetTune.cs @@ -3,40 +3,44 @@ // This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. // </copyright> // <summary> -// Defines the HBPresetTune type. +// An object represetning the key and name of a Filter Preset or Tune option. // </summary> // -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.Interop.Interop.Model.Encoding { - /// <summary> - /// The hb preset tune. - /// </summary> public class HBPresetTune { - /// <summary> - /// Initializes a new instance of the <see cref="HBPresetTune"/> class. - /// </summary> - /// <param name="name"> - /// The name. - /// </param> - /// <param name="shortName"> - /// The short Name. - /// </param> + public HBPresetTune() + { + } + public HBPresetTune(string name, string shortName) { this.Name = name; this.ShortName = shortName; } - /// <summary> - /// Gets the name. - /// </summary> - public string Name { get; private set; } + public string Name { get; set; } + + public string ShortName { get; set; } + + 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 this.Equals((HBPresetTune)obj); + } + + public override int GetHashCode() + { + return this.ShortName != null ? this.ShortName.GetHashCode() : 0; + } - /// <summary> - /// Gets the short name. - /// </summary> - public string ShortName { get; private set; } + protected bool Equals(HBPresetTune other) + { + return string.Equals(this.ShortName, other.ShortName); + } } } |