diff options
author | Scott <[email protected]> | 2015-09-26 21:05:40 +0100 |
---|---|---|
committer | Scott <[email protected]> | 2015-09-26 21:30:32 +0100 |
commit | 1320d77d36f096c7aa5b1697d3aaf9aa35d5e199 (patch) | |
tree | 1a9964eac27b7689b39a2e5adbf019a7295b6a9b /win/CS/HandBrakeWPF/Converters | |
parent | e703a7961f12a3e02c475754862a1f4a57a04646 (diff) |
App Services Tidyup Contd
Moving all the helper and utility classes to the gui project
Diffstat (limited to 'win/CS/HandBrakeWPF/Converters')
14 files changed, 83 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Converters/Audio/AudioBehaviourConverter.cs b/win/CS/HandBrakeWPF/Converters/Audio/AudioBehaviourConverter.cs index 7763a49d1..667e372b7 100644 --- a/win/CS/HandBrakeWPF/Converters/Audio/AudioBehaviourConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Audio/AudioBehaviourConverter.cs @@ -18,6 +18,7 @@ namespace HandBrakeWPF.Converters.Audio using HandBrake.ApplicationServices.Utilities;
using HandBrakeWPF.Model.Audio;
+ using HandBrakeWPF.Utilities;
/// <summary>
/// Audio Behaviour Converter
diff --git a/win/CS/HandBrakeWPF/Converters/Audio/AudioEncoderConverter.cs b/win/CS/HandBrakeWPF/Converters/Audio/AudioEncoderConverter.cs index e9bb60fce..06a079f8f 100644 --- a/win/CS/HandBrakeWPF/Converters/Audio/AudioEncoderConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Audio/AudioEncoderConverter.cs @@ -18,6 +18,8 @@ namespace HandBrakeWPF.Converters.Audio using HandBrake.ApplicationServices.Utilities;
+ using HandBrakeWPF.Utilities;
+
using AudioEncoder = HandBrakeWPF.Services.Encode.Model.Models.AudioEncoder;
using EncodeTask = HandBrakeWPF.Services.Encode.Model.EncodeTask;
using OutputFormat = HandBrakeWPF.Services.Encode.Model.Models.OutputFormat;
diff --git a/win/CS/HandBrakeWPF/Converters/Audio/AudioQueueDisplayConverter.cs b/win/CS/HandBrakeWPF/Converters/Audio/AudioQueueDisplayConverter.cs index d3072e131..512fa0774 100644 --- a/win/CS/HandBrakeWPF/Converters/Audio/AudioQueueDisplayConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Audio/AudioQueueDisplayConverter.cs @@ -17,6 +17,8 @@ namespace HandBrakeWPF.Converters.Audio using HandBrake.ApplicationServices.Utilities;
+ using HandBrakeWPF.Utilities;
+
using AudioEncoder = HandBrakeWPF.Services.Encode.Model.Models.AudioEncoder;
using AudioTrack = HandBrakeWPF.Services.Encode.Model.Models.AudioTrack;
diff --git a/win/CS/HandBrakeWPF/Converters/Audio/AudioRateTypeConverter.cs b/win/CS/HandBrakeWPF/Converters/Audio/AudioRateTypeConverter.cs index b7e9cd392..9808cbb58 100644 --- a/win/CS/HandBrakeWPF/Converters/Audio/AudioRateTypeConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Audio/AudioRateTypeConverter.cs @@ -16,6 +16,8 @@ namespace HandBrakeWPF.Converters.Audio using HandBrake.ApplicationServices.Utilities;
+ using HandBrakeWPF.Utilities;
+
using AudioEncoderRateType = HandBrakeWPF.Services.Encode.Model.Models.AudioEncoderRateType;
/// <summary>
diff --git a/win/CS/HandBrakeWPF/Converters/Audio/AudioTrackDefaultBehaviourConverter.cs b/win/CS/HandBrakeWPF/Converters/Audio/AudioTrackDefaultBehaviourConverter.cs index 2c779bbce..297488b65 100644 --- a/win/CS/HandBrakeWPF/Converters/Audio/AudioTrackDefaultBehaviourConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Audio/AudioTrackDefaultBehaviourConverter.cs @@ -18,6 +18,7 @@ namespace HandBrakeWPF.Converters.Audio using HandBrake.ApplicationServices.Utilities;
using HandBrakeWPF.Model.Audio;
+ using HandBrakeWPF.Utilities;
/// <summary>
/// Audio Behaviour Converter
diff --git a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs index 2c9f8bd90..2f92db92c 100644 --- a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs @@ -18,6 +18,9 @@ namespace HandBrakeWPF.Converters using HandBrake.ApplicationServices.Utilities;
using HandBrake.ApplicationServices.Interop.Model.Encoding;
+ using HandBrakeWPF.Services.Queue.Model;
+ using HandBrakeWPF.Utilities;
+
using OutputFormat = HandBrakeWPF.Services.Encode.Model.Models.OutputFormat;
using PresetPictureSettingsMode = HandBrakeWPF.Model.Picture.PresetPictureSettingsMode;
diff --git a/win/CS/HandBrakeWPF/Converters/EnumToDescConverter.cs b/win/CS/HandBrakeWPF/Converters/EnumToDescConverter.cs new file mode 100644 index 000000000..43c175e20 --- /dev/null +++ b/win/CS/HandBrakeWPF/Converters/EnumToDescConverter.cs @@ -0,0 +1,62 @@ +// -------------------------------------------------------------------------------------------------------------------- +// <copyright file="EnumToDescConverter.cs" company="HandBrake Project (http://handbrake.fr)"> +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// </copyright> +// <summary> +// Enum to Description Converter +// </summary> +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrake.ApplicationServices.Converters +{ + using System; + using System.ComponentModel; + + using HandBrake.ApplicationServices.Utilities; + + using HandBrakeWPF.Utilities; + + /// <summary> + /// Enum to Description Converter + /// </summary> + public class EnumToDescConverter : EnumConverter + { + /// <summary> + /// Initializes a new instance of the <see cref="EnumToDescConverter"/> class. + /// </summary> + /// <param name="type"> + /// The type. + /// </param> + public EnumToDescConverter(Type type) + : base(type) + { + } + + /// <summary> + /// Convert To an Object. + /// </summary> + /// <param name="context"> + /// The context. + /// </param> + /// <param name="culture"> + /// The culture. + /// </param> + /// <param name="value"> + /// The value. + /// </param> + /// <param name="destinationType"> + /// The destination type. + /// </param> + /// <returns> + /// The Enum Object + /// </returns> + public override object ConvertTo( + ITypeDescriptorContext context, + System.Globalization.CultureInfo culture, + object value, + Type destinationType) + { + return EnumHelper<Enum>.GetDescription((Enum)value); + } + } +} diff --git a/win/CS/HandBrakeWPF/Converters/Options/OptionsTabNameConverter.cs b/win/CS/HandBrakeWPF/Converters/Options/OptionsTabNameConverter.cs index beddd18be..b60e626f6 100644 --- a/win/CS/HandBrakeWPF/Converters/Options/OptionsTabNameConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Options/OptionsTabNameConverter.cs @@ -16,6 +16,7 @@ namespace HandBrakeWPF.Converters.Options using HandBrake.ApplicationServices.Utilities;
using HandBrakeWPF.Model;
+ using HandBrakeWPF.Utilities;
/// <summary>
/// A Converter to get the Display Name of each options tab.
diff --git a/win/CS/HandBrakeWPF/Converters/QueueStatusToVisibilityConverter.cs b/win/CS/HandBrakeWPF/Converters/QueueStatusToVisibilityConverter.cs index 68503b741..4392c162b 100644 --- a/win/CS/HandBrakeWPF/Converters/QueueStatusToVisibilityConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/QueueStatusToVisibilityConverter.cs @@ -16,6 +16,8 @@ namespace HandBrakeWPF.Converters using HandBrake.ApplicationServices.Model;
+ using HandBrakeWPF.Services.Queue.Model;
+
/// <summary>
/// Boolean to Visibility Converter
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Converters/Subtitles/SubtitleBehaviourConverter.cs b/win/CS/HandBrakeWPF/Converters/Subtitles/SubtitleBehaviourConverter.cs index e9acbe728..e488d71e8 100644 --- a/win/CS/HandBrakeWPF/Converters/Subtitles/SubtitleBehaviourConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Subtitles/SubtitleBehaviourConverter.cs @@ -18,6 +18,7 @@ namespace HandBrakeWPF.Converters.Subtitles using HandBrake.ApplicationServices.Utilities;
using HandBrakeWPF.Model.Subtitles;
+ using HandBrakeWPF.Utilities;
/// <summary>
/// Subtitle Behaviour Converter
diff --git a/win/CS/HandBrakeWPF/Converters/Subtitles/SubtitleBurnInBehaviourConverter.cs b/win/CS/HandBrakeWPF/Converters/Subtitles/SubtitleBurnInBehaviourConverter.cs index 76be941bc..af706b4c0 100644 --- a/win/CS/HandBrakeWPF/Converters/Subtitles/SubtitleBurnInBehaviourConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Subtitles/SubtitleBurnInBehaviourConverter.cs @@ -18,6 +18,7 @@ namespace HandBrakeWPF.Converters.Subtitles using HandBrake.ApplicationServices.Utilities;
using HandBrakeWPF.Model.Subtitles;
+ using HandBrakeWPF.Utilities;
/// <summary>
/// Subtitle Behaviour Converter
diff --git a/win/CS/HandBrakeWPF/Converters/Video/ScalingConverter.cs b/win/CS/HandBrakeWPF/Converters/Video/ScalingConverter.cs index d7f7779d5..442d525fe 100644 --- a/win/CS/HandBrakeWPF/Converters/Video/ScalingConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Video/ScalingConverter.cs @@ -17,6 +17,7 @@ namespace HandBrakeWPF.Converters.Video using HandBrake.ApplicationServices.Utilities;
using HandBrakeWPF.Model;
+ using HandBrakeWPF.Utilities;
/// <summary>
/// Video Scaling Converter
diff --git a/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs b/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs index a0aba003f..eb0a9c22a 100644 --- a/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs @@ -18,6 +18,8 @@ namespace HandBrakeWPF.Converters.Video using HandBrake.ApplicationServices.Utilities;
using HandBrake.ApplicationServices.Interop.Model.Encoding;
+ using HandBrakeWPF.Utilities;
+
using EncodeTask = HandBrakeWPF.Services.Encode.Model.EncodeTask;
using OutputFormat = HandBrakeWPF.Services.Encode.Model.Models.OutputFormat;
diff --git a/win/CS/HandBrakeWPF/Converters/Video/VideoOptionsTooltipConverter.cs b/win/CS/HandBrakeWPF/Converters/Video/VideoOptionsTooltipConverter.cs index edf14d6ee..3937cc373 100644 --- a/win/CS/HandBrakeWPF/Converters/Video/VideoOptionsTooltipConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Video/VideoOptionsTooltipConverter.cs @@ -16,6 +16,8 @@ namespace HandBrakeWPF.Converters.Video using HandBrake.ApplicationServices.Utilities;
using HandBrake.ApplicationServices.Interop.Model.Encoding;
+ using HandBrakeWPF.Utilities;
+
using EncodeTask = HandBrakeWPF.Services.Encode.Model.EncodeTask;
/// <summary>
|