summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Model/InterfaceLanguage.cs
blob: e010e86bfcda26360fc102a8878af2a442e1b08e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="OptionsTab.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>
//   A enum representing each tab on the options screen.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace HandBrakeWPF.Model
{
    public class InterfaceLanguage
    {
        public InterfaceLanguage()
        {
        }

        public InterfaceLanguage(string culture, string name)
        {
            this.Culture = culture;
            this.Name = name;
        }

        public string Culture { get; set; }
        public string Name { get; set; }

        protected bool Equals(InterfaceLanguage other)
        {
            return string.Equals(this.Culture, other.Culture);
        }

        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((InterfaceLanguage)obj);
        }

        public override int GetHashCode()
        {
            return (this.Culture != null ? this.Culture.GetHashCode() : 0);
        }
    }
}