diff options
author | sr55 <[email protected]> | 2014-08-21 15:47:07 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2014-08-21 15:47:07 +0000 |
commit | 2839ca4c710c080467da7f9d485446400b1e4588 (patch) | |
tree | 7e92e723d206a758e66353090654f4dae136dbef /win/CS/HandBrakeWPF/Converters | |
parent | 084f08caa5811d92c8865e9ec46a7849f00a9294 (diff) |
WinGui: Use OutputFormat display name, rather than the enum name.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6330 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Converters')
-rw-r--r-- | win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs index 9214745e8..e0aceaf25 100644 --- a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs @@ -15,6 +15,7 @@ namespace HandBrakeWPF.Converters using System;
using HandBrake.ApplicationServices.Model;
+ using HandBrake.ApplicationServices.Model.Encoding;
using HandBrake.ApplicationServices.Utilities;
using HandBrake.Interop.Model.Encoding;
using HandBrake.Interop.Model.Encoding.x264;
@@ -69,7 +70,6 @@ namespace HandBrakeWPF.Converters {
return EnumHelper<QsvPreset>.GetDisplay((QsvPreset)value);
}
-
if (value is IEnumerable<PresetPictureSettingsMode>)
{
return EnumHelper<PresetPictureSettingsMode>.GetEnumDisplayValues(typeof(PresetPictureSettingsMode));
@@ -90,11 +90,14 @@ namespace HandBrakeWPF.Converters {
return EnumHelper<Denoise>.GetEnumDisplayValues(typeof(Denoise));
}
-
if (value is IEnumerable<VideoScaler>)
{
return EnumHelper<VideoScaler>.GetEnumDisplayValues(typeof(VideoScaler));
}
+ if (value is IEnumerable<OutputFormat>)
+ {
+ return EnumHelper<OutputFormat>.GetEnumDisplayValues(typeof(OutputFormat));
+ }
// Single Items
if (targetType == typeof(x264Preset) || value.GetType() == typeof(x264Preset))
@@ -148,6 +151,11 @@ namespace HandBrakeWPF.Converters return EnumHelper<VideoScaler>.GetDisplay((VideoScaler)value);
}
+ if (targetType == typeof(OutputFormat) || value.GetType() == typeof(OutputFormat))
+ {
+ return EnumHelper<OutputFormat>.GetDisplay((OutputFormat)value);
+ }
+
return null;
}
@@ -223,6 +231,11 @@ namespace HandBrakeWPF.Converters return EnumHelper<VideoScaler>.GetValue(value.ToString());
}
+ if (targetType == typeof(OutputFormat) || value.GetType() == typeof(OutputFormat))
+ {
+ return EnumHelper<OutputFormat>.GetValue(value.ToString());
+ }
+
return null;
}
}
|