diff options
author | sr55 <[email protected]> | 2011-09-11 13:32:33 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-09-11 13:32:33 +0000 |
commit | 609dbfdcf8cda1035b1af3af6b2a2598d72d602d (patch) | |
tree | 9470ac002bbffa54c49aba8b72c475873ee203a7 /win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs | |
parent | 44ba40eb45932d432fd51aec058b4b7d08957857 (diff) |
WinGui: Some further work removing duplicate models, updating the libscan/encode services, fixes to the EnumHelper
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4215 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs b/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs index 53d7f6069..ad565f0b7 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs @@ -41,7 +41,7 @@ namespace HandBrake.ApplicationServices.Functions /// </summary>
/// <param name="value">An Enum with Display Attributes</param>
/// <returns>A string name</returns>
- public static string GetDisplayValue(T value)
+ public static string GetDisplay(T value)
{
FieldInfo fieldInfo = value.GetType().GetField(value.ToString());
DisplayAttribute[] attributes = (DisplayAttribute[])fieldInfo.GetCustomAttributes(typeof(DisplayAttribute), false);
@@ -59,7 +59,8 @@ namespace HandBrake.ApplicationServices.Functions foreach (T val in Enum.GetValues(typeof(T)))
{
string currDescription = GetDescription(val);
- if (currDescription == description)
+ string currDisplay = GetDisplay(val);
+ if (currDescription == description || currDisplay == description)
{
return val;
}
|