From a53a05ae0921b38cc1c9d3dd3dd5bab09a6c7f5f Mon Sep 17 00:00:00 2001 From: sr55 Date: Thu, 14 Jun 2012 19:08:34 +0000 Subject: WinGui: Code Cleanup - New file headers for App Services - Update Interop to include an IWindsorInstaller implementation - Update Interop Converter (new framerates and fflac) - Many stylecop warnings fixed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4734 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Collections/SerializableDictionary.cs | 13 +- .../Converters/EnumToDescConverter.cs | 19 +- .../EventArgs/EncodeCompletedEventArgs.cs | 12 +- .../EventArgs/EncodeProgressEventArgs.cs | 12 +- .../EventArgs/QueueProgressEventArgs.cs | 12 +- .../EventArgs/ScanCompletedEventArgs.cs | 12 +- .../EventArgs/ScanProgressEventArgs.cs | 12 +- .../Exceptions/GeneralApplicationException.cs | 12 +- .../Extensions/StringExtensions.cs | 12 +- .../Functions/Converters.cs | 12 +- .../Functions/EnumHelper.cs | 12 +- .../Functions/GrowlCommunicator.cs | 12 +- .../Functions/InteropModelCreator.cs | 18 +- .../Functions/PlistHelper.cs | 12 +- .../Functions/System.cs | 56 ------ .../Functions/SystemInfo.cs | 60 ++++++ .../Functions/Win32.cs | 15 +- .../Functions/Win7.cs | 13 +- .../HandBrake.ApplicationServices.csproj | 3 +- .../Model/DriveInformation.cs | 12 +- .../Model/EncodeTask.cs | 12 +- .../Model/Encoding/AllowedPassthru.cs | 12 +- .../Model/Encoding/AudioTrack.cs | 61 ++---- .../Model/Encoding/ChapterMarker.cs | 18 +- .../Model/Encoding/FramerateMode.cs | 12 +- .../Model/Encoding/OutputFormat.cs | 12 +- .../Model/Encoding/PointToPointMode.cs | 12 +- .../Model/Encoding/SubtitleTrack.cs | 1 - .../Model/Encoding/SubtitleType.cs | 12 +- .../Model/General/UpdateCheckInformation.cs | 12 +- .../Model/General/UpdateCheckResult.cs | 19 +- .../Model/ModelBase.cs | 22 --- .../HandBrake.ApplicationServices/Model/Preset.cs | 17 +- .../Model/PresetPictureSettingsMode.cs | 12 +- .../Model/QueueItemStatus.cs | 14 +- .../Model/QueueTask.cs | 12 +- .../HandBrake.ApplicationServices/Parsing/Audio.cs | 12 +- .../Parsing/AudioHelper.cs | 12 +- .../Parsing/Chapter.cs | 18 +- .../Parsing/Parser.cs | 12 +- .../Parsing/Source.cs | 11 +- .../Parsing/Subtitle.cs | 12 +- .../HandBrake.ApplicationServices/Parsing/Title.cs | 12 +- .../Services/Base/EncodeBase.cs | 12 +- .../Services/Encode.cs | 12 +- .../Services/Interfaces/IEncode.cs | 12 +- .../Services/Interfaces/IPresetService.cs | 12 +- .../Services/Interfaces/IQueueManager.cs | 12 +- .../Services/Interfaces/IQueueProcessor.cs | 12 +- .../Services/Interfaces/IScan.cs | 12 +- .../Services/Interfaces/IUserSettingService.cs | 13 +- .../Services/LibEncode.cs | 14 +- .../Services/LibScan.cs | 12 +- .../Services/PresetService.cs | 12 +- .../Services/QueueManager.cs | 13 +- .../Services/QueueProcessor.cs | 17 +- .../Services/ScanService.cs | 12 +- .../Services/UpdateService.cs | 12 +- .../Services/UserSettingService.cs | 12 +- .../Settings.StyleCop | 34 +++- .../Utilities/AppcastReader.cs | 12 +- .../Utilities/CharCodesUtilities.cs | 12 +- .../Utilities/GeneralUtilities.cs | 19 +- .../Utilities/PlistUtility.cs | 15 +- .../Utilities/QueryGeneratorUtility.cs | 13 +- .../Utilities/QueryParserUtility.cs | 12 +- .../HandBrakeInterop/Converters.cs | 189 +++++++++--------- .../HandBrakeInterop/HandBrakeInstance.cs | 3 +- .../HandBrakeInterop/HandBrakeInterop.csproj | 64 +++--- .../Interfaces/IHandBrakeInstance.cs | 220 +++++++++++++++++++++ .../HandBrakeInterop/InteropUtilities.cs | 72 +++---- .../HandBrakeInterop/InteropWindsorInstaller.cs | 38 ++++ .../HandBrakeInterop/MarshalingConstants.cs | 36 ++-- .../HandBrakeInterop/Settings.StyleCop | 62 ++++-- .../HandBrakeInterop/SourceData/AudioCodec.cs | 4 +- win/CS/HandBrakeWPF/Settings.StyleCop | 5 + win/CS/HandBrakeWPF/UserSettingConstants.cs | 164 ++++++++++++--- win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 4 +- win/CS/build.xml | 2 +- 79 files changed, 1261 insertions(+), 610 deletions(-) delete mode 100644 win/CS/HandBrake.ApplicationServices/Functions/System.cs create mode 100644 win/CS/HandBrake.ApplicationServices/Functions/SystemInfo.cs delete mode 100644 win/CS/HandBrake.ApplicationServices/Model/ModelBase.cs create mode 100644 win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs create mode 100644 win/CS/HandBrake.Interop/HandBrakeInterop/InteropWindsorInstaller.cs (limited to 'win/CS') diff --git a/win/CS/HandBrake.ApplicationServices/Collections/SerializableDictionary.cs b/win/CS/HandBrake.ApplicationServices/Collections/SerializableDictionary.cs index ad6a56221..15ac8a7c0 100644 --- a/win/CS/HandBrake.ApplicationServices/Collections/SerializableDictionary.cs +++ b/win/CS/HandBrake.ApplicationServices/Collections/SerializableDictionary.cs @@ -1,13 +1,16 @@ -/* SerializableDictionary.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// A Serializable Dictionary +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Collections { using System.Collections.Generic; using System.Collections.Specialized; - using System.Runtime.Serialization; using System.Xml.Serialization; /// diff --git a/win/CS/HandBrake.ApplicationServices/Converters/EnumToDescConverter.cs b/win/CS/HandBrake.ApplicationServices/Converters/EnumToDescConverter.cs index d66f27a7e..a9cc5410b 100644 --- a/win/CS/HandBrake.ApplicationServices/Converters/EnumToDescConverter.cs +++ b/win/CS/HandBrake.ApplicationServices/Converters/EnumToDescConverter.cs @@ -1,8 +1,11 @@ -/* EnumToDescConveter.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ - +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Enum to Description Converter +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Converters { @@ -14,15 +17,15 @@ namespace HandBrake.ApplicationServices.Converters /// /// Enum to Description Converter /// - public class EnumToDescConveter : EnumConverter + public class EnumToDescConverter : EnumConverter { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// The type. /// - public EnumToDescConveter(Type type) + public EnumToDescConverter(Type type) : base(type) { } diff --git a/win/CS/HandBrake.ApplicationServices/EventArgs/EncodeCompletedEventArgs.cs b/win/CS/HandBrake.ApplicationServices/EventArgs/EncodeCompletedEventArgs.cs index 2d613f6d5..12f3af2e9 100644 --- a/win/CS/HandBrake.ApplicationServices/EventArgs/EncodeCompletedEventArgs.cs +++ b/win/CS/HandBrake.ApplicationServices/EventArgs/EncodeCompletedEventArgs.cs @@ -1,7 +1,11 @@ -/* EncodeCompletedEventArgs.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Encode Progress Event Args +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.EventArgs { diff --git a/win/CS/HandBrake.ApplicationServices/EventArgs/EncodeProgressEventArgs.cs b/win/CS/HandBrake.ApplicationServices/EventArgs/EncodeProgressEventArgs.cs index 8ef8ceb39..f4c7e9446 100644 --- a/win/CS/HandBrake.ApplicationServices/EventArgs/EncodeProgressEventArgs.cs +++ b/win/CS/HandBrake.ApplicationServices/EventArgs/EncodeProgressEventArgs.cs @@ -1,7 +1,11 @@ -/* EncodeProgressEventArgs.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Encode Progress Event Args +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.EventArgs { diff --git a/win/CS/HandBrake.ApplicationServices/EventArgs/QueueProgressEventArgs.cs b/win/CS/HandBrake.ApplicationServices/EventArgs/QueueProgressEventArgs.cs index 8613187bc..016b853fa 100644 --- a/win/CS/HandBrake.ApplicationServices/EventArgs/QueueProgressEventArgs.cs +++ b/win/CS/HandBrake.ApplicationServices/EventArgs/QueueProgressEventArgs.cs @@ -1,7 +1,11 @@ -/* QueueProgressEventArgs.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Queue Progress Event Args +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.EventArgs { diff --git a/win/CS/HandBrake.ApplicationServices/EventArgs/ScanCompletedEventArgs.cs b/win/CS/HandBrake.ApplicationServices/EventArgs/ScanCompletedEventArgs.cs index 9b0437ac7..7c9ad7ddd 100644 --- a/win/CS/HandBrake.ApplicationServices/EventArgs/ScanCompletedEventArgs.cs +++ b/win/CS/HandBrake.ApplicationServices/EventArgs/ScanCompletedEventArgs.cs @@ -1,7 +1,11 @@ -/* ScanCompletedEventArgs.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Scan Progress Event Args +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.EventArgs { diff --git a/win/CS/HandBrake.ApplicationServices/EventArgs/ScanProgressEventArgs.cs b/win/CS/HandBrake.ApplicationServices/EventArgs/ScanProgressEventArgs.cs index 1a6bdb0a1..f8d04afae 100644 --- a/win/CS/HandBrake.ApplicationServices/EventArgs/ScanProgressEventArgs.cs +++ b/win/CS/HandBrake.ApplicationServices/EventArgs/ScanProgressEventArgs.cs @@ -1,7 +1,11 @@ -/* ScanProgressEventArgs.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Scan Progress Event Args +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.EventArgs { diff --git a/win/CS/HandBrake.ApplicationServices/Exceptions/GeneralApplicationException.cs b/win/CS/HandBrake.ApplicationServices/Exceptions/GeneralApplicationException.cs index 1ee6608ba..59c952a90 100644 --- a/win/CS/HandBrake.ApplicationServices/Exceptions/GeneralApplicationException.cs +++ b/win/CS/HandBrake.ApplicationServices/Exceptions/GeneralApplicationException.cs @@ -1,7 +1,11 @@ -/* GeneralApplicationException.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// The Encode Failure Exception +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Exceptions { diff --git a/win/CS/HandBrake.ApplicationServices/Extensions/StringExtensions.cs b/win/CS/HandBrake.ApplicationServices/Extensions/StringExtensions.cs index d420e68c3..bc9deb697 100644 --- a/win/CS/HandBrake.ApplicationServices/Extensions/StringExtensions.cs +++ b/win/CS/HandBrake.ApplicationServices/Extensions/StringExtensions.cs @@ -1,7 +1,11 @@ -/* StringExtensions.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// String Extensions +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Extensions { diff --git a/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs b/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs index 2974d4fbc..2f930f30f 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs @@ -1,7 +1,11 @@ -/* Converters.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// A class to convert various things to native C# objects +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Functions { diff --git a/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs b/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs index 9bbfc30d0..fa1a8df3e 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs @@ -1,7 +1,11 @@ -/* EnumHelper.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Enum Helpers +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Functions { diff --git a/win/CS/HandBrake.ApplicationServices/Functions/GrowlCommunicator.cs b/win/CS/HandBrake.ApplicationServices/Functions/GrowlCommunicator.cs index aab8c5f19..ca195c000 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/GrowlCommunicator.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/GrowlCommunicator.cs @@ -1,7 +1,11 @@ -/* GrowlCommunicator.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Provides all functionality for communicating with Growl for Windows. +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Functions { diff --git a/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs b/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs index ec42f9e4f..e58e1a5fe 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs @@ -1,7 +1,11 @@ -/* InteropModelCreator.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// A Utility Class to Convert a +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Functions { @@ -48,10 +52,6 @@ namespace HandBrake.ApplicationServices.Functions // Which will be converted to this EncodeJob Model. EncodeJob job = new EncodeJob(); - - - - EncodingProfile profile = new EncodingProfile(); job.EncodingProfile = profile; @@ -172,7 +172,6 @@ namespace HandBrake.ApplicationServices.Functions break; } - if (work.PointToPointMode == PointToPointMode.Seconds) { job.SecondsEnd = work.EndPoint; @@ -190,7 +189,6 @@ namespace HandBrake.ApplicationServices.Functions // // TODO //} - return job; } diff --git a/win/CS/HandBrake.ApplicationServices/Functions/PlistHelper.cs b/win/CS/HandBrake.ApplicationServices/Functions/PlistHelper.cs index 8ce092dad..478e21b83 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/PlistHelper.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/PlistHelper.cs @@ -1,7 +1,11 @@ -/* PlistHelper.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// A Plist Helper +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Functions { diff --git a/win/CS/HandBrake.ApplicationServices/Functions/System.cs b/win/CS/HandBrake.ApplicationServices/Functions/System.cs deleted file mode 100644 index 9b08a4be2..000000000 --- a/win/CS/HandBrake.ApplicationServices/Functions/System.cs +++ /dev/null @@ -1,56 +0,0 @@ -/* System.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ - -namespace HandBrake.ApplicationServices.Functions -{ - using System.Windows.Forms; - - using Microsoft.Win32; - - /// - /// The System Information. - /// - public class SystemInfo - { - /// - /// Gets the total physical ram in a system - /// - /// The total memory in the system - public static ulong TotalPhysicalMemory - { - get - { - Win32.MEMORYSTATUSEX memStat = new Win32.MEMORYSTATUSEX { dwLength = 64 }; - Win32.GlobalMemoryStatusEx(ref memStat); - - ulong value = memStat.ullTotalPhys / 1024 / 1024; - return value; - } - } - - /// - /// Gets the number of CPU Cores - /// - /// Object - public static object GetCpuCount - { - get - { - RegistryKey regKey = Registry.LocalMachine; - regKey = regKey.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0"); - return regKey == null ? 0 : regKey.GetValue("ProcessorNameString"); - } - } - - /// - /// Gets the System screen size information. - /// - /// System.Windows.Forms.Scree - public static Screen ScreenBounds - { - get { return Screen.PrimaryScreen; } - } - } -} \ No newline at end of file diff --git a/win/CS/HandBrake.ApplicationServices/Functions/SystemInfo.cs b/win/CS/HandBrake.ApplicationServices/Functions/SystemInfo.cs new file mode 100644 index 000000000..86a97ca11 --- /dev/null +++ b/win/CS/HandBrake.ApplicationServices/Functions/SystemInfo.cs @@ -0,0 +1,60 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// The System Information. +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrake.ApplicationServices.Functions +{ + using System.Windows.Forms; + + using Microsoft.Win32; + + /// + /// The System Information. + /// + public class SystemInfo + { + /// + /// Gets the total physical ram in a system + /// + /// The total memory in the system + public static ulong TotalPhysicalMemory + { + get + { + Win32.MEMORYSTATUSEX memStat = new Win32.MEMORYSTATUSEX { dwLength = 64 }; + Win32.GlobalMemoryStatusEx(ref memStat); + + ulong value = memStat.ullTotalPhys / 1024 / 1024; + return value; + } + } + + /// + /// Gets the number of CPU Cores + /// + /// Object + public static object GetCpuCount + { + get + { + RegistryKey regKey = Registry.LocalMachine; + regKey = regKey.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0"); + return regKey == null ? 0 : regKey.GetValue("ProcessorNameString"); + } + } + + /// + /// Gets the System screen size information. + /// + /// System.Windows.Forms.Scree + public static Screen ScreenBounds + { + get { return Screen.PrimaryScreen; } + } + } +} \ No newline at end of file diff --git a/win/CS/HandBrake.ApplicationServices/Functions/Win32.cs b/win/CS/HandBrake.ApplicationServices/Functions/Win32.cs index 94a34f529..f9d031d5c 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/Win32.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/Win32.cs @@ -1,15 +1,16 @@ -/* win32.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Win32 API calls +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Functions { using System; - using System.ComponentModel; - using System.Diagnostics; using System.Runtime.InteropServices; - using System.Windows; using System.Windows.Threading; /// diff --git a/win/CS/HandBrake.ApplicationServices/Functions/Win7.cs b/win/CS/HandBrake.ApplicationServices/Functions/Win7.cs index b2262f147..c12ac56e4 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/Win7.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/Win7.cs @@ -1,11 +1,14 @@ -/* Win7.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// A class implimenting Windows 7 Specific features +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Functions { - using System; using Microsoft.WindowsAPICodePack.Taskbar; /// diff --git a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj index 62c5dc916..865a24b9a 100644 --- a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj +++ b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj @@ -105,7 +105,7 @@ - + @@ -119,7 +119,6 @@ - diff --git a/win/CS/HandBrake.ApplicationServices/Model/DriveInformation.cs b/win/CS/HandBrake.ApplicationServices/Model/DriveInformation.cs index 65708cee2..25ff6930b 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/DriveInformation.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/DriveInformation.cs @@ -1,7 +1,11 @@ -/* DriveInformation.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Information about a DVD drive +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Model { diff --git a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs index f2d5828f5..6ed3bf2e1 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs @@ -1,7 +1,11 @@ -/* EncodeTask.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// An Encode Task +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Model { diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AllowedPassthru.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AllowedPassthru.cs index 31447355b..7b407f297 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AllowedPassthru.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AllowedPassthru.cs @@ -1,7 +1,11 @@ -/* AllowedPassthru.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Allowed Passthru Options +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Model.Encoding { diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs index a9d42861a..49348048f 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs @@ -13,6 +13,8 @@ namespace HandBrake.ApplicationServices.Model.Encoding using System.ComponentModel; using System.Globalization; + using Caliburn.Micro; + using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Parsing; using HandBrake.Interop.Model.Encoding; @@ -20,7 +22,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding /// /// An Audio Track for the Audio Panel /// - public class AudioTrack : ModelBase + public class AudioTrack : PropertyChangedBase { #region Constants and Fields @@ -100,7 +102,6 @@ namespace HandBrake.ApplicationServices.Model.Encoding this.mixDown = track.MixDown; this.sampleRate = track.SampleRate; this.scannedTrack = new Audio(); - this.trackName = track.TrackName; } #endregion @@ -159,7 +160,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding set { this.bitrate = value; - this.OnPropertyChanged("Bitrate"); + this.NotifyOfPropertyChange("Bitrate"); } } @@ -178,7 +179,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding if (!object.Equals(value, this.drc)) { this.drc = value; - this.OnPropertyChanged("DRC"); + this.NotifyOfPropertyChange("DRC"); } } } @@ -196,9 +197,9 @@ namespace HandBrake.ApplicationServices.Model.Encoding set { this.encoder = value; - this.OnPropertyChanged("Encoder"); - this.OnPropertyChanged("IsPassthru"); - this.OnPropertyChanged("TrackReference"); + this.NotifyOfPropertyChange(() => this.Encoder); + this.NotifyOfPropertyChange("IsPassthru"); + this.NotifyOfPropertyChange("TrackReference"); } } @@ -217,7 +218,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding if (!object.Equals(value, this.gain)) { this.gain = value; - this.OnPropertyChanged("Gain"); + this.NotifyOfPropertyChange("Gain"); } } } @@ -235,8 +236,8 @@ namespace HandBrake.ApplicationServices.Model.Encoding set { this.mixDown = value; - this.OnPropertyChanged("MixDown"); - this.OnPropertyChanged("TrackReference"); + this.NotifyOfPropertyChange("MixDown"); + this.NotifyOfPropertyChange("TrackReference"); } } @@ -253,7 +254,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding set { this.sampleRate = value; - this.OnPropertyChanged("SampleRate"); + this.NotifyOfPropertyChange("SampleRate"); } } @@ -295,8 +296,8 @@ namespace HandBrake.ApplicationServices.Model.Encoding set { this.scannedTrack = value; - this.OnPropertyChanged("ScannedTrack"); - this.OnPropertyChanged("TrackDisplay"); + this.NotifyOfPropertyChange("ScannedTrack"); + this.NotifyOfPropertyChange("TrackDisplay"); } } @@ -316,34 +317,6 @@ namespace HandBrake.ApplicationServices.Model.Encoding } } - /// - /// Gets the Display Value for this model. - /// - public string TrackDisplay - { - get - { - return this.ScannedTrack == null ? string.Empty : this.ScannedTrack.ToString(); - } - } - - /// - /// Gets or sets TrackName. - /// - public string TrackName - { - get - { - return this.trackName; - } - - set - { - this.trackName = value; - this.OnPropertyChanged("TrackName"); - } - } - /// /// Gets a value indicating whether IsPassthru. /// @@ -361,6 +334,9 @@ namespace HandBrake.ApplicationServices.Model.Encoding } } + /// + /// Gets a value indicating whether IsLossless. + /// public bool IsLossless { get @@ -369,6 +345,9 @@ namespace HandBrake.ApplicationServices.Model.Encoding } } + /// + /// Gets TrackReference. + /// public AudioTrack TrackReference { get { return this; } diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/ChapterMarker.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/ChapterMarker.cs index 0e0eb4b12..db3794151 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/ChapterMarker.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/ChapterMarker.cs @@ -1,7 +1,11 @@ -/* ChapterMarker.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// A Movie Chapter +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Model.Encoding { @@ -30,12 +34,12 @@ namespace HandBrake.ApplicationServices.Model.Encoding /// /// The number. /// - /// + /// /// The name. /// - public ChapterMarker(int number, string Name) + public ChapterMarker(int number, string name) { - this.ChapterName = Name; + this.ChapterName = name; this.ChapterNumber = number; } diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/FramerateMode.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/FramerateMode.cs index 508e63ced..6392578a6 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/FramerateMode.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/FramerateMode.cs @@ -1,7 +1,11 @@ -/* VideoEncoderMode.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// The Mode of Video Encoding. CFR, VFR, PFR +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Model.Encoding { diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/OutputFormat.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/OutputFormat.cs index fa5c3225f..813418264 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/OutputFormat.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/OutputFormat.cs @@ -1,7 +1,11 @@ -/* OutputFormat.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// The Output format. +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Model.Encoding { diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/PointToPointMode.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/PointToPointMode.cs index 00eac35f0..df0bc437c 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/PointToPointMode.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/PointToPointMode.cs @@ -1,7 +1,11 @@ -/* PointToPoint.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Point to Point Mode +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Model.Encoding { diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs index d944dea97..92eb55b73 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs @@ -155,7 +155,6 @@ namespace HandBrake.ApplicationServices.Model.Encoding /// public string SrtCharCode { get; set; } - /// /// Gets or sets the SRT Filename /// diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleType.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleType.cs index 5b533f829..64e8f8ff8 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleType.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleType.cs @@ -1,7 +1,11 @@ -/* SubtitleType.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Subtitle Type. +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Model.Encoding { diff --git a/win/CS/HandBrake.ApplicationServices/Model/General/UpdateCheckInformation.cs b/win/CS/HandBrake.ApplicationServices/Model/General/UpdateCheckInformation.cs index 5932aa402..86045c938 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/General/UpdateCheckInformation.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/General/UpdateCheckInformation.cs @@ -1,7 +1,11 @@ -/* UpdateCheckInformation.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Provides information about an update check. +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Model.General { diff --git a/win/CS/HandBrake.ApplicationServices/Model/General/UpdateCheckResult.cs b/win/CS/HandBrake.ApplicationServices/Model/General/UpdateCheckResult.cs index 2f7c7e874..f29cc8560 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/General/UpdateCheckResult.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/General/UpdateCheckResult.cs @@ -1,7 +1,11 @@ -/* UpdateCheckResult.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Used in EndUpdateCheck() for update checking and the IAsyncResult design pattern. +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Model.General { @@ -22,7 +26,7 @@ namespace HandBrake.ApplicationServices.Model.General /// /// The info. /// - public UpdateCheckResult(object asyncState, ApplicationServices.Model.General.UpdateCheckInformation info) + public UpdateCheckResult(object asyncState, UpdateCheckInformation info) { this.AsyncState = asyncState; this.Result = info; @@ -36,12 +40,13 @@ namespace HandBrake.ApplicationServices.Model.General /// /// Gets the result of the update check. /// - public ApplicationServices.Model.General.UpdateCheckInformation Result { get; private set; } + public UpdateCheckInformation Result { get; private set; } /// /// Gets AsyncWaitHandle. /// /// + /// This is not implemented as it is not used. /// public WaitHandle AsyncWaitHandle { @@ -52,6 +57,7 @@ namespace HandBrake.ApplicationServices.Model.General /// Gets a value indicating whether CompletedSynchronously. /// /// + /// This is not implemented as it is not used. /// public bool CompletedSynchronously { @@ -62,6 +68,7 @@ namespace HandBrake.ApplicationServices.Model.General /// Gets a value indicating whether IsCompleted. /// /// + /// This is not implemented as it is not used. /// public bool IsCompleted { diff --git a/win/CS/HandBrake.ApplicationServices/Model/ModelBase.cs b/win/CS/HandBrake.ApplicationServices/Model/ModelBase.cs deleted file mode 100644 index 041b18eb3..000000000 --- a/win/CS/HandBrake.ApplicationServices/Model/ModelBase.cs +++ /dev/null @@ -1,22 +0,0 @@ -/* ModelBase.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ - -namespace HandBrake.ApplicationServices.Model -{ - using System.ComponentModel; - - public class ModelBase : INotifyPropertyChanged - { - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void OnPropertyChanged(string propertyName) - { - if (null != PropertyChanged) - { - PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); - } - } - } -} diff --git a/win/CS/HandBrake.ApplicationServices/Model/Preset.cs b/win/CS/HandBrake.ApplicationServices/Model/Preset.cs index 5d165ae94..2a9a1693e 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Preset.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Preset.cs @@ -1,14 +1,14 @@ -/* Preset.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// A Preset for encoding with. +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Model { - using System; - - using Encoding; - /// /// A Preset for encoding with. /// @@ -29,7 +29,6 @@ namespace HandBrake.ApplicationServices.Model /// public string Query { get; set; } - /// /// Gets or sets The version number which associates this preset with a HB build /// diff --git a/win/CS/HandBrake.ApplicationServices/Model/PresetPictureSettingsMode.cs b/win/CS/HandBrake.ApplicationServices/Model/PresetPictureSettingsMode.cs index fc2798fd1..a79f4b0e3 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/PresetPictureSettingsMode.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/PresetPictureSettingsMode.cs @@ -1,7 +1,11 @@ -/* PresetPictureSettingsMode.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Picture Settings Mode when adding presets +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Model { diff --git a/win/CS/HandBrake.ApplicationServices/Model/QueueItemStatus.cs b/win/CS/HandBrake.ApplicationServices/Model/QueueItemStatus.cs index bfaad7eaa..c60945abd 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/QueueItemStatus.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/QueueItemStatus.cs @@ -1,7 +1,11 @@ -/* QueueItemStatus.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Queue Item Status +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Model { @@ -13,7 +17,7 @@ namespace HandBrake.ApplicationServices.Model /// /// Queue Item Status /// - [TypeConverter(typeof(EnumToDescConveter))] + [TypeConverter(typeof(EnumToDescConverter))] public enum QueueItemStatus { [Description("Waiting")] diff --git a/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs b/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs index 0fce6eaeb..a62115109 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs @@ -1,7 +1,11 @@ -/* QueueTask.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// The QueueTask. +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Model { diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Audio.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Audio.cs index e4cf6bf4a..0e65a3502 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Audio.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Audio.cs @@ -1,7 +1,11 @@ -/* AudioTrack.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// An object represending an AudioTrack associated with a Title, in a DVD +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Parsing { diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/AudioHelper.cs b/win/CS/HandBrake.ApplicationServices/Parsing/AudioHelper.cs index 7ed83ca69..43c331337 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/AudioHelper.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/AudioHelper.cs @@ -1,7 +1,11 @@ -/* AudioHelper.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// An Audio Helper Class +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Parsing { diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Chapter.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Chapter.cs index 4ec76fa1c..eb0313317 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Chapter.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Chapter.cs @@ -1,7 +1,11 @@ -/* Chapter.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// An object representing a Chapter aosciated with a Title, in a DVD +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Parsing { @@ -28,15 +32,15 @@ namespace HandBrake.ApplicationServices.Parsing /// /// The number. /// - /// + /// /// The name. /// /// /// The duration. /// - public Chapter(int number, string Name, TimeSpan duration) + public Chapter(int number, string name, TimeSpan duration) { - this.ChapterName = Name; + this.ChapterName = name; this.ChapterNumber = number; this.Duration = duration; } diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Parser.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Parser.cs index 15e021685..7f79e8aec 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Parser.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Parser.cs @@ -1,7 +1,11 @@ -/* Parser.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// A delegate to handle custom events regarding data being parsed from the buffer +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Parsing { diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Source.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Source.cs index 696063f0f..c1eaccc7b 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Source.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Source.cs @@ -1,6 +1,11 @@ -/* Source.cs $ This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// An object representing a scanned DVD +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Parsing { diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs index d42cb0c22..a7c7158a6 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs @@ -1,7 +1,11 @@ -/* Subtitle.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// An object that represents a subtitle associated with a Title, in a DVD +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Parsing { diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs index 7bce41669..8b3667271 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs @@ -1,7 +1,11 @@ -/* Title.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// An object that represents a single Title of a DVD +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Parsing { diff --git a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs index d57f3a51f..537a97d71 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs @@ -1,7 +1,11 @@ -/* EncodeBase.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// A Base Class for the Encode Services. +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Services.Base { diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs index cb920a862..8c04d5a3b 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs @@ -1,7 +1,11 @@ -/* Encode.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Class which handles the CLI +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Services { diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IEncode.cs index 7ba739617..426cad897 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IEncode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IEncode.cs @@ -1,7 +1,11 @@ -/* IEncode.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Encode Progess Status +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Services.Interfaces { diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IPresetService.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IPresetService.cs index 81eaa6849..63fe25158 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IPresetService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IPresetService.cs @@ -1,7 +1,11 @@ -/* IPresetService.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// The Preset Service Interface +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Services.Interfaces { diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs index b8b162d4f..e86b5fe7c 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs @@ -1,7 +1,11 @@ -/* IQueueManager.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// The Queue Manager Interface +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Services.Interfaces { diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs index ad2635556..22cf365b0 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs @@ -1,7 +1,11 @@ -/* IQueueProcessor.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// The Queue Processor +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Services.Interfaces { diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IScan.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IScan.cs index b992dc8eb..3ad25c583 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IScan.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IScan.cs @@ -1,7 +1,11 @@ -/* IScan.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Encode Progess Status +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Services.Interfaces { diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IUserSettingService.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IUserSettingService.cs index c3290f64f..d7bba9550 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IUserSettingService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IUserSettingService.cs @@ -1,8 +1,11 @@ -/* IUserSettingService.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ - +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// The User Setting Service Interace. +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Services.Interfaces { diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs index d99bdbec8..1fe1845ad 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs @@ -1,7 +1,11 @@ -/* LibEncode.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// LibHB Implementation of IEncode +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Services { @@ -19,7 +23,7 @@ namespace HandBrake.ApplicationServices.Services using EncodeProgressEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeProgressEventArgs; /// - /// TODO: Update summary. + /// LibHB Implementation of IEncode /// public class LibEncode : EncodeBase, IEncode { diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs index 70a44ca56..8fe7affc6 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs @@ -1,7 +1,11 @@ -/* LibScan.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Scan a Source +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Services { diff --git a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs index 11df7ccb2..a4946278a 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs @@ -1,7 +1,11 @@ -/* PresetService.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// The preset service manages HandBrake's presets +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Services { diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs index d80ee0660..0d3a40e7f 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs @@ -1,7 +1,12 @@ -/* QueueManager.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// The Queue Manager. +// Thread Safe. +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Services { diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs index 7e67368e3..fe0675f96 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs @@ -1,7 +1,11 @@ -/* Queue.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// The HandBrake Queue +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Services { @@ -10,8 +14,9 @@ namespace HandBrake.ApplicationServices.Services using System.IO; using System.Windows.Forms; + using Caliburn.Micro; + using HandBrake.ApplicationServices.EventArgs; - using HandBrake.ApplicationServices.Exceptions; using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Services.Interfaces; @@ -24,7 +29,7 @@ namespace HandBrake.ApplicationServices.Services /// /// 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/Services/ScanService.cs b/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs index a7dffd5fe..0d5118aee 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs @@ -1,7 +1,11 @@ -/* Scan.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Scan a Source +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Services { diff --git a/win/CS/HandBrake.ApplicationServices/Services/UpdateService.cs b/win/CS/HandBrake.ApplicationServices/Services/UpdateService.cs index 02ed05a9d..899a953c4 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/UpdateService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/UpdateService.cs @@ -1,7 +1,11 @@ -/* UpdateService.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// The Update Service +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Services { diff --git a/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs b/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs index 7fe50cd04..042c2487c 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs @@ -1,7 +1,11 @@ -/* UserSettingService.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// The User Setting Serivce +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Services { diff --git a/win/CS/HandBrake.ApplicationServices/Settings.StyleCop b/win/CS/HandBrake.ApplicationServices/Settings.StyleCop index 5d3a523a0..99c98c116 100644 --- a/win/CS/HandBrake.ApplicationServices/Settings.StyleCop +++ b/win/CS/HandBrake.ApplicationServices/Settings.StyleCop @@ -2,9 +2,39 @@ - + - False + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/AppcastReader.cs b/win/CS/HandBrake.ApplicationServices/Utilities/AppcastReader.cs index 8b0053a86..0a3fac109 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/AppcastReader.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/AppcastReader.cs @@ -1,7 +1,11 @@ -/* AppcastReader.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Appcast Reader - Used for parsing HandBrakes update file +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Utilities { diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/CharCodesUtilities.cs b/win/CS/HandBrake.ApplicationServices/Utilities/CharCodesUtilities.cs index 9c9801015..8470927f6 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/CharCodesUtilities.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/CharCodesUtilities.cs @@ -1,7 +1,11 @@ -/* AppcastReader.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Char Codes +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Utilities { diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs b/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs index 99ecd5cd6..34a078a7c 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs @@ -1,7 +1,11 @@ -/* UtilityService.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// A Set of Static Utilites +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Utilities { @@ -12,9 +16,10 @@ namespace HandBrake.ApplicationServices.Utilities using System.Text; using System.Windows.Forms; + using Caliburn.Micro; + using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model; - using HandBrake.ApplicationServices.Services; using HandBrake.ApplicationServices.Services.Interfaces; /// @@ -25,7 +30,7 @@ namespace HandBrake.ApplicationServices.Utilities /// /// The User Setting Service /// - private static IUserSettingService userSettingService = ServiceManager.UserSettingService; + private static readonly IUserSettingService UserSettingService = IoC.Get(); /// /// The Default Log Directory @@ -113,7 +118,7 @@ namespace HandBrake.ApplicationServices.Utilities { StringBuilder logHeader = new StringBuilder(); - logHeader.AppendLine(String.Format("HandBrake {0} {1}", userSettingService.GetUserSetting(ASUserSettingConstants.HandBrakeVersion), userSettingService.GetUserSetting(ASUserSettingConstants.HandBrakeBuild))); + logHeader.AppendLine(String.Format("HandBrake {0} {1}", UserSettingService.GetUserSetting(ASUserSettingConstants.HandBrakeVersion), UserSettingService.GetUserSetting(ASUserSettingConstants.HandBrakeBuild))); logHeader.AppendLine(String.Format("OS: {0}", Environment.OSVersion)); logHeader.AppendLine(String.Format("CPU: {0}", SystemInfo.GetCpuCount)); logHeader.Append(String.Format("Ram: {0} MB, ", SystemInfo.TotalPhysicalMemory)); diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs index b35a360a2..9f2c70bcf 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs @@ -1,7 +1,11 @@ -/* PlistUtility.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Plist Preset Converter +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Utilities { @@ -22,7 +26,7 @@ namespace HandBrake.ApplicationServices.Utilities /// /// Plist Preset Converter /// - public class PlistPresetHandler + public class PlistUtility { /// /// The User Setting Service @@ -38,6 +42,7 @@ namespace HandBrake.ApplicationServices.Utilities /// The filename. /// /// + /// A Preset Object /// public static Preset Import(string filename) { diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index a5df48e2a..ec6f74562 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -1,7 +1,11 @@ -/* QueryGeneratorUtility.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Generate a CLI Query for HandBrakeCLI +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Utilities { @@ -10,7 +14,6 @@ namespace HandBrake.ApplicationServices.Utilities using System.Collections.ObjectModel; using System.Globalization; using System.IO; - using System.Text.RegularExpressions; using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model; diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs index 5be0b0c83..9824ec44f 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs @@ -1,7 +1,11 @@ -/* QueryParser.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Parse a CLI Query +// +// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Utilities { diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Converters.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Converters.cs index 9a4b175e5..cc12aa514 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Converters.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Converters.cs @@ -4,21 +4,20 @@ // // // Defines the Converters type. -// -// -------------------------------------------------------------------------------------------------------------------- - -using HandBrake.Interop.Model; - -namespace HandBrake.Interop -{ - using System; +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrake.Interop +{ + using System; using System.Collections.Generic; using HandBrake.Interop.HbLib; using HandBrake.Interop.Model.Encoding; using HandBrake.Interop.SourceData; + using HandBrake.Interop.Model; - public static class Converters + public static class Converters { /// /// Video Frame Rates @@ -32,7 +31,11 @@ namespace HandBrake.Interop {23.976, 1126125}, {24, 1125000}, {25, 1080000}, - {29.97, 900900} + {29.97, 900900}, + {30, 900000}, + {50, 540000}, + {59.94, 450450}, + {60, 450000} }; /// @@ -159,6 +162,8 @@ namespace HandBrake.Interop return NativeConstants.HB_ACODEC_DCA_HD_PASS; case AudioEncoder.Vorbis: return NativeConstants.HB_ACODEC_VORBIS; + case AudioEncoder.ffflac: + return NativeConstants.HB_ACODEC_FFFLAC; } return 0; @@ -191,85 +196,87 @@ namespace HandBrake.Interop case NativeConstants.HB_ACODEC_CA_AAC: case NativeConstants.HB_ACODEC_CA_HAAC: return AudioCodec.Aac; + case NativeConstants.HB_ACODEC_FFFLAC: + return AudioCodec.Flac; default: - return AudioCodec.Other; - } - } - - /// - /// Converts a native HB encoder structure to an Encoder model. - /// - /// The structure to convert. - /// The converted model. - public static HBVideoEncoder NativeToVideoEncoder(hb_encoder_s encoder) - { - var result = new HBVideoEncoder - { - Id = encoder.encoder, - ShortName = encoder.short_name, - DisplayName = encoder.human_readable_name, - CompatibleContainers = Container.None - }; - - if ((encoder.muxers & NativeConstants.HB_MUX_MKV) > 0) - { - result.CompatibleContainers = result.CompatibleContainers | Container.Mkv; - } - - if ((encoder.muxers & NativeConstants.HB_MUX_MP4) > 0) - { - result.CompatibleContainers = result.CompatibleContainers | Container.Mp4; - } - - return result; - } - - /// - /// Converts a native HB encoder structure to an Encoder model. - /// - /// The structure to convert. - /// The converted model. - public static HBAudioEncoder NativeToAudioEncoder(hb_encoder_s encoder) - { - var result = new HBAudioEncoder - { - Id = encoder.encoder, - ShortName = encoder.short_name, - DisplayName = encoder.human_readable_name, - CompatibleContainers = Container.None - }; - - if ((encoder.muxers & NativeConstants.HB_MUX_MKV) > 0) - { - result.CompatibleContainers = result.CompatibleContainers | Container.Mkv; - } - - if ((encoder.muxers & NativeConstants.HB_MUX_MP4) > 0) - { - result.CompatibleContainers = result.CompatibleContainers | Container.Mp4; - } - - result.QualityLimits = Encoders.GetAudioQualityLimits(encoder.encoder); - result.DefaultQuality = HBFunctions.hb_get_default_audio_quality((uint)encoder.encoder); - result.CompressionLimits = Encoders.GetAudioCompressionLimits(encoder.encoder); - result.DefaultCompression = HBFunctions.hb_get_default_audio_compression((uint) encoder.encoder); - - return result; - } - - /// - /// Converts a native HB mixdown structure to a Mixdown model. - /// - /// The structure to convert. - /// The converted model. - public static HBMixdown NativeToMixdown(hb_mixdown_s mixdown) - { - return new HBMixdown - { - Id = mixdown.amixdown, - ShortName = mixdown.short_name, - DisplayName = mixdown.human_readable_name - }; - } - } -} + return AudioCodec.Other; + } + } + + /// + /// Converts a native HB encoder structure to an Encoder model. + /// + /// The structure to convert. + /// The converted model. + public static HBVideoEncoder NativeToVideoEncoder(hb_encoder_s encoder) + { + var result = new HBVideoEncoder + { + Id = encoder.encoder, + ShortName = encoder.short_name, + DisplayName = encoder.human_readable_name, + CompatibleContainers = Container.None + }; + + if ((encoder.muxers & NativeConstants.HB_MUX_MKV) > 0) + { + result.CompatibleContainers = result.CompatibleContainers | Container.Mkv; + } + + if ((encoder.muxers & NativeConstants.HB_MUX_MP4) > 0) + { + result.CompatibleContainers = result.CompatibleContainers | Container.Mp4; + } + + return result; + } + + /// + /// Converts a native HB encoder structure to an Encoder model. + /// + /// The structure to convert. + /// The converted model. + public static HBAudioEncoder NativeToAudioEncoder(hb_encoder_s encoder) + { + var result = new HBAudioEncoder + { + Id = encoder.encoder, + ShortName = encoder.short_name, + DisplayName = encoder.human_readable_name, + CompatibleContainers = Container.None + }; + + if ((encoder.muxers & NativeConstants.HB_MUX_MKV) > 0) + { + result.CompatibleContainers = result.CompatibleContainers | Container.Mkv; + } + + if ((encoder.muxers & NativeConstants.HB_MUX_MP4) > 0) + { + result.CompatibleContainers = result.CompatibleContainers | Container.Mp4; + } + + result.QualityLimits = Encoders.GetAudioQualityLimits(encoder.encoder); + result.DefaultQuality = HBFunctions.hb_get_default_audio_quality((uint)encoder.encoder); + result.CompressionLimits = Encoders.GetAudioCompressionLimits(encoder.encoder); + result.DefaultCompression = HBFunctions.hb_get_default_audio_compression((uint) encoder.encoder); + + return result; + } + + /// + /// Converts a native HB mixdown structure to a Mixdown model. + /// + /// The structure to convert. + /// The converted model. + public static HBMixdown NativeToMixdown(hb_mixdown_s mixdown) + { + return new HBMixdown + { + Id = mixdown.amixdown, + ShortName = mixdown.short_name, + DisplayName = mixdown.human_readable_name + }; + } + } +} diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs index d5bae2e97..efcd257e1 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs @@ -17,6 +17,7 @@ namespace HandBrake.Interop using System.Windows.Media.Imaging; using HandBrake.Interop.HbLib; + using HandBrake.Interop.Interfaces; using HandBrake.Interop.Model; using HandBrake.Interop.Model.Encoding; using HandBrake.Interop.SourceData; @@ -24,7 +25,7 @@ namespace HandBrake.Interop /// /// A wrapper for a HandBrake instance. /// - public class HandBrakeInstance : IDisposable + public class HandBrakeInstance : IHandBrakeInstance, IDisposable { /// /// The modulus for picture size when auto-sizing dimensions. diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj index 62b901df8..8155e16f1 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj @@ -101,6 +101,12 @@ false + + ..\..\libraries\caliburn\Castle.Core.dll + + + ..\..\libraries\caliburn\Castle.Windsor.dll + 3.0 @@ -138,39 +144,41 @@ + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs new file mode 100644 index 000000000..9225acfc5 --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs @@ -0,0 +1,220 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// The Interface for HandBrakeInstance +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrake.Interop.Interfaces +{ + using System; + using System.Collections.Generic; + using System.Windows.Media.Imaging; + + using HandBrake.Interop.Model; + using HandBrake.Interop.SourceData; + + /// + /// The Interface for HandBrakeInstance + /// + public interface IHandBrakeInstance + { + #region Events + + /// + /// Fires when an encode has completed. + /// + event EventHandler EncodeCompleted; + + /// + /// Fires for progress updates when encoding. + /// + event EventHandler EncodeProgress; + + /// + /// Fires when a scan has completed. + /// + event EventHandler ScanCompleted; + + /// + /// Fires for progress updates when scanning. + /// + event EventHandler ScanProgress; + + #endregion + + #region Properties + + /// + /// Gets the index of the default title. + /// + int FeatureTitle { get; } + + /// + /// Gets the number of previews created during scan. + /// + int PreviewCount { get; } + + /// + /// Gets the list of titles on this instance. + /// + List Titles { get; } + + #endregion + + #region Public Methods + + /// <summary> + /// Calculates the video bitrate for the given job and target size. + /// </summary> + /// <param name="job"> + /// The encode job. + /// </param> + /// <param name="sizeMB"> + /// The target size in MB. + /// </param> + /// <param name="overallSelectedLengthSeconds"> + /// The currently selected encode length. Used in preview + /// for calculating bitrate when the target size would be wrong. + /// </param> + /// <returns> + /// The video bitrate in kbps. + /// </returns> + int CalculateBitrate(EncodeJob job, int sizeMB, double overallSelectedLengthSeconds = 0); + + /// <summary> + /// Gives estimated file size (in MB) of the given job and video bitrate. + /// </summary> + /// <param name="job"> + /// The encode job. + /// </param> + /// <param name="videoBitrate"> + /// The video bitrate to be used (kbps). + /// </param> + /// <returns> + /// The estimated file size (in MB) of the given job and video bitrate. + /// </returns> + double CalculateFileSize(EncodeJob job, int videoBitrate); + + /// <summary> + /// Frees any resources associated with this object. + /// </summary> + void Dispose(); + + /// <summary> + /// Gets an image for the given job and preview + /// </summary> + /// <remarks> + /// Only incorporates sizing and aspect ratio into preview image. + /// </remarks> + /// <param name="job"> + /// The encode job to preview. + /// </param> + /// <param name="previewNumber"> + /// The index of the preview to get (0-based). + /// </param> + /// <returns> + /// An image with the requested preview. + /// </returns> + BitmapImage GetPreview(EncodeJob job, int previewNumber); + + /// <summary> + /// Gets the final size for a given encode job. + /// </summary> + /// <param name="job"> + /// The encode job to use. + /// </param> + /// <param name="width"> + /// The storage width. + /// </param> + /// <param name="height"> + /// The storage height. + /// </param> + /// <param name="parWidth"> + /// The pixel aspect X number. + /// </param> + /// <param name="parHeight"> + /// The pixel aspect Y number. + /// </param> + void GetSize(EncodeJob job, out int width, out int height, out int parWidth, out int parHeight); + + /// <summary> + /// Pauses the current encode. + /// </summary> + void PauseEncode(); + + /// <summary> + /// Resumes a paused encode. + /// </summary> + void ResumeEncode(); + + /// <summary> + /// Starts an encode with the given job. + /// </summary> + /// <param name="jobToStart"> + /// The job to start. + /// </param> + void StartEncode(EncodeJob jobToStart); + + /// <summary> + /// Starts an encode with the given job. + /// </summary> + /// <param name="job"> + /// The job to start. + /// </param> + /// <param name="preview"> + /// True if this is a preview encode. + /// </param> + /// <param name="previewNumber"> + /// The preview number to start the encode at (0-based). + /// </param> + /// <param name="previewSeconds"> + /// The number of seconds in the preview. + /// </param> + /// <param name="overallSelectedLengthSeconds"> + /// The currently selected encode length. Used in preview + /// for calculating bitrate when the target size would be wrong. + /// </param> + void StartEncode( + EncodeJob job, bool preview, int previewNumber, int previewSeconds, double overallSelectedLengthSeconds); + + /// <summary> + /// Starts scanning the given path. + /// </summary> + /// <param name="path"> + /// The path to the video to scan. + /// </param> + /// <param name="previewCount"> + /// The number of preview images to make. + /// </param> + void StartScan(string path, int previewCount); + + /// <summary> + /// Starts a scan of the given path. + /// </summary> + /// <param name="path"> + /// The path of the video to scan. + /// </param> + /// <param name="previewCount"> + /// The number of previews to make on each title. + /// </param> + /// <param name="titleIndex"> + /// The title index to scan (1-based, 0 for all titles). + /// </param> + void StartScan(string path, int previewCount, int titleIndex); + + /// <summary> + /// Stops the current encode. + /// </summary> + void StopEncode(); + + /// <summary> + /// Stop any running scans + /// </summary> + void StopScan(); + + #endregion + } +} \ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/InteropUtilities.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/InteropUtilities.cs index 3a36ddfc9..3a7f1c01e 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/InteropUtilities.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/InteropUtilities.cs @@ -12,13 +12,13 @@ namespace HandBrake.Interop using System; using System.Collections.Generic; using System.Runtime.InteropServices; - - using HandBrake.Interop.HbLib; - - /// <summary> - /// Helper utilities for native interop. - /// </summary> - public static class InteropUtilities + + using HandBrake.Interop.HbLib; + + /// <summary> + /// Helper utilities for native interop. + /// </summary> + public static class InteropUtilities { /// <summary> /// Reads the given native structure pointer. @@ -49,35 +49,35 @@ namespace HandBrake.Interop } return returnList; - } - - /// <summary> - /// Converts the given native array to a managed collection. - /// </summary> - /// <typeparam name="T">The type of item in the list.</typeparam> - /// <param name="arrayPtr">The pointer to the array.</param> - /// <param name="count">The number of items in the array.</param> - /// <returns>The converted collection.</returns> - public static IEnumerable<T> ConvertArray<T>(IntPtr arrayPtr, int count) - { - IntPtr currentItem = arrayPtr; - - var result = new List<T>(); - for (int i = 0; i < count; i++) - { - T nativeEncoder = ReadStructure<T>(currentItem); - result.Add(nativeEncoder); - - currentItem = IntPtr.Add(currentItem, Marshal.SizeOf(typeof(T))); - } - - return result; - } - - /// <summary> - /// Creats a new, empty native HandBrake list. - /// </summary> - /// <param name="capacity">The capacity of the new list.</param> + } + + /// <summary> + /// Converts the given native array to a managed collection. + /// </summary> + /// <typeparam name="T">The type of item in the list.</typeparam> + /// <param name="arrayPtr">The pointer to the array.</param> + /// <param name="count">The number of items in the array.</param> + /// <returns>The converted collection.</returns> + public static IEnumerable<T> ConvertArray<T>(IntPtr arrayPtr, int count) + { + IntPtr currentItem = arrayPtr; + + var result = new List<T>(); + for (int i = 0; i < count; i++) + { + T nativeEncoder = ReadStructure<T>(currentItem); + result.Add(nativeEncoder); + + currentItem = IntPtr.Add(currentItem, Marshal.SizeOf(typeof(T))); + } + + return result; + } + + /// <summary> + /// Creats a new, empty native HandBrake list. + /// </summary> + /// <param name="capacity">The capacity of the new list.</param> /// <returns>The new native list.</returns> public static NativeList CreateNativeList(int capacity) { diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/InteropWindsorInstaller.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/InteropWindsorInstaller.cs new file mode 100644 index 000000000..91383f8b5 --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/InteropWindsorInstaller.cs @@ -0,0 +1,38 @@ +// -------------------------------------------------------------------------------------------------------------------- +// <copyright file="InteropWindsorInstaller.cs" company="HandBrake Project (http://handbrake.fr)"> +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// </copyright> +// <summary> +// An Implimentation of IWindsorInstaller for this library. +// </summary> +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrake.Interop +{ + using Castle.Core; + using Castle.MicroKernel.Registration; + using Castle.MicroKernel.SubSystems.Configuration; + using Castle.Windsor; + + using HandBrake.Interop.Interfaces; + + /// <summary> + /// An Implimentation of IWindsorInstaller for this library. + /// </summary> + public class InteropWindsorInstaller : IWindsorInstaller + { + /// <summary> + /// An Implimentation of IWindsorInstaller for this library. + /// </summary> + /// <param name="container"> + /// The container. + /// </param> + /// <param name="store"> + /// The store. + /// </param> + public void Install(IWindsorContainer container, IConfigurationStore store) + { + container.Register(Component.For<IHandBrakeInstance>().ImplementedBy<HandBrakeInstance>().LifeStyle.Is(LifestyleType.Singleton)); + } + } +} diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/MarshalingConstants.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/MarshalingConstants.cs index 07ebc0810..82948f05a 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/MarshalingConstants.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/MarshalingConstants.cs @@ -9,21 +9,21 @@ namespace HandBrake.Interop { - public static class MarshalingConstants - { -#if X64 - public const int JobPaddingBytes = 49264; - public const int AudioPaddingBytes = 49208; -#else - /// <summary> - /// Job Padding Bytes - /// </summary> - public const int JobPaddingBytes = 49216; - - /// <summary> - /// Audio Padding Bytes - /// </summary> - public const int AudioPaddingBytes = 49180; -#endif - } -} + public static class MarshalingConstants + { +#if X64 + public const int JobPaddingBytes = 49264; + public const int AudioPaddingBytes = 49208; +#else + /// <summary> + /// Job Padding Bytes + /// </summary> + public const int JobPaddingBytes = 49216; + + /// <summary> + /// Audio Padding Bytes + /// </summary> + public const int AudioPaddingBytes = 49180; +#endif + } +} diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Settings.StyleCop b/win/CS/HandBrake.Interop/HandBrakeInterop/Settings.StyleCop index 39d8ff868..c4e827f20 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Settings.StyleCop +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Settings.StyleCop @@ -1,14 +1,54 @@ -<StyleCopSettings Version="4.3"> - <Analyzers> - <Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.SpacingRules"> - <Rules> - <Rule Name="TabsMustNotBeUsed"> - <RuleSettings> +<StyleCopSettings Version="105"> + <Analyzers> + <Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules"> + <Rules> + <Rule Name="TabsMustNotBeUsed"> + <RuleSettings> <BooleanProperty Name="Enabled">False</BooleanProperty> </RuleSettings> </Rule> - </Rules> - <AnalyzerSettings /> - </Analyzer> - </Analyzers> -</StyleCopSettings> + </Rules> + <AnalyzerSettings /> + </Analyzer> + <Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules"> + <Rules> + <Rule Name="FileMustHaveHeader"> + <RuleSettings> + <BooleanProperty Name="Enabled">True</BooleanProperty> + </RuleSettings> + </Rule> + <Rule Name="FileHeaderMustShowCopyright"> + <RuleSettings> + <BooleanProperty Name="Enabled">True</BooleanProperty> + </RuleSettings> + </Rule> + <Rule Name="FileHeaderMustHaveCopyrightText"> + <RuleSettings> + <BooleanProperty Name="Enabled">True</BooleanProperty> + </RuleSettings> + </Rule> + <Rule Name="FileHeaderMustContainFileName"> + <RuleSettings> + <BooleanProperty Name="Enabled">True</BooleanProperty> + </RuleSettings> + </Rule> + <Rule Name="FileHeaderFileNameDocumentationMustMatchFileName"> + <RuleSettings> + <BooleanProperty Name="Enabled">True</BooleanProperty> + </RuleSettings> + </Rule> + <Rule Name="FileHeaderMustHaveSummary"> + <RuleSettings> + <BooleanProperty Name="Enabled">True</BooleanProperty> + </RuleSettings> + </Rule> + <Rule Name="FileHeaderMustHaveValidCompanyText"> + <RuleSettings> + <BooleanProperty Name="Enabled">True</BooleanProperty> + </RuleSettings> + </Rule> + </Rules> + <AnalyzerSettings /> + </Analyzer> + </Analyzers> +</StyleCopSettings> \ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/AudioCodec.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/AudioCodec.cs index 62bfecf79..ad797c53d 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/AudioCodec.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/AudioCodec.cs @@ -22,6 +22,8 @@ namespace HandBrake.Interop.SourceData Aac, - Other + Other, + + Flac } } diff --git a/win/CS/HandBrakeWPF/Settings.StyleCop b/win/CS/HandBrakeWPF/Settings.StyleCop index 1b0202d91..99c98c116 100644 --- a/win/CS/HandBrakeWPF/Settings.StyleCop +++ b/win/CS/HandBrakeWPF/Settings.StyleCop @@ -32,6 +32,11 @@ <BooleanProperty Name="Enabled">True</BooleanProperty> </RuleSettings> </Rule> + <Rule Name="FileHeaderMustHaveValidCompanyText"> + <RuleSettings> + <BooleanProperty Name="Enabled">True</BooleanProperty> + </RuleSettings> + </Rule> </Rules> <AnalyzerSettings /> </Analyzer> diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs index 99c31b74a..9397a3e6c 100644 --- a/win/CS/HandBrakeWPF/UserSettingConstants.cs +++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs @@ -14,37 +14,153 @@ namespace HandBrakeWPF /// </summary> public class UserSettingConstants { - public const string UpdateStatus = "updateStatus"; - public const string TooltipEnable = "tooltipEnable"; - public const string Skipversion = "skipversion"; - public const string AutoNaming = "autoNaming"; - public const string AutoNamePath = "autoNamePath"; + #region Constants and Fields + + /// <summary> + /// Add Only One Per Langage + /// </summary> + public const string AddOnlyOneAudioPerLanguage = "addOnlyOneAudioPerLanguage"; + + /// <summary> + /// Appcast i686 + /// </summary> public const string Appcast_i686 = "appcast_i686"; + + /// <summary> + /// Appcast 64 + /// </summary> public const string Appcast_x64 = "appcast_x64"; + + /// <summary> + /// Auto name format + /// </summary> public const string AutoNameFormat = "autoNameFormat"; - public const string VLC_Path = "VLC_Path"; - public const string MainWindowMinimize = "MainWindowMinimize"; - public const string PresetNotification = "presetNotification"; - public const string TrayIconAlerts = "trayIconAlerts"; - public const string LastUpdateCheckDate = "lastUpdateCheckDate"; - public const string DaysBetweenUpdateCheck = "daysBetweenUpdateCheck"; - public const string UseM4v = "useM4v"; - public const string NativeLanguage = "NativeLanguage"; - public const string NativeLanguageForSubtitles = "NativeLanguageSubtitles"; - public const string DubMode = "DubMode"; - public const string ClearOldLogs = "clearOldLogs"; - public const string AutoNameTitleCase = "AutoNameTitleCase"; + + /// <summary> + /// Autoname path + /// </summary> + public const string AutoNamePath = "autoNamePath"; + + /// <summary> + /// Auto Name Remove underscore + /// </summary> public const string AutoNameRemoveUnderscore = "AutoNameRemoveUnderscore"; - public const string ActivityWindowLastMode = "ActivityWindowLastMode"; - public const string UseClosedCaption = "useClosedCaption"; - public const string BatchMinDuration = "batchMinDuration"; - public const string BatchMaxDuration = "batchMaxDuration"; + + /// <summary> + /// Auto Name Title Case + /// </summary> + public const string AutoNameTitleCase = "AutoNameTitleCase"; + + /// <summary> + /// Auto Naming + /// </summary> + public const string AutoNaming = "autoNaming"; + + /// <summary> + /// Clear old logs + /// </summary> + public const string ClearOldLogs = "clearOldLogs"; + + /// <summary> + /// Update check interval + /// </summary> + public const string DaysBetweenUpdateCheck = "daysBetweenUpdateCheck"; + + /// <summary> + /// Use Default Player + /// </summary> public const string DefaultPlayer = "defaultPlayer"; - public const string SelectedLanguages = "SelectedLanguages"; + + /// <summary> + /// Dub mode + /// </summary> + public const string DubMode = "DubMode"; + + /// <summary> + /// Dub Mode Audio + /// </summary> public const string DubModeAudio = "DubModeAudio"; + + /// <summary> + /// Dub Mode Subs + /// </summary> public const string DubModeSubtitle = "DubModeSubtitle"; - public const string AddOnlyOneAudioPerLanguage = "addOnlyOneAudioPerLanguage"; + + /// <summary> + /// Last Update Check + /// </summary> + public const string LastUpdateCheckDate = "lastUpdateCheckDate"; + + /// <summary> + /// Main Window Minimise + /// </summary> + public const string MainWindowMinimize = "MainWindowMinimize"; + + /// <summary> + /// Min Title Length + /// </summary> public const string MinTitleLength = "MinTitleLength"; + + /// <summary> + /// Native Language Audio + /// </summary> + public const string NativeLanguage = "NativeLanguage"; + + /// <summary> + /// Native Language Subs + /// </summary> + public const string NativeLanguageForSubtitles = "NativeLanguageSubtitles"; + + /// <summary> + /// Preset Notification + /// </summary> + public const string PresetNotification = "presetNotification"; + + /// <summary> + /// Selected Languages + /// </summary> + public const string SelectedLanguages = "SelectedLanguages"; + + /// <summary> + /// AUudio Passthru + /// </summary> public const string ShowAdvancedAudioPassthruOpts = "ShowAdvancedAudioPassthruOpts"; + + /// <summary> + /// Skip Version + /// </summary> + public const string Skipversion = "skipversion"; + + /// <summary> + /// Tooltip + /// </summary> + public const string TooltipEnable = "tooltipEnable"; + + /// <summary> + /// Tray Icon + /// </summary> + public const string TrayIconAlerts = "trayIconAlerts"; + + /// <summary> + /// Update Status + /// </summary> + public const string UpdateStatus = "updateStatus"; + + /// <summary> + /// Closed Captions + /// </summary> + public const string UseClosedCaption = "useClosedCaption"; + + /// <summary> + /// Use m4v + /// </summary> + public const string UseM4v = "useM4v"; + + /// <summary> + /// Vlc Path + /// </summary> + public const string VLC_Path = "VLC_Path"; + + #endregion } -} +} \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index ff5594975..2e9ec5e64 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1206,7 +1206,7 @@ namespace HandBrakeWPF.ViewModels if (!string.IsNullOrEmpty(filename)) { - Preset preset = PlistPresetHandler.Import(filename); + Preset preset = PlistUtility.Import(filename); if (this.presetService.CheckIfPresetExists(preset.Name)) { if (!presetService.CanUpdatePreset(preset.Name)) @@ -1252,7 +1252,7 @@ namespace HandBrakeWPF.ViewModels if (filename != null) { - PlistPresetHandler.Export(savefiledialog.FileName, this.selectedPreset); + PlistUtility.Export(savefiledialog.FileName, this.selectedPreset); } } else diff --git a/win/CS/build.xml b/win/CS/build.xml index 928b3da6f..b64c12461 100644 --- a/win/CS/build.xml +++ b/win/CS/build.xml @@ -59,7 +59,7 @@ <Target Name="NightlyPostBuild"> <Exec Command="copy $(ProjectDir)HandBrakeWPF\Installer\MakeNightly.nsi $(ProjectDir)HandBrakeWPF\bin\Release /Y" Condition="$(Platform) == 'x86'" /> <Exec Command="copy $(ProjectDir)HandBrakeWPF\Installer\MakeNightly64.nsi $(ProjectDir)HandBrakeWPF\bin\Release /Y" Condition="$(Platform) == 'x64'" /> - <Exec Command="copy $(ProjectDir)handbrakepineapple.ico $(ProjectDir)HandBrakeWPF\bin\Release /Y" /> + <Exec Command="copy $(ProjectDir)HandBrakeWPF\handbrakepineapple.ico $(ProjectDir)HandBrakeWPF\bin\Release /Y" /> <Exec Command="xcopy $(ProjectDir)doc $(ProjectDir)HandBrakeWPF\bin\Release\doc /I /Y" /> <Exec Command="makensis $(ProjectDir)HandBrakeWPF\bin\Release\MakeNightly.nsi" Condition="$(Platform) == 'x86'" /> <Exec Command="makensis $(ProjectDir)HandBrakeWPF\bin\Release\MakeNightly64.nsi" Condition="$(Platform) == 'x64'" /> -- cgit v1.2.3