mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 05:53:27 -07:00
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:
parent
a4df32c0e8
commit
eacbd114da
2 changed files with 20 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue