]> granicus.if.org Git - handbrake/commitdiff
WinGui: Dropping more legacy code and moving some more UI only code up to the UI...
authorsr55 <sr55.hb@outlook.com>
Sun, 1 Mar 2015 18:10:34 +0000 (18:10 +0000)
committersr55 <sr55.hb@outlook.com>
Sun, 1 Mar 2015 18:10:34 +0000 (18:10 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6960 b64f7644-9d1e-0410-96f1-a4d463321fa5

15 files changed:
win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
win/CS/HandBrake.ApplicationServices/Model/PresetPictureSettingsMode.cs [deleted file]
win/CS/HandBrake.ApplicationServices/Services/Interfaces/IHbServiceCallback.cs [deleted file]
win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs
win/CS/HandBrakeWPF/Commands/CancelScanCommand.cs
win/CS/HandBrakeWPF/HandBrakeWPF.csproj
win/CS/HandBrakeWPF/Helpers/AppStyleHelper.cs
win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
win/CS/HandBrakeWPF/Model/DriveInformation.cs [moved from win/CS/HandBrake.ApplicationServices/Model/DriveInformation.cs with 94% similarity]
win/CS/HandBrakeWPF/Services/NotificationService.cs
win/CS/HandBrakeWPF/Utilities/DriveUtilities.cs [new file with mode: 0644]
win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs
win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs
win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs

index bb00bc2662a748b3650911cae436593d5244c0ec..6f2826306e806dd35830779a1e4cd95ee6ba9fb1 100644 (file)
     <Compile Include="Services\Encode\Model\Models\Video\VideoPreset.cs" />\r
     <Compile Include="Services\Encode\Model\Models\Video\VideoProfile.cs" />\r
     <Compile Include="Services\Encode\Model\Models\Video\VideoTune.cs" />\r
-    <Compile Include="Services\Interfaces\IHbServiceCallback.cs" />\r
     <Compile Include="Services\Scan\EventArgs\ScanCompletedEventArgs.cs" />\r
     <Compile Include="Services\Scan\EventArgs\ScanProgressEventArgs.cs" />\r
     <Compile Include="Utilities\Converters.cs" />\r
     <Compile Include="Utilities\SystemInfo.cs" />\r
     <Compile Include="Utilities\VersionHelper.cs" />\r
     <Compile Include="Utilities\Win32.cs" />\r
-    <Compile Include="Model\DriveInformation.cs" />\r
     <Compile Include="Services\Encode\Model\Models\AllowedPassthru.cs" />\r
     <Compile Include="Services\Encode\Model\Models\AudioTrack.cs" />\r
     <Compile Include="Services\Encode\Model\Models\ChapterMarker.cs" />\r
     <Compile Include="Services\Encode\Model\EncodeTask.cs" />\r
     <Compile Include="Services\Encode\Model\Models\OutputFormat.cs" />\r
     <Compile Include="Services\Encode\Model\Models\SubtitleTrack.cs" />\r
-    <Compile Include="Model\PresetPictureSettingsMode.cs" />\r
     <Compile Include="Model\QueueItemStatus.cs" />\r
     <Compile Include="Model\QueueTask.cs" />\r
     <Compile Include="Services\Encode\Model\Models\SubtitleType.cs" />\r
diff --git a/win/CS/HandBrake.ApplicationServices/Model/PresetPictureSettingsMode.cs b/win/CS/HandBrake.ApplicationServices/Model/PresetPictureSettingsMode.cs
deleted file mode 100644 (file)
index 030b969..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="PresetPictureSettingsMode.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
-//   Picture Settings Mode when adding presets\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Model\r
-{\r
-    using System.ComponentModel.DataAnnotations;\r
-\r
-    /// <summary>\r
-    /// Picture Settings Mode when adding presets\r
-    /// </summary>\r
-    public enum PresetPictureSettingsMode\r
-    {\r
-        [Display(Name = "None")]\r
-        None = 0,\r
-        [Display(Name = "Custom")]\r
-        Custom = 1,\r
-        [Display(Name = "Source Max Size")]\r
-        SourceMaximum = 2,\r
-    }\r
-}
\ No newline at end of file
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IHbServiceCallback.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IHbServiceCallback.cs
deleted file mode 100644 (file)
index ce95bd8..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="IHbServiceCallback.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
-//   HandBrake WCF Service Callbacks\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Services.Interfaces\r
-{\r
-    using System.ServiceModel;\r
-\r
-    using HandBrake.ApplicationServices.Services.Encode.EventArgs;\r
-\r
-    /// <summary>\r
-    /// HandBrake WCF Service Callbacks\r
-    /// </summary>\r
-    [ServiceContract]\r
-    public interface IHbServiceCallback\r
-    {\r
-        /// <summary>\r
-        /// The encode progress callback.\r
-        /// </summary>\r
-        /// <param name="eventArgs">\r
-        /// The event Args.\r
-        /// </param>\r
-        [OperationContract(IsOneWay = true)]\r
-        void EncodeProgressCallback(EncodeProgressEventArgs eventArgs);\r
-\r
-        /// <summary>\r
-        /// The encode completed callback.\r
-        /// </summary>\r
-        /// <param name="eventArgs">\r
-        /// The event Args.\r
-        /// </param>\r
-        [OperationContract(IsOneWay = true)]\r
-        void EncodeCompletedCallback(EncodeCompletedEventArgs eventArgs);\r
-\r
-        /// <summary>\r
-        /// The encode started callback.\r
-        /// </summary>\r
-        [OperationContract(IsOneWay = true)]\r
-        void EncodeStartedCallback();\r
-    }\r
-}\r
index 7a790f7f9f364eabd231dd7dd45da35e27e9d483..d74a8f72ab955879e396fe9dd972cbdce7d65d6b 100644 (file)
@@ -17,8 +17,6 @@ namespace HandBrake.ApplicationServices.Utilities
     using System.Text;\r
     using System.Windows.Forms;\r
 \r
-    using HandBrake.ApplicationServices.Model;\r
-\r
     /// <summary>\r
     /// A Set of Static Utilites\r
     /// </summary>\r
@@ -143,37 +141,6 @@ namespace HandBrake.ApplicationServices.Utilities
             return logHeader;\r
         }\r
 \r
-        /// <summary>\r
-        /// Get a list of available DVD drives which are ready and contain DVD content.\r
-        /// </summary>\r
-        /// <returns>A List of Drives with their details</returns>\r
-        public static List<DriveInformation> GetDrives()\r
-        {\r
-            var drives = new List<DriveInformation>();\r
-            DriveInfo[] theCollectionOfDrives = DriveInfo.GetDrives();\r
-            int id = 0;\r
-            foreach (DriveInfo curDrive in theCollectionOfDrives)\r
-            {\r
-                if (curDrive.DriveType == DriveType.CDRom && curDrive.IsReady)\r
-                {\r
-                    if (Directory.Exists(curDrive.RootDirectory + "VIDEO_TS") ||\r
-                        Directory.Exists(curDrive.RootDirectory + "BDMV"))\r
-                    {\r
-                        drives.Add(\r
-                            new DriveInformation\r
-                                {\r
-                                    Id = id,\r
-                                    VolumeLabel = curDrive.VolumeLabel,\r
-                                    RootDirectory = curDrive.RootDirectory.ToString()\r
-                                });\r
-                        id++;\r
-                    }\r
-                }\r
-            }\r
-\r
-            return drives;\r
-        }\r
-\r
         /// <summary>\r
         /// Return the standard log format line of text for a given log message\r
         /// </summary>\r
index 32a53277b0d5e08b7cd3a36bd482d101c3f5534a..adc18ff2dc374a43fc56f19d934fdc398f78f602 100644 (file)
@@ -12,7 +12,6 @@ namespace HandBrakeWPF.Commands
     using System;\r
     using System.Windows.Input;\r
 \r
-    using HandBrake.ApplicationServices.Services.Interfaces;\r
     using HandBrake.ApplicationServices.Services.Scan.EventArgs;\r
     using HandBrake.ApplicationServices.Services.Scan.Interfaces;\r
 \r
index e44fd25d7fcff08c36b6af95b3ec699cf6d297da..166d6782a5c72ac4a3fa94363382a8b364580005 100644 (file)
     <Compile Include="Extensions\StringExtensions.cs" />\r
     <Compile Include="Model\Audio\AudioBehaviourModes.cs" />\r
     <Compile Include="Model\Audio\AudioBehaviours.cs" />\r
+    <Compile Include="Model\DriveInformation.cs" />\r
     <Compile Include="Model\Picture\PresetPictureSettingsMode.cs" />\r
     <Compile Include="Model\Subtitles\SubtitleBehaviourModes.cs" />\r
     <Compile Include="Model\Subtitles\SubtitleBehaviours.cs" />\r
     <Compile Include="Utilities\AppcastReader.cs" />\r
     <Compile Include="Utilities\DelayedActionProcessor.cs" />\r
     <Compile Include="Utilities\DPIAwareness.cs" />\r
+    <Compile Include="Utilities\DriveUtilities.cs" />\r
     <Compile Include="Utilities\HandBrakeApp.cs" />\r
     <Compile Include="Services\Presets\Factories\PlistFactory.cs" />\r
     <Compile Include="Utilities\PList.cs" />\r
index 556cf53b4b757c1ebe776e483756b254bc9ee7f2..ece44cfec6de334bd5fabc3a153bd8b4701be847 100644 (file)
@@ -13,8 +13,6 @@ namespace HandBrakeWPF.Helpers
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Services.Interfaces;\r
-\r
     using HandBrakeWPF.Services.Interfaces;\r
 \r
     /// <summary>\r
index ceb8943b8ffe6373a004dff472a7c2a11ea2b55c..e73251b07241da775937413d7ce50ccd8e49e95d 100644 (file)
@@ -19,7 +19,6 @@ namespace HandBrakeWPF.Helpers
     using System.Xml.Serialization;\r
 \r
     using HandBrake.ApplicationServices.Model;\r
-    using HandBrake.ApplicationServices.Services.Interfaces;\r
     using HandBrake.ApplicationServices.Utilities;\r
 \r
     using HandBrakeWPF.Services.Interfaces;\r
similarity index 94%
rename from win/CS/HandBrake.ApplicationServices/Model/DriveInformation.cs
rename to win/CS/HandBrakeWPF/Model/DriveInformation.cs
index 25ff6930b7cb3ee8b794e1fe97f0ef19bb78ce5a..f7e966b5c9eaa52edc85b3667218edfb8bbb769e 100644 (file)
@@ -7,7 +7,7 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-namespace HandBrake.ApplicationServices.Model\r
+namespace HandBrakeWPF.Model\r
 {\r
     /// <summary>\r
     /// Information about a DVD drive\r
index 0f387fec3d2459edc8f922022eb83406ff5217cd..d85a63d42c3015f8e484d1df4a657b03526f1bea 100644 (file)
@@ -11,7 +11,6 @@ namespace HandBrakeWPF.Services
 {\r
     using HandBrake.ApplicationServices.Services.Encode.EventArgs;\r
     using HandBrake.ApplicationServices.Services.Encode.Interfaces;\r
-    using HandBrake.ApplicationServices.Services.Interfaces;\r
 \r
     using HandBrakeWPF.Services.Interfaces;\r
 \r
diff --git a/win/CS/HandBrakeWPF/Utilities/DriveUtilities.cs b/win/CS/HandBrakeWPF/Utilities/DriveUtilities.cs
new file mode 100644 (file)
index 0000000..d07056e
--- /dev/null
@@ -0,0 +1,53 @@
+// --------------------------------------------------------------------------------------------------------------------\r
+// <copyright file="DriveUtilities.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
+//   The drive utilities.\r
+// </summary>\r
+// --------------------------------------------------------------------------------------------------------------------\r
+\r
+namespace HandBrakeWPF.Utilities\r
+{\r
+    using System.Collections.Generic;\r
+    using System.IO;\r
+\r
+    using HandBrakeWPF.Model;\r
+\r
+    /// <summary>\r
+    /// The drive utilities.\r
+    /// </summary>\r
+    public class DriveUtilities\r
+    {\r
+        /// <summary>\r
+        /// Get a list of available DVD drives which are ready and contain DVD content.\r
+        /// </summary>\r
+        /// <returns>A List of Drives with their details</returns>\r
+        public static List<DriveInformation> GetDrives()\r
+        {\r
+            var drives = new List<DriveInformation>();\r
+            DriveInfo[] theCollectionOfDrives = DriveInfo.GetDrives();\r
+            int id = 0;\r
+            foreach (DriveInfo curDrive in theCollectionOfDrives)\r
+            {\r
+                if (curDrive.DriveType == DriveType.CDRom && curDrive.IsReady)\r
+                {\r
+                    if (Directory.Exists(curDrive.RootDirectory + "VIDEO_TS") ||\r
+                        Directory.Exists(curDrive.RootDirectory + "BDMV"))\r
+                    {\r
+                        drives.Add(\r
+                            new DriveInformation\r
+                            {\r
+                                Id = id, \r
+                                VolumeLabel = curDrive.VolumeLabel, \r
+                                RootDirectory = curDrive.RootDirectory.ToString()\r
+                            });\r
+                        id++;\r
+                    }\r
+                }\r
+            }\r
+\r
+            return drives;\r
+        }\r
+    }\r
+}\r
index 65464f3f95879ebab5c02b26930189a74c8bcb60..189472949cfc8c1611ef8d0213374f308d199cf1 100644 (file)
@@ -12,10 +12,7 @@ namespace HandBrakeWPF.ViewModels
     using System.Collections.Generic;\r
     using System.Windows;\r
 \r
-    using HandBrake.ApplicationServices.Model;\r
-    using HandBrake.ApplicationServices.Services;\r
     using HandBrake.ApplicationServices.Services.Encode.Model;\r
-    using HandBrake.ApplicationServices.Services.Interfaces;\r
     using HandBrake.ApplicationServices.Services.Scan.Model;\r
     using HandBrake.ApplicationServices.Utilities;\r
     using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
@@ -23,7 +20,6 @@ namespace HandBrakeWPF.ViewModels
     using HandBrakeWPF.Model.Audio;\r
     using HandBrakeWPF.Model.Subtitles;\r
     using HandBrakeWPF.Properties;\r
-    using HandBrakeWPF.Services;\r
     using HandBrakeWPF.Services.Interfaces;\r
     using HandBrakeWPF.Services.Presets;\r
     using HandBrakeWPF.Services.Presets.Interfaces;\r
index 08662882c91243759bc3d796264cf4ef5fbeb635..9c46008f84e1c81b4e383e14fc45f3c739959184 100644 (file)
@@ -26,7 +26,6 @@ namespace HandBrakeWPF.ViewModels
     using HandBrake.ApplicationServices.Services.Encode.Interfaces;\r
     using HandBrake.ApplicationServices.Services.Encode.Model;\r
     using HandBrake.ApplicationServices.Services.Encode.Model.Models;\r
-    using HandBrake.ApplicationServices.Services.Interfaces;\r
     using HandBrake.ApplicationServices.Services.Scan.EventArgs;\r
     using HandBrake.ApplicationServices.Services.Scan.Interfaces;\r
     using HandBrake.ApplicationServices.Services.Scan.Model;\r
@@ -499,7 +498,7 @@ namespace HandBrakeWPF.ViewModels
                 // Check if we have a Folder, if so, check if it's a DVD / Bluray drive and get the label.\r
                 if (ScannedSource.ScanPath.EndsWith("\\"))\r
                 {\r
-                    foreach (DriveInformation item in GeneralUtilities.GetDrives())\r
+                    foreach (DriveInformation item in DriveUtilities.GetDrives())\r
                     {\r
                         if (item.RootDirectory.Contains(this.ScannedSource.ScanPath.Replace("\\\\", "\\")))\r
                         {\r
@@ -1000,7 +999,7 @@ namespace HandBrakeWPF.ViewModels
                 if (this.showSourceSelection)\r
                 {\r
                     this.Drives.Clear();\r
-                    foreach (SourceMenuItem menuItem in from item in GeneralUtilities.GetDrives()\r
+                    foreach (SourceMenuItem menuItem in from item in DriveUtilities.GetDrives()\r
                                                         let driveInformation = item\r
                                                         select new SourceMenuItem\r
                                                         {\r
index 6d4fcc84a3ed9efa2d79b1eb0b02fb65956a556c..c85c707bdb952d844d504ff015e0ac7cbc1b0635 100644 (file)
@@ -13,8 +13,6 @@ namespace HandBrakeWPF.ViewModels
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Services.Interfaces;\r
-\r
     using HandBrakeWPF.Model;\r
     using HandBrakeWPF.Properties;\r
     using HandBrakeWPF.Services.Interfaces;\r
index ff1b1a0c9557fd2ec4fcc998f5df162e6698d44e..012a4c15b15dddc3c8219349e7cb37583fbbbed8 100644 (file)
@@ -24,7 +24,6 @@ namespace HandBrakeWPF.ViewModels
     using HandBrake.ApplicationServices.Services.Encode.Interfaces;\r
     using HandBrake.ApplicationServices.Services.Encode.Model;\r
     using HandBrake.ApplicationServices.Services.Encode.Model.Models;\r
-    using HandBrake.ApplicationServices.Services.Interfaces;\r
     using HandBrake.ApplicationServices.Services.Scan.Interfaces;\r
     using HandBrake.ApplicationServices.Services.Scan.Model;\r
     using HandBrake.ApplicationServices.Interop.Model.Encoding;\r