]> granicus.if.org Git - handbrake/commitdiff
WinGui: Strip out more legacy code.
authorsr55 <sr55.hb@outlook.com>
Thu, 14 Jun 2012 18:09:38 +0000 (18:09 +0000)
committersr55 <sr55.hb@outlook.com>
Thu, 14 Jun 2012 18:09:38 +0000 (18:09 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4733 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs
win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs
win/CS/HandBrake.ApplicationServices/Model/Preset.cs
win/CS/HandBrake.ApplicationServices/ServiceManager.cs
win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
win/CS/HandBrake.ApplicationServices/ServicesWindsorInstaller.cs
win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
win/CS/HandBrakeWPF/Views/MainView.xaml

index e05e37aa91fc2571dbc11f19f3294b4a3dee8192..f9200958d82b4884d31edd85fad2c14d74ff2b21 100644 (file)
@@ -1,7 +1,11 @@
-/*  UserSettingConstants.cs $\r
-    This file is part of the HandBrake source code.\r
-    Homepage: <http://handbrake.fr/>.\r
-    It may be used under the terms of the GNU General Public License. */\r
+// --------------------------------------------------------------------------------------------------------------------\r
+// <copyright file="ASUserSettingConstants.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 User Setting Constants\r
+// </summary>\r
+// --------------------------------------------------------------------------------------------------------------------\r
 \r
 namespace HandBrake.ApplicationServices\r
 {\r
index ab716e5fd58cf97688d00b469369f976f495fc48..d944dea975376897d31e8e576ee86a7c1312d165 100644 (file)
@@ -7,12 +7,9 @@
 // </summary>\r
 // --------------------------------------------------------------------------------------------------------------------\r
 \r
-using System.IO;\r
-\r
 namespace HandBrake.ApplicationServices.Model.Encoding\r
 {\r
     using System;\r
-    using System.Windows.Forms;\r
 \r
     using Caliburn.Micro;\r
 \r
@@ -132,25 +129,6 @@ namespace HandBrake.ApplicationServices.Model.Encoding
             }\r
         }\r
 \r
-        /// <summary>\r
-        ///   Gets A ListViewItem Containing information about this subitlte\r
-        /// </summary>\r
-        [Obsolete("Used only for the old forms gui. Will be removed.")]\r
-        public ListViewItem ListView\r
-        {\r
-            get\r
-            {\r
-                var listTrack = new ListViewItem(this.Track);\r
-                listTrack.SubItems.Add(this.Forced ? "Yes" : "No");\r
-                listTrack.SubItems.Add(this.Burned ? "Yes" : "No");\r
-                listTrack.SubItems.Add(this.Default ? "Yes" : "No");\r
-                listTrack.SubItems.Add(this.SrtLang);\r
-                listTrack.SubItems.Add(this.SrtCharCode);\r
-                listTrack.SubItems.Add(this.SrtOffset.ToString());\r
-                return listTrack;\r
-            }\r
-        }\r
-\r
         /// <summary>\r
         ///   Gets or sets SourceTrack.\r
         /// </summary>\r
index 177b3c26766e176b6fb3c3a4273bdf3da5ac844f..5d165ae941e645364862dc65595c0ecea9090520 100644 (file)
@@ -29,11 +29,6 @@ namespace HandBrake.ApplicationServices.Model
         /// </summary>\r
         public string Query { get; set; }\r
 \r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether to use picture Settings in presets.\r
-        /// </summary>\r
-        [Obsolete("Don't use this!")]\r
-        public bool CropSettings { get; set; }\r
 \r
         /// <summary>\r
         /// Gets or sets The version number which associates this preset with a HB build\r
index fba0e99b958faaa56b075b0b9f52f614996503e3..41775a2876303e571c4f00e9601017cd84695843 100644 (file)
@@ -1,10 +1,16 @@
-namespace HandBrake.ApplicationServices\r
-{\r
-    using System;\r
+// --------------------------------------------------------------------------------------------------------------------\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;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
     using HandBrake.Interop;\r
 \r
     /// </summary>\r
     public class ServiceManager\r
     {\r
-        /// <summary>\r
-        /// Backing Field for the User Setting Service.\r
-        /// </summary>\r
-        private static IUserSettingService userSettingService;\r
-\r
         /// <summary>\r
         /// The Backing field for HandBrake Instance.\r
         /// </summary>\r
         {\r
             get\r
             {\r
-                try\r
-                {\r
-                    return IoC.Get<IUserSettingService>();\r
-                }\r
-                catch (NullReferenceException)\r
-                {\r
-                    // Hack until this legacy code for the forms gui is removed!\r
-                }\r
-\r
-                return userSettingService ?? (userSettingService = new UserSettingService());\r
+                return IoC.Get<IUserSettingService>();\r
             }\r
         }\r
 \r
index 68bf8048196898fb98c1addd411730907245db6b..11df7ccb26bbf1151a4d4e2803543a51b66bc784 100644 (file)
@@ -151,7 +151,6 @@ namespace HandBrake.ApplicationServices.Services
                 {\r
                     preset.Query = update.Query;\r
                     preset.Task = update.Task;\r
-                    preset.CropSettings = update.CropSettings;\r
                     preset.UsePictureFilters = update.UsePictureFilters;\r
 \r
                     // Update the presets file\r
@@ -297,15 +296,12 @@ namespace HandBrake.ApplicationServices.Services
                             Regex r = new Regex("(:  )"); // Split on hyphens. \r
                             string[] presetName = r.Split(line);\r
 \r
-                            bool pic = presetName[2].Contains("crop");\r
-\r
                             Preset newPreset = new Preset\r
                                 {\r
                                     Category = category,\r
                                     Name = presetName[0].Replace("+", string.Empty).Trim(),\r
                                     Query = presetName[2],\r
                                     Version = this.userSettingService.GetUserSetting<string>(ASUserSettingConstants.HandBrakeVersion),\r
-                                    CropSettings = pic,\r
                                     Description = string.Empty, // Maybe one day we will populate this.\r
                                     IsBuildIn = true,\r
                                     UsePictureFilters = true,\r
index a250aa2fab4077e589226581a140d6cad8d4ebea..6d5b40ef675c51b7672d02cc856d68962a05fd4b 100644 (file)
@@ -1,4 +1,13 @@
-namespace HandBrake.ApplicationServices\r
+// --------------------------------------------------------------------------------------------------------------------\r
+// <copyright file="ServicesWindsorInstaller.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 Windsor Installer Interface Implementation\r
+// </summary>\r
+// --------------------------------------------------------------------------------------------------------------------\r
+\r
+namespace HandBrake.ApplicationServices\r
 {\r
     using Castle.MicroKernel.Registration;\r
     using Castle.MicroKernel.SubSystems.Configuration;\r
index d0a6450c836868cccfe0f9e17cf2da7e492354a0..ff5594975978f745852b99622a888444116cb539 100644 (file)
@@ -14,7 +14,6 @@ namespace HandBrakeWPF.ViewModels
     using System.ComponentModel;\r
     using System.ComponentModel.Composition;\r
     using System.Diagnostics;\r
-    using System.Drawing;\r
     using System.IO;\r
     using System.Linq;\r
     using System.Windows;\r
@@ -24,7 +23,6 @@ namespace HandBrakeWPF.ViewModels
     using Caliburn.Micro;\r
 \r
     using HandBrake.ApplicationServices;\r
-    using HandBrake.ApplicationServices.Exceptions;\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Model.Encoding;\r
     using HandBrake.ApplicationServices.Parsing;\r
@@ -34,7 +32,6 @@ namespace HandBrakeWPF.ViewModels
     using HandBrakeWPF.Helpers;\r
     using HandBrakeWPF.Model;\r
     using HandBrakeWPF.ViewModels.Interfaces;\r
-    using HandBrakeWPF.Views;\r
 \r
     using Ookii.Dialogs.Wpf;\r
 \r
@@ -305,7 +302,6 @@ namespace HandBrakeWPF.ViewModels
                 fileMenuItem.Click += this.fileMenuItem_Click;\r
                 menuItems.Add(fileMenuItem);\r
 \r
-\r
                 // File Menu Item\r
                 MenuItem titleSpecific = new MenuItem { Header = new TextBlock { Text = "Title Specific Scan", Margin = new Thickness(8, 0, 0, 0), VerticalAlignment = VerticalAlignment.Center } };\r
 \r
@@ -1286,16 +1282,6 @@ namespace HandBrakeWPF.ViewModels
             this.SelectedPreset = e.NewValue as Preset;\r
         }\r
 \r
-        /// <summary>\r
-        /// Show Release Notes\r
-        /// </summary>\r
-        public void ShowReleaseNotes()\r
-        {\r
-            string path =\r
-                Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);\r
-            Process.Start(path + "\\releasenotes.html");\r
-        }\r
-\r
         #endregion\r
 \r
         #region Private Methods\r
index 29565cf1c33383bc3c674007bcd1cd6e25020bae..9f3c65ee62bb82523d2ea2cd58b8d2850a119362 100644 (file)
                    Padding="0,0,0,5"\r
                    />\r
 \r
-            <Button Content="BETA WPF UI RELEASE NOTES"\r
-                    FontSize="11"\r
-                    FontWeight="Bold"\r
-                    Foreground="Blue"\r
-                    Micro:Message.Attach="[Event Click] = [Action ShowReleaseNotes]"\r
-                    Padding="0,0,0,5"\r
-                    />\r
-\r
-\r
         </StatusBar>\r
     </Grid>\r
 </UserControl>\r