-/* 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
// </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
}\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
/// </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
-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
{\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
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
-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
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
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
using HandBrakeWPF.Helpers;\r
using HandBrakeWPF.Model;\r
using HandBrakeWPF.ViewModels.Interfaces;\r
- using HandBrakeWPF.Views;\r
\r
using Ookii.Dialogs.Wpf;\r
\r
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
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
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