]> granicus.if.org Git - handbrake/commitdiff
WinGui: Move some stuff around in the services library and refactor out some legacy...
authorsr55 <sr55.hb@outlook.com>
Fri, 20 Jul 2012 17:06:08 +0000 (17:06 +0000)
committersr55 <sr55.hb@outlook.com>
Fri, 20 Jul 2012 17:06:08 +0000 (17:06 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4868 b64f7644-9d1e-0410-96f1-a4d463321fa5

34 files changed:
win/CS/HandBrake.ApplicationServices/Converters/EnumToDescConverter.cs
win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs
win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs
win/CS/HandBrake.ApplicationServices/Parsing/Title.cs
win/CS/HandBrake.ApplicationServices/ServiceManager.cs [deleted file]
win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs
win/CS/HandBrake.ApplicationServices/Services/Encode.cs
win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
win/CS/HandBrake.ApplicationServices/Services/ScanService.cs
win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs [moved from win/CS/HandBrake.ApplicationServices/Functions/Converters.cs with 96% similarity]
win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs [moved from win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs with 96% similarity]
win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs
win/CS/HandBrake.ApplicationServices/Utilities/GrowlCommunicator.cs [moved from win/CS/HandBrake.ApplicationServices/Functions/GrowlCommunicator.cs with 96% similarity]
win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs [moved from win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs with 95% similarity]
win/CS/HandBrake.ApplicationServices/Utilities/PlistHelper.cs [moved from win/CS/HandBrake.ApplicationServices/Functions/PlistHelper.cs with 95% similarity]
win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs [moved from win/CS/HandBrake.ApplicationServices/Functions/SystemInfo.cs with 94% similarity]
win/CS/HandBrake.ApplicationServices/Utilities/Win32.cs [moved from win/CS/HandBrake.ApplicationServices/Functions/Win32.cs with 95% similarity]
win/CS/HandBrake.ApplicationServices/Utilities/Win7.cs [moved from win/CS/HandBrake.ApplicationServices/Functions/Win7.cs with 94% similarity]
win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs
win/CS/HandBrakeWPF/Converters/Audio/AudioEncoderConverter.cs
win/CS/HandBrakeWPF/Converters/Audio/AudioQueueDisplayConverter.cs
win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs
win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs
win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs
win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs

index a9cc5410b4ceaf8f939085dace7e1261c4eff8df..d53905361eab807a835917a741412095572ba2df 100644 (file)
@@ -12,7 +12,7 @@ namespace HandBrake.ApplicationServices.Converters
     using System;\r
     using System.ComponentModel;\r
 \r
-    using HandBrake.ApplicationServices.Functions;\r
+    using HandBrake.ApplicationServices.Utilities;\r
 \r
     /// <summary>\r
     /// Enum to Description Converter\r
index 7fa820e4c6fb8cd2ad1f7f5cc1cf9be579ec4e02..705911f4a601dd3305e2f01e09d159a9388326ef 100644 (file)
     <Compile Include="EventArgs\ScanCompletedEventArgs.cs" />\r
     <Compile Include="EventArgs\ScanProgressEventArgs.cs" />\r
     <Compile Include="Extensions\StringExtensions.cs" />\r
-    <Compile Include="Functions\Converters.cs" />\r
-    <Compile Include="Functions\EnumHelper.cs" />\r
-    <Compile Include="Functions\GrowlCommunicator.cs" />\r
-    <Compile Include="Functions\InteropModelCreator.cs" />\r
-    <Compile Include="Functions\PlistHelper.cs" />\r
-    <Compile Include="Functions\SystemInfo.cs" />\r
-    <Compile Include="Functions\Win32.cs" />\r
-    <Compile Include="Functions\Win7.cs" />\r
+    <Compile Include="Utilities\Converters.cs" />\r
+    <Compile Include="Utilities\EnumHelper.cs" />\r
+    <Compile Include="Utilities\GrowlCommunicator.cs" />\r
+    <Compile Include="Utilities\InteropModelCreator.cs" />\r
+    <Compile Include="Utilities\PlistHelper.cs" />\r
+    <Compile Include="Utilities\SystemInfo.cs" />\r
+    <Compile Include="Utilities\Win32.cs" />\r
+    <Compile Include="Utilities\Win7.cs" />\r
     <Compile Include="Model\DriveInformation.cs" />\r
     <Compile Include="Model\Encoding\AllowedPassthru.cs" />\r
     <Compile Include="Model\Encoding\AudioTrack.cs" />\r
       <DesignTime>True</DesignTime>\r
       <DependentUpon>Resources.resx</DependentUpon>\r
     </Compile>\r
-    <Compile Include="ServiceManager.cs" />\r
     <Compile Include="ServicesWindsorInstaller.cs" />\r
     <Compile Include="Services\Base\EncodeBase.cs" />\r
     <Compile Include="Services\Encode.cs" />\r
index 828fc6a70e42c0747e599a918adf726e79788763..7af4806f7d63f5c665c59ce5ed73a8aca7ffc42d 100644 (file)
@@ -15,8 +15,8 @@ namespace HandBrake.ApplicationServices.Model.Encoding
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Functions;\r
     using HandBrake.ApplicationServices.Parsing;\r
+    using HandBrake.ApplicationServices.Utilities;\r
     using HandBrake.Interop.Model.Encoding;\r
 \r
     /// <summary>\r
index 20deeae1b5713c5b42014a095db5562ba56bb7c6..34a919908b0f71fb5351dde960b46d07cc3cb139 100644 (file)
@@ -14,8 +14,8 @@ namespace HandBrake.ApplicationServices.Parsing
     using System.IO;\r
     using System.Text.RegularExpressions;\r
 \r
-    using HandBrake.ApplicationServices.Functions;\r
     using HandBrake.ApplicationServices.Model.Encoding;\r
+    using HandBrake.ApplicationServices.Utilities;\r
 \r
     /// <summary>\r
     /// An object that represents a subtitle associated with a Title, in a DVD\r
index 8b36672718e95c56fb5a8928f634a09b0abe3b3a..454627fa9a52ca4a4b023d1755ec180b047bfec1 100644 (file)
@@ -16,6 +16,8 @@ namespace HandBrake.ApplicationServices.Parsing
     using System.Linq;\r
     using System.Text.RegularExpressions;\r
 \r
+    using Caliburn.Micro;\r
+\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
     using HandBrake.Interop.Model;\r
 \r
@@ -29,7 +31,7 @@ namespace HandBrake.ApplicationServices.Parsing
         /// <summary>\r
         /// The User Setting Service\r
         /// </summary>\r
-        private static IUserSettingService userSettingService = ServiceManager.UserSettingService;\r
+        private static IUserSettingService userSettingService = IoC.Get<IUserSettingService>();\r
 \r
         /// <summary>\r
         /// Initializes a new instance of the <see cref="Title"/> class. \r
diff --git a/win/CS/HandBrake.ApplicationServices/ServiceManager.cs b/win/CS/HandBrake.ApplicationServices/ServiceManager.cs
deleted file mode 100644 (file)
index 41775a2..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="ServiceManager.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Tempory Class which manages services until Windosor is added back into the project to handle it for us.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices\r
-{\r
-    using Caliburn.Micro;\r
-\r
-    using HandBrake.ApplicationServices.Services.Interfaces;\r
-    using HandBrake.Interop;\r
-\r
-    /// <summary>\r
-    /// Tempory Class which manages services until Windosor is added back into the project to handle it for us.\r
-    /// </summary>\r
-    public class ServiceManager\r
-    {\r
-        /// <summary>\r
-        /// The Backing field for HandBrake Instance.\r
-        /// </summary>\r
-        private static HandBrakeInstance handBrakeInstance;\r
-\r
-        /// <summary>\r
-        /// Gets UserSettingService.\r
-        /// </summary>\r
-        public static IUserSettingService UserSettingService\r
-        {\r
-            get\r
-            {\r
-                return IoC.Get<IUserSettingService>();\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets HandBrakeInstance.\r
-        /// </summary>\r
-        public static HandBrakeInstance HandBrakeInstance\r
-        {\r
-            get\r
-            {\r
-                return handBrakeInstance ?? (handBrakeInstance = new HandBrakeInstance());\r
-            }\r
-        }\r
-    }\r
-}\r
index e04c4e8301c108116ab01277d7883701c8b2f688..e20215bcfcdadee8bb14a16ac2ded22dfb93fdd1 100644 (file)
@@ -13,9 +13,10 @@ namespace HandBrake.ApplicationServices.Services.Base
     using System.IO;\r
     using System.Text;\r
 \r
+    using Caliburn.Micro;\r
+\r
     using HandBrake.ApplicationServices.EventArgs;\r
     using HandBrake.ApplicationServices.Exceptions;\r
-    using HandBrake.ApplicationServices.Functions;\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
     using HandBrake.ApplicationServices.Utilities;\r
@@ -35,7 +36,7 @@ namespace HandBrake.ApplicationServices.Services.Base
         /// <summary>\r
         /// The User Setting Service\r
         /// </summary>\r
-        private IUserSettingService userSettingService = ServiceManager.UserSettingService;\r
+        private IUserSettingService userSettingService = IoC.Get<IUserSettingService>();\r
 \r
         /// <summary>\r
         /// Windows 7 API Pack wrapper\r
index 7553456d5acfd79a7c663bfa916990f8c5f5e0dd..f0f1b656bc903fb1956b87dbe7480438c717131f 100644 (file)
@@ -15,14 +15,16 @@ namespace HandBrake.ApplicationServices.Services
     using System.Threading;\r
     using System.Windows.Forms;\r
 \r
+    using Caliburn.Micro;\r
+\r
     using HandBrake.ApplicationServices.EventArgs;\r
-    using HandBrake.ApplicationServices.Functions;\r
     using HandBrake.ApplicationServices.Model;\r
-    using HandBrake.ApplicationServices.Parsing;\r
     using HandBrake.ApplicationServices.Services.Base;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
     using HandBrake.ApplicationServices.Utilities;\r
 \r
+    using Parser = HandBrake.ApplicationServices.Parsing.Parser;\r
+\r
     /// <summary>\r
     /// Class which handles the CLI\r
     /// </summary>\r
@@ -33,7 +35,7 @@ namespace HandBrake.ApplicationServices.Services
         /// <summary>\r
         /// The User Setting Service\r
         /// </summary>\r
-        private IUserSettingService userSettingService = ServiceManager.UserSettingService;\r
+        private IUserSettingService userSettingService = IoC.Get<IUserSettingService>();\r
 \r
         /// <summary>\r
         /// Gets The Process Handle\r
index 1fe1845ad700baa8cff5fb9ba3b13cac7af3246a..086305f4e287dcdee537718a855e7372b6c503dc 100644 (file)
@@ -12,11 +12,14 @@ namespace HandBrake.ApplicationServices.Services
     using System;\r
     using System.Diagnostics;\r
 \r
-    using HandBrake.ApplicationServices.Functions;\r
+    using Caliburn.Micro;\r
+\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Services.Base;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
+    using HandBrake.ApplicationServices.Utilities;\r
     using HandBrake.Interop;\r
+    using HandBrake.Interop.Interfaces;\r
     using HandBrake.Interop.Model;\r
 \r
     using EncodeCompletedEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs;\r
@@ -37,7 +40,7 @@ namespace HandBrake.ApplicationServices.Services
         /// <summary>\r
         /// The User Setting Service\r
         /// </summary>\r
-        private IUserSettingService userSettingService = ServiceManager.UserSettingService;\r
+        private IUserSettingService userSettingService = IoC.Get<IUserSettingService>();\r
 \r
         /// <summary>\r
         /// The Start time of the current Encode;\r
@@ -47,7 +50,7 @@ namespace HandBrake.ApplicationServices.Services
         /// <summary>\r
         /// An Instance of the HandBrake Interop Library\r
         /// </summary>\r
-        private HandBrakeInstance instance;\r
+        private IHandBrakeInstance instance;\r
 \r
         /// <summary>\r
         /// A flag to indicate if logging is enabled or not.\r
@@ -62,7 +65,7 @@ namespace HandBrake.ApplicationServices.Services
         public LibEncode()\r
         {\r
             // Setup the HandBrake Instance\r
-            this.instance = ServiceManager.HandBrakeInstance;\r
+            this.instance = IoC.Get<IHandBrakeInstance>();\r
             this.instance.EncodeCompleted += this.InstanceEncodeCompleted;\r
             this.instance.EncodeProgress += this.InstanceEncodeProgress;\r
 \r
index 4957a62bba03f3508e634fb4f2fc4f2e9fc8589d..a25f3a2a632e68a814c5012fc264aeb6a5d8f6ce 100644 (file)
@@ -14,12 +14,15 @@ namespace HandBrake.ApplicationServices.Services
     using System.Text;\r
     using System.Threading;\r
 \r
+    using Caliburn.Micro;\r
+\r
     using HandBrake.ApplicationServices.EventArgs;\r
     using HandBrake.ApplicationServices.Model.Encoding;\r
     using HandBrake.ApplicationServices.Parsing;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
     using HandBrake.ApplicationServices.Utilities;\r
     using HandBrake.Interop;\r
+    using HandBrake.Interop.Interfaces;\r
 \r
     using AudioTrack = HandBrake.ApplicationServices.Parsing.Audio;\r
     using ScanProgressEventArgs = HandBrake.Interop.ScanProgressEventArgs;\r
@@ -47,7 +50,7 @@ namespace HandBrake.ApplicationServices.Services
         /// <summary>\r
         /// LibHB Instance\r
         /// </summary>\r
-        private readonly HandBrakeInstance instance;\r
+        private readonly IHandBrakeInstance instance;\r
 \r
         /// <summary>\r
         /// Log data from HandBrakeInstance\r
@@ -68,7 +71,7 @@ namespace HandBrake.ApplicationServices.Services
         {\r
             logging = new StringBuilder();\r
 \r
-            instance = ServiceManager.HandBrakeInstance;\r
+            instance = IoC.Get<IHandBrakeInstance>();\r
             instance.Initialize(1);\r
             instance.ScanProgress += this.InstanceScanProgress;\r
             instance.ScanCompleted += this.InstanceScanCompleted;\r
index 8337ddd56ccbf5723e982c4a7526fb26671ac53d..2ddd775aa7fe1ca732d3695365446839387fb4bf 100644 (file)
@@ -19,6 +19,8 @@ namespace HandBrake.ApplicationServices.Services
     using System.Text.RegularExpressions;\r
     using System.Xml.Serialization;\r
 \r
+    using Caliburn.Micro;\r
+\r
     using HandBrake.ApplicationServices.Exceptions;\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
@@ -67,7 +69,7 @@ namespace HandBrake.ApplicationServices.Services
         /// <summary>\r
         /// The User Setting Service\r
         /// </summary>\r
-        private IUserSettingService userSettingService = ServiceManager.UserSettingService;\r
+        private IUserSettingService userSettingService = IoC.Get<IUserSettingService>();\r
 \r
         #endregion\r
 \r
index effe9f9b59f2341024000288b690adeef3739db5..cd1ff226d112aa1b5b35937a9f0ead28ad55dc6e 100644 (file)
@@ -17,9 +17,9 @@ namespace HandBrake.ApplicationServices.Services
     using Caliburn.Micro;\r
 \r
     using HandBrake.ApplicationServices.EventArgs;\r
-    using HandBrake.ApplicationServices.Functions;\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
+    using HandBrake.ApplicationServices.Utilities;\r
 \r
     /// <summary>\r
     /// The HandBrake Queue\r
index 5eb1f0a37a4d6cef8e617ec5eb85729acb81d16d..7edbdb32084e21b5331f050990fc787580a380f8 100644 (file)
@@ -16,12 +16,16 @@ namespace HandBrake.ApplicationServices.Services
     using System.Threading;\r
     using System.Windows.Forms;\r
 \r
+    using Caliburn.Micro;\r
+\r
     using HandBrake.ApplicationServices.EventArgs;\r
     using HandBrake.ApplicationServices.Exceptions;\r
     using HandBrake.ApplicationServices.Parsing;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
     using HandBrake.ApplicationServices.Utilities;\r
 \r
+    using Parser = HandBrake.ApplicationServices.Parsing.Parser;\r
+\r
     /// <summary>\r
     /// Scan a Source\r
     /// </summary>\r
@@ -52,7 +56,7 @@ namespace HandBrake.ApplicationServices.Services
         /// <summary>\r
         /// The User Setting Service\r
         /// </summary>\r
-        private IUserSettingService userSettingService = ServiceManager.UserSettingService;\r
+        private IUserSettingService userSettingService = IoC.Get<IUserSettingService>();\r
 \r
         #endregion\r
 \r
similarity index 96%
rename from win/CS/HandBrake.ApplicationServices/Functions/Converters.cs
rename to win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs
index 2f930f30f40f94cd35a478c54c64cb7ca9e4c502..e2b11d4b8ad25404ad59c7c2b956ff17ba1ffab2 100644 (file)
@@ -7,16 +7,15 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.ApplicationServices.Functions\r
+namespace HandBrake.ApplicationServices.Utilities\r
 {\r
     using System;\r
     using System.Text.RegularExpressions;\r
 \r
+    using HandBrake.ApplicationServices.Model.Encoding;\r
     using HandBrake.Interop.Model.Encoding;\r
     using HandBrake.Interop.Model.Encoding.x264;\r
 \r
-    using OutputFormat = HandBrake.ApplicationServices.Model.Encoding.OutputFormat;\r
-\r
     /// <summary>\r
     /// A class to convert various things to native C# objects\r
     /// </summary>\r
similarity index 96%
rename from win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs
rename to win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs
index fa1a8df3e58d4372eb4d0c675be3637ea2f2c0e6..d6c972b5e89746f910d9ba885197f1c199571943 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.ApplicationServices.Functions\r
+namespace HandBrake.ApplicationServices.Utilities\r
 {\r
     using System;\r
     using System.Collections.Generic;\r
index 773de5bfcacb4f0f6a981bdc09de6aad1f1084ab..83ea717e0a85f772d35adf0782d337622a8b7dae 100644 (file)
@@ -19,7 +19,6 @@ namespace HandBrake.ApplicationServices.Utilities
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Functions;\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
 \r
similarity index 96%
rename from win/CS/HandBrake.ApplicationServices/Functions/GrowlCommunicator.cs
rename to win/CS/HandBrake.ApplicationServices/Utilities/GrowlCommunicator.cs
index ca195c000a69345680c43db053a9a25970da61d3..d49924ed098e514670dddfc7c4b3d4b93d3df15c 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.ApplicationServices.Functions\r
+namespace HandBrake.ApplicationServices.Utilities\r
 {\r
     using System;\r
 \r
similarity index 95%
rename from win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs
rename to win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs
index e58e1a5fead1e005007fd7dc608330952f772117..6a5be06cb914c2cfbdd93c4247b0de86bf91fa9c 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.ApplicationServices.Functions\r
+namespace HandBrake.ApplicationServices.Utilities\r
 {\r
     using System;\r
     using System.Collections.Generic;\r
@@ -18,8 +18,6 @@ namespace HandBrake.ApplicationServices.Functions
     using HandBrake.Interop.Model;\r
     using HandBrake.Interop.Model.Encoding;\r
 \r
-    using OutputFormat = HandBrake.ApplicationServices.Model.Encoding.OutputFormat;\r
-\r
     /// <summary>\r
     /// A Utility Class to Convert a \r
     /// </summary>\r
similarity index 95%
rename from win/CS/HandBrake.ApplicationServices/Functions/PlistHelper.cs
rename to win/CS/HandBrake.ApplicationServices/Utilities/PlistHelper.cs
index 478e21b831457ab9a755b6c9639dd0ae2d781af5..f5e810771a6121163718f627d0486882475491cd 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.ApplicationServices.Functions\r
+namespace HandBrake.ApplicationServices.Utilities\r
 {\r
     using System;\r
     using System.Collections.Generic;\r
index 6cf009285e4695bdda695271623ea5f4c5ae7287..dcedefad9f242b89eac4bdde23b5adade77ed0e5 100644 (file)
@@ -16,7 +16,8 @@ namespace HandBrake.ApplicationServices.Utilities
     using System.Windows.Forms;\r
     using System.Xml;\r
 \r
-    using HandBrake.ApplicationServices.Functions;\r
+    using Caliburn.Micro;\r
+\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Model.Encoding;\r
     using HandBrake.ApplicationServices.Services;\r
@@ -31,7 +32,7 @@ namespace HandBrake.ApplicationServices.Utilities
         /// <summary>\r
         /// The User Setting Service\r
         /// </summary>\r
-        private static IUserSettingService userSettingService = ServiceManager.UserSettingService;\r
+        private static IUserSettingService userSettingService = IoC.Get<IUserSettingService>();\r
 \r
         #region Import\r
 \r
index 7e1c0bf418e78d17c348348552f568dc795eba13..4b507198469d07e92ecc50d60bebb30db1e95002 100644 (file)
@@ -15,7 +15,8 @@ namespace HandBrake.ApplicationServices.Utilities
     using System.Globalization;\r
     using System.IO;\r
 \r
-    using HandBrake.ApplicationServices.Functions;\r
+    using Caliburn.Micro;\r
+\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Model.Encoding;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
@@ -30,7 +31,7 @@ namespace HandBrake.ApplicationServices.Utilities
         /// <summary>\r
         /// Backing field for the user settings service.\r
         /// </summary>\r
-        private static readonly IUserSettingService UserSettingService = ServiceManager.UserSettingService;\r
+        private static readonly IUserSettingService UserSettingService = IoC.Get<IUserSettingService>();\r
 \r
         /// <summary>\r
         /// Generate a CLI Query for an EncodeTask Model object\r
index 9824ec44f77dcaa904924aceadc4ef850a27cc2b..e16274fe6941230ccc6d835ebbedb3ed810229cc 100644 (file)
@@ -16,7 +16,6 @@ namespace HandBrake.ApplicationServices.Utilities
     using System.Linq;\r
     using System.Text.RegularExpressions;\r
 \r
-    using HandBrake.ApplicationServices.Functions;\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Model.Encoding;\r
     using HandBrake.Interop.Model;\r
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Functions/SystemInfo.cs
rename to win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs
index 86a97ca11344905572786ed63ae607e0914030eb..32328ab47e63b2cc799a69390e46d2a1fe6bcf41 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.ApplicationServices.Functions\r
+namespace HandBrake.ApplicationServices.Utilities\r
 {\r
     using System.Windows.Forms;\r
 \r
similarity index 95%
rename from win/CS/HandBrake.ApplicationServices/Functions/Win32.cs
rename to win/CS/HandBrake.ApplicationServices/Utilities/Win32.cs
index f9d031d5c52a681f6cc3ba933028d44690a9cb59..892c4bcad31cdc1de14a5f6e77a8d5abcac45796 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.ApplicationServices.Functions\r
+namespace HandBrake.ApplicationServices.Utilities\r
 {\r
     using System;\r
     using System.Runtime.InteropServices;\r
@@ -134,7 +134,7 @@ namespace HandBrake.ApplicationServices.Functions
         /// <summary>\r
         /// Execution State\r
         /// </summary>\r
-        [FlagsAttribute]\r
+        [Flags]\r
         public enum EXECUTION_STATE : uint\r
         {\r
             ES_SYSTEM_REQUIRED = 0x00000001,\r
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Functions/Win7.cs
rename to win/CS/HandBrake.ApplicationServices/Utilities/Win7.cs
index c12ac56e4fff80054a6d4bb99077aee2795ec0e7..5c5b78049b5ef59388b7db8d070d5c8666516f01 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.ApplicationServices.Functions\r
+namespace HandBrake.ApplicationServices.Utilities\r
 {\r
     using Microsoft.WindowsAPICodePack.Taskbar;\r
 \r
index 9225acfc594de6fbf22142ae99fb6ae4814b2c99..4d6a127bd448d835d9dde8fe8dc44285d49654eb 100644 (file)
@@ -66,6 +66,12 @@ namespace HandBrake.Interop.Interfaces
 \r
         #region Public Methods\r
 \r
+        /// <summary>\r
+        /// Initializes this instance.\r
+        /// </summary>\r
+        /// <param name="verbosity">The code for the logging verbosity to use.</param>\r
+        void Initialize(int verbosity);\r
+\r
         /// <summary>\r
         /// Calculates the video bitrate for the given job and target size.\r
         /// </summary>\r
index 5c82b33ed9d7e58712e490adbd27acd278998b29..ee975f8763853c11d562a2ce4e4159ebe4c0d2f2 100644 (file)
@@ -15,9 +15,9 @@ namespace HandBrakeWPF.Converters.Audio
     using System.Linq;\r
     using System.Windows.Data;\r
 \r
-    using HandBrake.ApplicationServices.Functions;\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Model.Encoding;\r
+    using HandBrake.ApplicationServices.Utilities;\r
     using HandBrake.Interop.Model.Encoding;\r
 \r
     /// <summary>\r
index 624e40a57847cd62ff3026f8716580052167ecb0..d081be1a6396a0a9d32431c41e0b5825e49750e6 100644 (file)
@@ -15,8 +15,8 @@ namespace HandBrakeWPF.Converters.Audio
     using System.Text;\r
     using System.Windows.Data;\r
 \r
-    using HandBrake.ApplicationServices.Functions;\r
     using HandBrake.ApplicationServices.Model.Encoding;\r
+    using HandBrake.ApplicationServices.Utilities;\r
     using HandBrake.Interop.Model.Encoding;\r
 \r
     /// <summary>\r
index a4b8b6df0c5fea8a47360cb96b437611c77d7b03..6f89bb52f87a1a3b78487902865b2972d779102d 100644 (file)
@@ -14,8 +14,8 @@ namespace HandBrakeWPF.Converters
     using System.Windows.Data;\r
     using System;\r
 \r
-    using HandBrake.ApplicationServices.Functions;\r
     using HandBrake.ApplicationServices.Model;\r
+    using HandBrake.ApplicationServices.Utilities;\r
     using HandBrake.Interop.Model.Encoding;\r
     using HandBrake.Interop.Model.Encoding.x264;\r
 \r
index 0403fa8814b12a4045c6061104e0cd9ff8ffa4e3..6ec2dc9643d26b0c2d9188161cf726f84cfd19e5 100644 (file)
@@ -15,9 +15,9 @@ namespace HandBrakeWPF.Converters.Video
     using System.Linq;\r
     using System.Windows.Data;\r
 \r
-    using HandBrake.ApplicationServices.Functions;\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Model.Encoding;\r
+    using HandBrake.ApplicationServices.Utilities;\r
     using HandBrake.Interop.Model.Encoding;\r
 \r
     /// <summary>\r
index 45f98a1bb2446c7500184c2d71bcdc722b39189a..69caa66dcd53bf6c659154fc59be5ab56b9a6974 100644 (file)
@@ -15,10 +15,11 @@ namespace HandBrakeWPF.ViewModels
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Functions;\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Services;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
+    using HandBrake.ApplicationServices.Utilities;\r
+\r
     using HandBrakeWPF.Services.Interfaces;\r
     using HandBrakeWPF.ViewModels.Interfaces;\r
 \r
index 03e77966528cdd5a8b37bd5450aade530179019b..5fcfef6142843a1a303cf229eed0e30a96b1301b 100644 (file)
@@ -17,11 +17,11 @@ namespace HandBrakeWPF.ViewModels
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Functions;\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Model.Encoding;\r
     using HandBrake.ApplicationServices.Parsing;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
+    using HandBrake.ApplicationServices.Utilities;\r
     using HandBrake.Interop.Model.Encoding;\r
 \r
     using HandBrakeWPF.ViewModels.Interfaces;\r
index e6a93a41bada96b94b72de4148fd54527dafcbc7..50fe97f1c1829354d59829738102b34310e23f06 100644 (file)
@@ -14,10 +14,10 @@ namespace HandBrakeWPF.ViewModels
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Functions;\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Parsing;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
+    using HandBrake.ApplicationServices.Utilities;\r
     using HandBrake.Interop.Model.Encoding;\r
 \r
     using HandBrakeWPF.ViewModels.Interfaces;\r
index c5460b0ae3b012cdb870076a00bf1fbac97d7fe7..d066f7ea275abd61227ad575668b15a9c9ececf8 100644 (file)
@@ -17,11 +17,11 @@ namespace HandBrakeWPF.ViewModels
     using Caliburn.Micro;\r
 \r
     using HandBrake.ApplicationServices;\r
-    using HandBrake.ApplicationServices.Functions;\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Model.Encoding;\r
     using HandBrake.ApplicationServices.Parsing;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
+    using HandBrake.ApplicationServices.Utilities;\r
     using HandBrake.Interop.Model.Encoding;\r
     using HandBrake.Interop.Model.Encoding.x264;\r
 \r