mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
A bit of refactoring to be able to find some issue...
This commit is contained in:
parent
bef29df3db
commit
42cd533862
308 changed files with 2705 additions and 2454 deletions
76
GreenshotPlugin/Core/LanguageFile.cs
Normal file
76
GreenshotPlugin/Core/LanguageFile.cs
Normal file
|
@ -0,0 +1,76 @@
|
|||
using System;
|
||||
|
||||
namespace GreenshotPlugin.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// This class contains the information about a language file
|
||||
/// </summary>
|
||||
public class LanguageFile : IEquatable<LanguageFile> {
|
||||
public string Description {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string Ietf {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public Version Version {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string LanguageGroup {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string Filepath {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string Prefix {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overload equals so we can delete a entry from a collection
|
||||
/// </summary>
|
||||
/// <param name="other"></param>
|
||||
/// <returns></returns>
|
||||
public bool Equals(LanguageFile other) {
|
||||
if (Prefix != null) {
|
||||
if (other != null && !Prefix.Equals(other.Prefix)) {
|
||||
return false;
|
||||
}
|
||||
} else if (other?.Prefix != null) {
|
||||
return false;
|
||||
}
|
||||
if (Ietf != null) {
|
||||
if (other != null && !Ietf.Equals(other.Ietf)) {
|
||||
return false;
|
||||
}
|
||||
} else if (other?.Ietf != null) {
|
||||
return false;
|
||||
}
|
||||
if (Version != null) {
|
||||
if (other != null && !Version.Equals(other.Version)) {
|
||||
return false;
|
||||
}
|
||||
} else if (other != null && other.Version != null) {
|
||||
return false;
|
||||
}
|
||||
if (Filepath != null) {
|
||||
if (other != null && !Filepath.Equals(other.Filepath)) {
|
||||
return false;
|
||||
}
|
||||
} else if (other?.Filepath != null) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue