summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-01-22 20:45:08 +0000
committersr55 <[email protected]>2012-01-22 20:45:08 +0000
commitdab8b3b4cfbe05f84bb89fb76252c68c41d3a06f (patch)
tree4153040ed252f0f5a13a9a8a50c9fd8c7289f2ac /win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs
parent35018826f82041b6ed7bd6b445f07bd64cb178fd (diff)
WinGui: (WPF) Further work on the Audio and Subtitle tabs along with the API & Utilities.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4418 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs b/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs
index 8147f527f..0308069f9 100644
--- a/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs
+++ b/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs
@@ -10,6 +10,7 @@ namespace HandBrake.ApplicationServices.Functions
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
+ using System.Linq;
using System.Reflection;
/// <summary>
@@ -72,6 +73,17 @@ namespace HandBrake.ApplicationServices.Functions
}
/// <summary>
+ /// Return a list of all the enum values.
+ /// </summary>
+ /// <returns>
+ /// An Enum Oject List
+ /// </returns>
+ public static IEnumerable<T> GetEnumList()
+ {
+ return Enum.GetValues(typeof(T)).Cast<T>().ToList();
+ }
+
+ /// <summary>
/// Get a list of string names for each enum value.
/// </summary>
/// <param name="enumType">