General changes to the expert tab.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1809 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-04-20 11:34:26 +00:00
commit 761b02df4d
8 changed files with 209 additions and 101 deletions

View file

@ -53,12 +53,7 @@ namespace GreenshotPlugin.Controls {
public void SetValue(Enum currentValue) {
if (currentValue != null) {
selectedEnum = currentValue;
string selectedEnumKey = enumType.Name + "." + currentValue.ToString();
if (Language.hasKey(selectedEnumKey)) {
this.SelectedItem = Language.GetString(selectedEnumKey);
} else {
this.SelectedItem = currentValue.ToString();
}
this.SelectedItem = Language.Translate(currentValue);
}
}
@ -75,13 +70,7 @@ namespace GreenshotPlugin.Controls {
this.Items.Clear();
string enumTypeName = enumType.Name;
foreach (var enumValue in availableValues) {
string enumKey = enumTypeName + "." + enumValue.ToString();
if (Language.hasKey(enumKey)) {
string translation = Language.GetString(enumKey);
this.Items.Add(translation);
} else {
this.Items.Add(enumValue.ToString());
}
this.Items.Add(Language.Translate((Enum)enumValue));
}
}