From 7f7055ee54f9dfb0cdad5c73841452fd8491f51e Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 20 Jul 2012 17:06:08 +0000 Subject: [PATCH] WinGui: Move some stuff around in the services library and refactor out some legacy code. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4868 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Converters/EnumToDescConverter.cs | 2 +- .../HandBrake.ApplicationServices.csproj | 17 +++---- .../Model/Encoding/AudioTrack.cs | 2 +- .../Parsing/Subtitle.cs | 2 +- .../Parsing/Title.cs | 4 +- .../ServiceManager.cs | 49 ------------------- .../Services/Base/EncodeBase.cs | 5 +- .../Services/Encode.cs | 8 +-- .../Services/LibEncode.cs | 11 +++-- .../Services/LibScan.cs | 7 ++- .../Services/PresetService.cs | 4 +- .../Services/QueueProcessor.cs | 2 +- .../Services/ScanService.cs | 6 ++- .../{Functions => Utilities}/Converters.cs | 5 +- .../{Functions => Utilities}/EnumHelper.cs | 2 +- .../Utilities/GeneralUtilities.cs | 1 - .../GrowlCommunicator.cs | 2 +- .../InteropModelCreator.cs | 4 +- .../{Functions => Utilities}/PlistHelper.cs | 2 +- .../Utilities/PlistUtility.cs | 5 +- .../Utilities/QueryGeneratorUtility.cs | 5 +- .../Utilities/QueryParserUtility.cs | 1 - .../{Functions => Utilities}/SystemInfo.cs | 2 +- .../{Functions => Utilities}/Win32.cs | 4 +- .../{Functions => Utilities}/Win7.cs | 2 +- .../Interfaces/IHandBrakeInstance.cs | 6 +++ .../Converters/Audio/AudioEncoderConverter.cs | 2 +- .../Audio/AudioQueueDisplayConverter.cs | 2 +- .../Converters/EnumComboConverter.cs | 2 +- .../Converters/Video/VideoEncoderConverter.cs | 2 +- .../ViewModels/AddPresetViewModel.cs | 3 +- .../HandBrakeWPF/ViewModels/AudioViewModel.cs | 2 +- .../ViewModels/FiltersViewModel.cs | 2 +- .../HandBrakeWPF/ViewModels/VideoViewModel.cs | 2 +- 34 files changed, 74 insertions(+), 103 deletions(-) delete mode 100644 win/CS/HandBrake.ApplicationServices/ServiceManager.cs rename win/CS/HandBrake.ApplicationServices/{Functions => Utilities}/Converters.cs (96%) rename win/CS/HandBrake.ApplicationServices/{Functions => Utilities}/EnumHelper.cs (96%) rename win/CS/HandBrake.ApplicationServices/{Functions => Utilities}/GrowlCommunicator.cs (96%) rename win/CS/HandBrake.ApplicationServices/{Functions => Utilities}/InteropModelCreator.cs (95%) rename win/CS/HandBrake.ApplicationServices/{Functions => Utilities}/PlistHelper.cs (95%) rename win/CS/HandBrake.ApplicationServices/{Functions => Utilities}/SystemInfo.cs (94%) rename win/CS/HandBrake.ApplicationServices/{Functions => Utilities}/Win32.cs (95%) rename win/CS/HandBrake.ApplicationServices/{Functions => Utilities}/Win7.cs (94%) diff --git a/win/CS/HandBrake.ApplicationServices/Converters/EnumToDescConverter.cs b/win/CS/HandBrake.ApplicationServices/Converters/EnumToDescConverter.cs index a9cc5410b..d53905361 100644 --- a/win/CS/HandBrake.ApplicationServices/Converters/EnumToDescConverter.cs +++ b/win/CS/HandBrake.ApplicationServices/Converters/EnumToDescConverter.cs @@ -12,7 +12,7 @@ namespace HandBrake.ApplicationServices.Converters using System; using System.ComponentModel; - using HandBrake.ApplicationServices.Functions; + using HandBrake.ApplicationServices.Utilities; /// /// Enum to Description Converter diff --git a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj index 7fa820e4c..705911f4a 100644 --- a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj +++ b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj @@ -100,14 +100,14 @@ - - - - - - - - + + + + + + + + @@ -134,7 +134,6 @@ True Resources.resx - diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs index 828fc6a70..7af4806f7 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs @@ -15,8 +15,8 @@ namespace HandBrake.ApplicationServices.Model.Encoding using Caliburn.Micro; - using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Parsing; + using HandBrake.ApplicationServices.Utilities; using HandBrake.Interop.Model.Encoding; /// diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs index 20deeae1b..34a919908 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs @@ -14,8 +14,8 @@ namespace HandBrake.ApplicationServices.Parsing using System.IO; using System.Text.RegularExpressions; - using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model.Encoding; + using HandBrake.ApplicationServices.Utilities; /// /// An object that represents a subtitle associated with a Title, in a DVD diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs index 8b3667271..454627fa9 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs @@ -16,6 +16,8 @@ namespace HandBrake.ApplicationServices.Parsing using System.Linq; using System.Text.RegularExpressions; + using Caliburn.Micro; + using HandBrake.ApplicationServices.Services.Interfaces; using HandBrake.Interop.Model; @@ -29,7 +31,7 @@ namespace HandBrake.ApplicationServices.Parsing /// /// The User Setting Service /// - private static IUserSettingService userSettingService = ServiceManager.UserSettingService; + private static IUserSettingService userSettingService = IoC.Get(); /// /// Initializes a new instance of the class. diff --git a/win/CS/HandBrake.ApplicationServices/ServiceManager.cs b/win/CS/HandBrake.ApplicationServices/ServiceManager.cs deleted file mode 100644 index 41775a287..000000000 --- a/win/CS/HandBrake.ApplicationServices/ServiceManager.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. -// -// -// Tempory Class which manages services until Windosor is added back into the project to handle it for us. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace HandBrake.ApplicationServices -{ - using Caliburn.Micro; - - using HandBrake.ApplicationServices.Services.Interfaces; - using HandBrake.Interop; - - /// - /// Tempory Class which manages services until Windosor is added back into the project to handle it for us. - /// - public class ServiceManager - { - /// - /// The Backing field for HandBrake Instance. - /// - private static HandBrakeInstance handBrakeInstance; - - /// - /// Gets UserSettingService. - /// - public static IUserSettingService UserSettingService - { - get - { - return IoC.Get(); - } - } - - /// - /// Gets HandBrakeInstance. - /// - public static HandBrakeInstance HandBrakeInstance - { - get - { - return handBrakeInstance ?? (handBrakeInstance = new HandBrakeInstance()); - } - } - } -} diff --git a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs index e04c4e830..e20215bcf 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs @@ -13,9 +13,10 @@ namespace HandBrake.ApplicationServices.Services.Base using System.IO; using System.Text; + using Caliburn.Micro; + using HandBrake.ApplicationServices.EventArgs; using HandBrake.ApplicationServices.Exceptions; - using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Services.Interfaces; using HandBrake.ApplicationServices.Utilities; @@ -35,7 +36,7 @@ namespace HandBrake.ApplicationServices.Services.Base /// /// The User Setting Service /// - private IUserSettingService userSettingService = ServiceManager.UserSettingService; + private IUserSettingService userSettingService = IoC.Get(); /// /// Windows 7 API Pack wrapper diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs index 7553456d5..f0f1b656b 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs @@ -15,14 +15,16 @@ namespace HandBrake.ApplicationServices.Services using System.Threading; using System.Windows.Forms; + using Caliburn.Micro; + using HandBrake.ApplicationServices.EventArgs; - using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model; - using HandBrake.ApplicationServices.Parsing; using HandBrake.ApplicationServices.Services.Base; using HandBrake.ApplicationServices.Services.Interfaces; using HandBrake.ApplicationServices.Utilities; + using Parser = HandBrake.ApplicationServices.Parsing.Parser; + /// /// Class which handles the CLI /// @@ -33,7 +35,7 @@ namespace HandBrake.ApplicationServices.Services /// /// The User Setting Service /// - private IUserSettingService userSettingService = ServiceManager.UserSettingService; + private IUserSettingService userSettingService = IoC.Get(); /// /// Gets The Process Handle diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs index 1fe1845ad..086305f4e 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs @@ -12,11 +12,14 @@ namespace HandBrake.ApplicationServices.Services using System; using System.Diagnostics; - using HandBrake.ApplicationServices.Functions; + using Caliburn.Micro; + using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Services.Base; using HandBrake.ApplicationServices.Services.Interfaces; + using HandBrake.ApplicationServices.Utilities; using HandBrake.Interop; + using HandBrake.Interop.Interfaces; using HandBrake.Interop.Model; using EncodeCompletedEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs; @@ -37,7 +40,7 @@ namespace HandBrake.ApplicationServices.Services /// /// The User Setting Service /// - private IUserSettingService userSettingService = ServiceManager.UserSettingService; + private IUserSettingService userSettingService = IoC.Get(); /// /// The Start time of the current Encode; @@ -47,7 +50,7 @@ namespace HandBrake.ApplicationServices.Services /// /// An Instance of the HandBrake Interop Library /// - private HandBrakeInstance instance; + private IHandBrakeInstance instance; /// /// A flag to indicate if logging is enabled or not. @@ -62,7 +65,7 @@ namespace HandBrake.ApplicationServices.Services public LibEncode() { // Setup the HandBrake Instance - this.instance = ServiceManager.HandBrakeInstance; + this.instance = IoC.Get(); this.instance.EncodeCompleted += this.InstanceEncodeCompleted; this.instance.EncodeProgress += this.InstanceEncodeProgress; diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs index 4957a62bb..a25f3a2a6 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs @@ -14,12 +14,15 @@ namespace HandBrake.ApplicationServices.Services using System.Text; using System.Threading; + using Caliburn.Micro; + using HandBrake.ApplicationServices.EventArgs; using HandBrake.ApplicationServices.Model.Encoding; using HandBrake.ApplicationServices.Parsing; using HandBrake.ApplicationServices.Services.Interfaces; using HandBrake.ApplicationServices.Utilities; using HandBrake.Interop; + using HandBrake.Interop.Interfaces; using AudioTrack = HandBrake.ApplicationServices.Parsing.Audio; using ScanProgressEventArgs = HandBrake.Interop.ScanProgressEventArgs; @@ -47,7 +50,7 @@ namespace HandBrake.ApplicationServices.Services /// /// LibHB Instance /// - private readonly HandBrakeInstance instance; + private readonly IHandBrakeInstance instance; /// /// Log data from HandBrakeInstance @@ -68,7 +71,7 @@ namespace HandBrake.ApplicationServices.Services { logging = new StringBuilder(); - instance = ServiceManager.HandBrakeInstance; + instance = IoC.Get(); instance.Initialize(1); instance.ScanProgress += this.InstanceScanProgress; instance.ScanCompleted += this.InstanceScanCompleted; diff --git a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs index 8337ddd56..2ddd775aa 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs @@ -19,6 +19,8 @@ namespace HandBrake.ApplicationServices.Services using System.Text.RegularExpressions; using System.Xml.Serialization; + using Caliburn.Micro; + using HandBrake.ApplicationServices.Exceptions; using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Services.Interfaces; @@ -67,7 +69,7 @@ namespace HandBrake.ApplicationServices.Services /// /// The User Setting Service /// - private IUserSettingService userSettingService = ServiceManager.UserSettingService; + private IUserSettingService userSettingService = IoC.Get(); #endregion diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs index effe9f9b5..cd1ff226d 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs @@ -17,9 +17,9 @@ namespace HandBrake.ApplicationServices.Services using Caliburn.Micro; using HandBrake.ApplicationServices.EventArgs; - using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Services.Interfaces; + using HandBrake.ApplicationServices.Utilities; /// /// The HandBrake Queue diff --git a/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs b/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs index 5eb1f0a37..7edbdb320 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs @@ -16,12 +16,16 @@ namespace HandBrake.ApplicationServices.Services using System.Threading; using System.Windows.Forms; + using Caliburn.Micro; + using HandBrake.ApplicationServices.EventArgs; using HandBrake.ApplicationServices.Exceptions; using HandBrake.ApplicationServices.Parsing; using HandBrake.ApplicationServices.Services.Interfaces; using HandBrake.ApplicationServices.Utilities; + using Parser = HandBrake.ApplicationServices.Parsing.Parser; + /// /// Scan a Source /// @@ -52,7 +56,7 @@ namespace HandBrake.ApplicationServices.Services /// /// The User Setting Service /// - private IUserSettingService userSettingService = ServiceManager.UserSettingService; + private IUserSettingService userSettingService = IoC.Get(); #endregion diff --git a/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs b/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs similarity index 96% rename from win/CS/HandBrake.ApplicationServices/Functions/Converters.cs rename to win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs index 2f930f30f..e2b11d4b8 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs @@ -7,16 +7,15 @@ // // -------------------------------------------------------------------------------------------------------------------- -namespace HandBrake.ApplicationServices.Functions +namespace HandBrake.ApplicationServices.Utilities { using System; using System.Text.RegularExpressions; + using HandBrake.ApplicationServices.Model.Encoding; using HandBrake.Interop.Model.Encoding; using HandBrake.Interop.Model.Encoding.x264; - using OutputFormat = HandBrake.ApplicationServices.Model.Encoding.OutputFormat; - /// /// A class to convert various things to native C# objects /// diff --git a/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs b/win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs similarity index 96% rename from win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs rename to win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs index fa1a8df3e..d6c972b5e 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs @@ -7,7 +7,7 @@ // // -------------------------------------------------------------------------------------------------------------------- -namespace HandBrake.ApplicationServices.Functions +namespace HandBrake.ApplicationServices.Utilities { using System; using System.Collections.Generic; diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs b/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs index 773de5bfc..83ea717e0 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs @@ -19,7 +19,6 @@ namespace HandBrake.ApplicationServices.Utilities using Caliburn.Micro; - using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Services.Interfaces; diff --git a/win/CS/HandBrake.ApplicationServices/Functions/GrowlCommunicator.cs b/win/CS/HandBrake.ApplicationServices/Utilities/GrowlCommunicator.cs similarity index 96% rename from win/CS/HandBrake.ApplicationServices/Functions/GrowlCommunicator.cs rename to win/CS/HandBrake.ApplicationServices/Utilities/GrowlCommunicator.cs index ca195c000..d49924ed0 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/GrowlCommunicator.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/GrowlCommunicator.cs @@ -7,7 +7,7 @@ // // -------------------------------------------------------------------------------------------------------------------- -namespace HandBrake.ApplicationServices.Functions +namespace HandBrake.ApplicationServices.Utilities { using System; diff --git a/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs b/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs similarity index 95% rename from win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs rename to win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs index e58e1a5fe..6a5be06cb 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs @@ -7,7 +7,7 @@ // // -------------------------------------------------------------------------------------------------------------------- -namespace HandBrake.ApplicationServices.Functions +namespace HandBrake.ApplicationServices.Utilities { using System; using System.Collections.Generic; @@ -18,8 +18,6 @@ namespace HandBrake.ApplicationServices.Functions using HandBrake.Interop.Model; using HandBrake.Interop.Model.Encoding; - using OutputFormat = HandBrake.ApplicationServices.Model.Encoding.OutputFormat; - /// /// A Utility Class to Convert a /// diff --git a/win/CS/HandBrake.ApplicationServices/Functions/PlistHelper.cs b/win/CS/HandBrake.ApplicationServices/Utilities/PlistHelper.cs similarity index 95% rename from win/CS/HandBrake.ApplicationServices/Functions/PlistHelper.cs rename to win/CS/HandBrake.ApplicationServices/Utilities/PlistHelper.cs index 478e21b83..f5e810771 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/PlistHelper.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/PlistHelper.cs @@ -7,7 +7,7 @@ // // -------------------------------------------------------------------------------------------------------------------- -namespace HandBrake.ApplicationServices.Functions +namespace HandBrake.ApplicationServices.Utilities { using System; using System.Collections.Generic; diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs index 6cf009285..dcedefad9 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs @@ -16,7 +16,8 @@ namespace HandBrake.ApplicationServices.Utilities using System.Windows.Forms; using System.Xml; - using HandBrake.ApplicationServices.Functions; + using Caliburn.Micro; + using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Model.Encoding; using HandBrake.ApplicationServices.Services; @@ -31,7 +32,7 @@ namespace HandBrake.ApplicationServices.Utilities /// /// The User Setting Service /// - private static IUserSettingService userSettingService = ServiceManager.UserSettingService; + private static IUserSettingService userSettingService = IoC.Get(); #region Import diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index 7e1c0bf41..4b5071984 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -15,7 +15,8 @@ namespace HandBrake.ApplicationServices.Utilities using System.Globalization; using System.IO; - using HandBrake.ApplicationServices.Functions; + using Caliburn.Micro; + using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Model.Encoding; using HandBrake.ApplicationServices.Services.Interfaces; @@ -30,7 +31,7 @@ namespace HandBrake.ApplicationServices.Utilities /// /// Backing field for the user settings service. /// - private static readonly IUserSettingService UserSettingService = ServiceManager.UserSettingService; + private static readonly IUserSettingService UserSettingService = IoC.Get(); /// /// Generate a CLI Query for an EncodeTask Model object diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs index 9824ec44f..e16274fe6 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs @@ -16,7 +16,6 @@ namespace HandBrake.ApplicationServices.Utilities using System.Linq; using System.Text.RegularExpressions; - using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Model.Encoding; using HandBrake.Interop.Model; diff --git a/win/CS/HandBrake.ApplicationServices/Functions/SystemInfo.cs b/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs similarity index 94% rename from win/CS/HandBrake.ApplicationServices/Functions/SystemInfo.cs rename to win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs index 86a97ca11..32328ab47 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/SystemInfo.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs @@ -7,7 +7,7 @@ // // -------------------------------------------------------------------------------------------------------------------- -namespace HandBrake.ApplicationServices.Functions +namespace HandBrake.ApplicationServices.Utilities { using System.Windows.Forms; diff --git a/win/CS/HandBrake.ApplicationServices/Functions/Win32.cs b/win/CS/HandBrake.ApplicationServices/Utilities/Win32.cs similarity index 95% rename from win/CS/HandBrake.ApplicationServices/Functions/Win32.cs rename to win/CS/HandBrake.ApplicationServices/Utilities/Win32.cs index f9d031d5c..892c4bcad 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/Win32.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/Win32.cs @@ -7,7 +7,7 @@ // // -------------------------------------------------------------------------------------------------------------------- -namespace HandBrake.ApplicationServices.Functions +namespace HandBrake.ApplicationServices.Utilities { using System; using System.Runtime.InteropServices; @@ -134,7 +134,7 @@ namespace HandBrake.ApplicationServices.Functions /// /// Execution State /// - [FlagsAttribute] + [Flags] public enum EXECUTION_STATE : uint { ES_SYSTEM_REQUIRED = 0x00000001, diff --git a/win/CS/HandBrake.ApplicationServices/Functions/Win7.cs b/win/CS/HandBrake.ApplicationServices/Utilities/Win7.cs similarity index 94% rename from win/CS/HandBrake.ApplicationServices/Functions/Win7.cs rename to win/CS/HandBrake.ApplicationServices/Utilities/Win7.cs index c12ac56e4..5c5b78049 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/Win7.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/Win7.cs @@ -7,7 +7,7 @@ // // -------------------------------------------------------------------------------------------------------------------- -namespace HandBrake.ApplicationServices.Functions +namespace HandBrake.ApplicationServices.Utilities { using Microsoft.WindowsAPICodePack.Taskbar; diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs index 9225acfc5..4d6a127bd 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs @@ -66,6 +66,12 @@ namespace HandBrake.Interop.Interfaces #region Public Methods + /// + /// Initializes this instance. + /// + /// The code for the logging verbosity to use. + void Initialize(int verbosity); + /// /// Calculates the video bitrate for the given job and target size. /// diff --git a/win/CS/HandBrakeWPF/Converters/Audio/AudioEncoderConverter.cs b/win/CS/HandBrakeWPF/Converters/Audio/AudioEncoderConverter.cs index 5c82b33ed..ee975f876 100644 --- a/win/CS/HandBrakeWPF/Converters/Audio/AudioEncoderConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Audio/AudioEncoderConverter.cs @@ -15,9 +15,9 @@ namespace HandBrakeWPF.Converters.Audio using System.Linq; using System.Windows.Data; - using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Model.Encoding; + using HandBrake.ApplicationServices.Utilities; using HandBrake.Interop.Model.Encoding; /// diff --git a/win/CS/HandBrakeWPF/Converters/Audio/AudioQueueDisplayConverter.cs b/win/CS/HandBrakeWPF/Converters/Audio/AudioQueueDisplayConverter.cs index 624e40a57..d081be1a6 100644 --- a/win/CS/HandBrakeWPF/Converters/Audio/AudioQueueDisplayConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Audio/AudioQueueDisplayConverter.cs @@ -15,8 +15,8 @@ namespace HandBrakeWPF.Converters.Audio using System.Text; using System.Windows.Data; - using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model.Encoding; + using HandBrake.ApplicationServices.Utilities; using HandBrake.Interop.Model.Encoding; /// diff --git a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs index a4b8b6df0..6f89bb52f 100644 --- a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs @@ -14,8 +14,8 @@ namespace HandBrakeWPF.Converters using System.Windows.Data; using System; - using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model; + using HandBrake.ApplicationServices.Utilities; using HandBrake.Interop.Model.Encoding; using HandBrake.Interop.Model.Encoding.x264; diff --git a/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs b/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs index 0403fa881..6ec2dc964 100644 --- a/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs @@ -15,9 +15,9 @@ namespace HandBrakeWPF.Converters.Video using System.Linq; using System.Windows.Data; - using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Model.Encoding; + using HandBrake.ApplicationServices.Utilities; using HandBrake.Interop.Model.Encoding; /// diff --git a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs index 45f98a1bb..69caa66dc 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs @@ -15,10 +15,11 @@ namespace HandBrakeWPF.ViewModels using Caliburn.Micro; - using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Services; using HandBrake.ApplicationServices.Services.Interfaces; + using HandBrake.ApplicationServices.Utilities; + using HandBrakeWPF.Services.Interfaces; using HandBrakeWPF.ViewModels.Interfaces; diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs index 03e779665..5fcfef614 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs @@ -17,11 +17,11 @@ namespace HandBrakeWPF.ViewModels using Caliburn.Micro; - using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Model.Encoding; using HandBrake.ApplicationServices.Parsing; using HandBrake.ApplicationServices.Services.Interfaces; + using HandBrake.ApplicationServices.Utilities; using HandBrake.Interop.Model.Encoding; using HandBrakeWPF.ViewModels.Interfaces; diff --git a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs index e6a93a41b..50fe97f1c 100644 --- a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs @@ -14,10 +14,10 @@ namespace HandBrakeWPF.ViewModels using Caliburn.Micro; - using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Parsing; using HandBrake.ApplicationServices.Services.Interfaces; + using HandBrake.ApplicationServices.Utilities; using HandBrake.Interop.Model.Encoding; using HandBrakeWPF.ViewModels.Interfaces; diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index c5460b0ae..d066f7ea2 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -17,11 +17,11 @@ namespace HandBrakeWPF.ViewModels using Caliburn.Micro; using HandBrake.ApplicationServices; - using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Model.Encoding; using HandBrake.ApplicationServices.Parsing; using HandBrake.ApplicationServices.Services.Interfaces; + using HandBrake.ApplicationServices.Utilities; using HandBrake.Interop.Model.Encoding; using HandBrake.Interop.Model.Encoding.x264; -- 2.40.0