mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Performance fixes
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1918 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
959bcd3135
commit
e4a87aa4e4
2 changed files with 35 additions and 10 deletions
|
@ -489,6 +489,27 @@ namespace GreenshotPlugin.Core {
|
|||
}
|
||||
return resources.ContainsKey(key);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// TryGet method which combines hasKey & GetString
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="languageString">out string</param>
|
||||
/// <returns></returns>
|
||||
public static bool TryGetString(string key, out string languageString) {
|
||||
return resources.TryGetValue(key, out languageString);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// TryGet method which combines hasKey & GetString
|
||||
/// </summary>
|
||||
/// <param name="prefix">string with prefix</param>
|
||||
/// <param name="key">string with key</param>
|
||||
/// <param name="languageString">out string</param>
|
||||
/// <returns></returns>
|
||||
public static bool TryGetString(string prefix, string key, out string languageString) {
|
||||
return resources.TryGetValue(prefix + "." + key, out languageString);
|
||||
}
|
||||
|
||||
public static string Translate(object key) {
|
||||
string typename = key.GetType().Name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue