summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Converters
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-04-08 19:34:20 +0000
committersr55 <[email protected]>2011-04-08 19:34:20 +0000
commit5f692a69a63f106cabe9dad4dfc85cc5c6d93cb9 (patch)
tree8f9762b3f7a4ad797ba7e8016d1d25bc9f94f709 /win/CS/HandBrake.ApplicationServices/Converters
parent122c93f2b05790907e79c9a292342b3763399948 (diff)
WinGui: AudioPanel refactored.
- Switch the Audio panel to use DataBinding to a BindingList collection leading to much cleaner code. - Added gain support (--gain=3,4) to the services library. (UI has not been done yet) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3911 b64f7644-9d1e-0410-96f1-a4d463321fa5
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);
+ }
+ }
+}