summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Converters
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Converters')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Converters/EnumToDescConverter.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Converters/EnumToDescConverter.cs b/win/CS/HandBrake.ApplicationServices/Converters/EnumToDescConverter.cs
new file mode 100644
index 000000000..a03a3f071
--- /dev/null
+++ b/win/CS/HandBrake.ApplicationServices/Converters/EnumToDescConverter.cs
@@ -0,0 +1,24 @@
+namespace HandBrake.ApplicationServices.Converters
+{
+ using System.ComponentModel;
+ using System;
+
+ using HandBrake.ApplicationServices.Functions;
+
+ public class EnumToDescConveter : EnumConverter
+ {
+ public EnumToDescConveter(Type type)
+ : base(type)
+ {
+ }
+
+ public override object ConvertTo(
+ ITypeDescriptorContext context,
+ System.Globalization.CultureInfo culture,
+ object value,
+ Type destinationType)
+ {
+ return EnumHelper<Enum>.GetDescription((Enum)value);
+ }
+ }
+}