Small stability improvements

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1767 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-04-11 06:36:49 +00:00
commit eacbd114da
2 changed files with 20 additions and 0 deletions

View file

@ -379,18 +379,30 @@ namespace GreenshotPlugin.Core {
}
public bool hasKey(Enum key) {
if (key == null) {
return false;
}
return hasKey(key.ToString());
}
public bool hasKey(string key) {
if (key == null) {
return false;
}
return strings.ContainsKey(key);
}
public string GetString(Enum key) {
if (key == null) {
return null;
}
return GetString(key.ToString());
}
public string GetString(string key) {
if (key == null) {
return null;
}
try {
return strings[key];
} catch (KeyNotFoundException) {