summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/CS/Functions/Main.cs2
-rw-r--r--win/CS/Functions/PresetLoader.cs6
-rw-r--r--win/CS/Functions/QueryGenerator.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Collections/SerializableDictionary.cs26
-rw-r--r--win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj1
-rw-r--r--win/CS/HandBrake.ApplicationServices/Parsing/Title.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/ServiceManager.cs27
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Encode.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/PresetService.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/ScanService.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs53
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs2
-rw-r--r--win/CS/HandBrakeCS.csproj3
-rw-r--r--win/CS/Installer/Installer.nsi2
-rw-r--r--win/CS/Installer/Installer64.nsi2
-rw-r--r--win/CS/Installer/MakeNightly.nsi.tmpl2
-rw-r--r--win/CS/Installer/MakeNightly64.nsi.tmpl2
-rw-r--r--win/CS/Program.cs3
-rw-r--r--win/CS/Properties/Settings.Designer.cs26
-rw-r--r--win/CS/Properties/Settings.settings6
-rw-r--r--win/CS/app.config6
-rw-r--r--win/CS/defaultsettings.xml411
-rw-r--r--win/CS/frmAbout.cs2
-rw-r--r--win/CS/frmMain.cs2
-rw-r--r--win/CS/frmOptions.cs2
-rw-r--r--win/CS/frmQueue.cs2
30 files changed, 565 insertions, 41 deletions
diff --git a/win/CS/Functions/Main.cs b/win/CS/Functions/Main.cs
index 9aa5afdc4..03f6d2dba 100644
--- a/win/CS/Functions/Main.cs
+++ b/win/CS/Functions/Main.cs
@@ -35,7 +35,7 @@ namespace Handbrake.Functions
/// </summary>
private static readonly XmlSerializer Ser = new XmlSerializer(typeof(List<QueueTask>));
- private static readonly IUserSettingService UserSettingService = new UserSettingService();
+ private static readonly IUserSettingService UserSettingService = ServiceManager.UserSettingService;
/// <summary>
/// Set's up the DataGridView on the Chapters tab (frmMain)
diff --git a/win/CS/Functions/PresetLoader.cs b/win/CS/Functions/PresetLoader.cs
index 195459201..efc22495c 100644
--- a/win/CS/Functions/PresetLoader.cs
+++ b/win/CS/Functions/PresetLoader.cs
@@ -11,7 +11,6 @@ namespace Handbrake.Functions
using HandBrake.ApplicationServices;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
- using HandBrake.ApplicationServices.Services;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.Interop.Model.Encoding;
@@ -22,7 +21,10 @@ namespace Handbrake.Functions
/// </summary>
public class PresetLoader
{
- private static readonly IUserSettingService UserSettingService = new UserSettingService();
+ /// <summary>
+ /// The User Setting Service.
+ /// </summary>
+ private static readonly IUserSettingService UserSettingService = ServiceManager.UserSettingService;
/// <summary>
/// This function takes in a Query which has been parsed by QueryParser and
diff --git a/win/CS/Functions/QueryGenerator.cs b/win/CS/Functions/QueryGenerator.cs
index 782c4dcf9..1d0a32be5 100644
--- a/win/CS/Functions/QueryGenerator.cs
+++ b/win/CS/Functions/QueryGenerator.cs
@@ -25,7 +25,7 @@ namespace Handbrake.Functions
/// </summary>
public class QueryGenerator
{
- private static readonly IUserSettingService UserSettingService = new UserSettingService();
+ private static readonly IUserSettingService UserSettingService = ServiceManager.UserSettingService;
/// <summary>
/// The Culture
diff --git a/win/CS/HandBrake.ApplicationServices/Collections/SerializableDictionary.cs b/win/CS/HandBrake.ApplicationServices/Collections/SerializableDictionary.cs
index b492bc2f0..ad6a56221 100644
--- a/win/CS/HandBrake.ApplicationServices/Collections/SerializableDictionary.cs
+++ b/win/CS/HandBrake.ApplicationServices/Collections/SerializableDictionary.cs
@@ -6,6 +6,7 @@
namespace HandBrake.ApplicationServices.Collections
{
using System.Collections.Generic;
+ using System.Collections.Specialized;
using System.Runtime.Serialization;
using System.Xml.Serialization;
@@ -60,7 +61,16 @@ namespace HandBrake.ApplicationServices.Collections
reader.ReadEndElement();
reader.ReadStartElement("value");
- TValue value = (TValue)valueSerializer.Deserialize(reader);
+ TValue value;
+ if (reader.Name.Contains("ArrayOfString"))
+ {
+ XmlSerializer scSerializer = new XmlSerializer(typeof(StringCollection));
+ value = (TValue)scSerializer.Deserialize(reader);
+ }
+ else
+ {
+ value = (TValue)valueSerializer.Deserialize(reader);
+ }
reader.ReadEndElement();
this.Add(key, value);
@@ -92,8 +102,18 @@ namespace HandBrake.ApplicationServices.Collections
writer.WriteStartElement("value");
TValue value = this[key];
- valueSerializer.Serialize(writer, value);
- writer.WriteEndElement();
+
+ if (value.GetType() == typeof(StringCollection))
+ {
+ XmlSerializer scSerializer = new XmlSerializer(typeof(StringCollection));
+ scSerializer.Serialize(writer, value);
+ writer.WriteEndElement();
+ }
+ else
+ {
+ valueSerializer.Serialize(writer, value);
+ writer.WriteEndElement();
+ }
writer.WriteEndElement();
}
diff --git a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
index 78480847c..0c417c279 100644
--- a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
+++ b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
@@ -128,6 +128,7 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
+ <Compile Include="ServiceManager.cs" />
<Compile Include="Services\Base\EncodeBase.cs" />
<Compile Include="Services\Encode.cs" />
<Compile Include="Services\Interfaces\IEncode.cs" />
diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs
index 1ddb4730d..ac8bcf6d3 100644
--- a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs
+++ b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs
@@ -32,7 +32,7 @@ namespace HandBrake.ApplicationServices.Parsing
/// <summary>
/// The User Setting Service
/// </summary>
- private static IUserSettingService userSettingService = new UserSettingService();
+ private static IUserSettingService userSettingService = ServiceManager.UserSettingService;
/// <summary>
/// Initializes a new instance of the <see cref="Title"/> class.
diff --git a/win/CS/HandBrake.ApplicationServices/ServiceManager.cs b/win/CS/HandBrake.ApplicationServices/ServiceManager.cs
new file mode 100644
index 000000000..06b4422e2
--- /dev/null
+++ b/win/CS/HandBrake.ApplicationServices/ServiceManager.cs
@@ -0,0 +1,27 @@
+namespace HandBrake.ApplicationServices
+{
+ using HandBrake.ApplicationServices.Services;
+ using HandBrake.ApplicationServices.Services.Interfaces;
+
+ /// <summary>
+ /// Tempory Class which manages services until Windosor is added back into the project to handle it for us.
+ /// </summary>
+ public class ServiceManager
+ {
+ /// <summary>
+ /// Backing Field for the User Setting Service.
+ /// </summary>
+ private static IUserSettingService userSettingService;
+
+ /// <summary>
+ /// Gets UserSettingService.
+ /// </summary>
+ public static IUserSettingService UserSettingService
+ {
+ get
+ {
+ return userSettingService ?? (userSettingService = new UserSettingService());
+ }
+ }
+ }
+}
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs
index 48505fc6f..6ab0e52a8 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs
@@ -30,7 +30,7 @@ namespace HandBrake.ApplicationServices.Services.Base
/// <summary>
/// The User Setting Service
/// </summary>
- private IUserSettingService userSettingService = new UserSettingService();
+ private IUserSettingService userSettingService = ServiceManager.UserSettingService;
/// <summary>
/// Windows 7 API Pack wrapper
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
index 04290eced..70f8f86ee 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
@@ -28,7 +28,7 @@ namespace HandBrake.ApplicationServices.Services
/// <summary>
/// The User Setting Service
/// </summary>
- private IUserSettingService userSettingService = new UserSettingService();
+ private IUserSettingService userSettingService = ServiceManager.UserSettingService;
/// <summary>
/// Gets The Process Handle
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
index e677d4784..7ee9a9df3 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
@@ -35,7 +35,7 @@ namespace HandBrake.ApplicationServices.Services
/// <summary>
/// The User Setting Service
/// </summary>
- private IUserSettingService userSettingService = new UserSettingService();
+ private IUserSettingService userSettingService = ServiceManager.UserSettingService;
/// <summary>
/// The Start time of the current Encode;
diff --git a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
index 9cad60e4e..b856577a9 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
@@ -42,7 +42,7 @@ namespace HandBrake.ApplicationServices.Services
/// <summary>
/// The User Setting Service
/// </summary>
- private IUserSettingService userSettingService = new UserSettingService();
+ private IUserSettingService userSettingService = ServiceManager.UserSettingService;
/// <summary>
/// The User Preset file
diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
index 30ba395f4..478fa3661 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
@@ -23,7 +23,7 @@ namespace HandBrake.ApplicationServices.Services
/// <summary>
/// The User Setting Service
/// </summary>
- private static IUserSettingService userSettingService = new UserSettingService();
+ private static IUserSettingService userSettingService = ServiceManager.UserSettingService;
/// <summary>
/// Initializes a new instance of the <see cref="QueueProcessor"/> class.
diff --git a/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs b/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs
index 652115c06..a9c9e07ce 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs
@@ -47,7 +47,7 @@ namespace HandBrake.ApplicationServices.Services
/// <summary>
/// The User Setting Service
/// </summary>
- private IUserSettingService userSettingService = new UserSettingService();
+ private IUserSettingService userSettingService = ServiceManager.UserSettingService;
#endregion
diff --git a/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs b/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs
index 424d0a752..6a8584018 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs
@@ -9,6 +9,7 @@ namespace HandBrake.ApplicationServices.Services
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
+ using System.Windows.Forms;
using System.Xml.Serialization;
using HandBrake.ApplicationServices.Collections;
@@ -139,7 +140,22 @@ namespace HandBrake.ApplicationServices.Services
/// </summary>
private void LoadDefaults()
{
- // TODO, maybe extract this out to a file.
+ string defaults = Path.Combine(Application.StartupPath, "defaultsettings.xml");
+ if (File.Exists(defaults))
+ {
+ using (StreamReader reader = new StreamReader(defaults))
+ {
+ SerializableDictionary<string, object> data = (SerializableDictionary<string, object>)serializer.Deserialize(reader);
+ this.userSettings = data;
+ }
+ }
+ }
+
+ /// <summary>
+ /// This is just a utility method for creating a defaults xml file. Don't use this!!!
+ /// </summary>
+ private void SetAllDefaults()
+ {
userSettings = new SerializableDictionary<string, object>();
userSettings[UserSettingConstants.X264Step] = 0.25;
userSettings[UserSettingConstants.Verbosity] = 1;
@@ -156,6 +172,41 @@ namespace HandBrake.ApplicationServices.Services
userSettings[UserSettingConstants.MinScanDuration] = 10;
userSettings[UserSettingConstants.HandBrakeBuild] = 0;
userSettings[UserSettingConstants.HandBrakeVersion] = string.Empty;
+ userSettings["updateStatus"] = true;
+ userSettings["tooltipEnable"] = true;
+ userSettings["defaultPreset"] = string.Empty;
+ userSettings["skipversion"] = 0;
+ userSettings["autoNaming"] = true;
+ userSettings["autoNamePath"] = string.Empty;
+ userSettings["appcast"] = "http://handbrake.fr/appcast.xml";
+ userSettings["appcast_unstable"] = "http://handbrake.fr/appcast_unstable.xml";
+ userSettings["autoNameFormat"] = "{source}-{title}";
+ userSettings["VLC_Path"] = "C:\\Program Files\\VideoLAN\\vlc\\vlc.exe";
+ userSettings["MainWindowMinimize"] = true;
+ userSettings["QueryEditorTab"] = false;
+ userSettings["presetNotification"] = false;
+ userSettings["trayIconAlerts"] = true;
+ userSettings["lastUpdateCheckDate"] = DateTime.Today;
+ userSettings["daysBetweenUpdateCheck"] = 7;
+ userSettings["useM4v"] = 0;
+ userSettings["PromptOnUnmatchingQueries"] = true;
+ userSettings["NativeLanguage"] = "Any";
+ userSettings["DubMode"] = 255;
+ userSettings["CliExeHash"] = string.Empty;
+ userSettings["previewScanCount"] = 10;
+ userSettings["clearOldLogs"] = true;
+ userSettings["AutoNameTitleCase"] = true;
+ userSettings["AutoNameRemoveUnderscore"] = true;
+ userSettings["ActivityWindowLastMode"] = 0;
+ userSettings["useClosedCaption"] = false;
+ userSettings["batchMinDuration"] = 35;
+ userSettings["batchMaxDuration"] = 65;
+ userSettings["defaultPlayer"] = false;
+ userSettings["SelectedLanguages"] = new StringCollection();
+ userSettings["DubModeAudio"] = 0;
+ userSettings["DubModeSubtitle"] = 0;
+ userSettings["addOnlyOneAudioPerLanguage"] = true;
+ userSettings["MinTitleLength"] = 10;
}
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs b/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs
index 746f36937..b2187ed4b 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs
@@ -25,7 +25,7 @@ namespace HandBrake.ApplicationServices.Utilities
/// <summary>
/// The User Setting Service
/// </summary>
- private static IUserSettingService userSettingService = new UserSettingService();
+ private static IUserSettingService userSettingService = ServiceManager.UserSettingService;
/// <summary>
/// The Default Log Directory
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
index a75741277..392abc569 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
@@ -27,7 +27,7 @@ namespace HandBrake.ApplicationServices.Utilities
/// <summary>
/// The User Setting Service
/// </summary>
- private static IUserSettingService userSettingService = new UserSettingService();
+ private static IUserSettingService userSettingService = ServiceManager.UserSettingService;
/**
* TODO:
diff --git a/win/CS/HandBrakeCS.csproj b/win/CS/HandBrakeCS.csproj
index 081b32feb..df589f70d 100644
--- a/win/CS/HandBrakeCS.csproj
+++ b/win/CS/HandBrakeCS.csproj
@@ -323,6 +323,9 @@
</ItemGroup>
<ItemGroup>
<Content Include="handbrakepineapple.ico" />
+ <Content Include="defaultsettings.xml">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Content>
<None Include="Properties\AssemblyInfo.cs.tmpl" />
<None Include="Resources\logo64.png" />
<None Include="Resources\logo128.png" />
diff --git a/win/CS/Installer/Installer.nsi b/win/CS/Installer/Installer.nsi
index b019ce15f..607bfb697 100644
--- a/win/CS/Installer/Installer.nsi
+++ b/win/CS/Installer/Installer.nsi
@@ -138,6 +138,7 @@ Section "Handbrake" SEC01
File "HandBrakeInterop.dll"
File "SplitButton.dll"
File "Ookii.Dialogs.Wpf.dll"
+ File "defaultsettings.xml"
;File "Caliburn.Castle.dll"
;File "Caliburn.Core.dll"
@@ -201,6 +202,7 @@ Section Uninstall
Delete "$INSTDIR\Microsoft.WindowsAPICodePack.dll"
Delete "$INSTDIR\HandBrakeInterop.dll"
Delete "$INSTDIR\SplitButton.dll"
+ Delete "$INSTDIR\defaultsettings.dll"
Delete "$INSTDIR\Caliburn.Castle.dll"
Delete "$INSTDIR\Caliburn.Core.dll"
diff --git a/win/CS/Installer/Installer64.nsi b/win/CS/Installer/Installer64.nsi
index 3b1df9ede..ae63028a4 100644
--- a/win/CS/Installer/Installer64.nsi
+++ b/win/CS/Installer/Installer64.nsi
@@ -138,6 +138,7 @@ Section "Handbrake" SEC01
File "HandBrakeInterop.dll"
File "SplitButton.dll"
File "Ookii.Dialogs.Wpf.dll"
+ File "defaultsettings.xml"
;File "Caliburn.Castle.dll"
;File "Caliburn.Core.dll"
@@ -201,6 +202,7 @@ Section Uninstall
Delete "$INSTDIR\Microsoft.WindowsAPICodePack.dll"
Delete "$INSTDIR\HandBrakeInterop.dll"
Delete "$INSTDIR\SplitButton.dll"
+ Delete "$INSTDIR\defaultsettings.dll"
Delete "$INSTDIR\Caliburn.Castle.dll"
Delete "$INSTDIR\Caliburn.Core.dll"
diff --git a/win/CS/Installer/MakeNightly.nsi.tmpl b/win/CS/Installer/MakeNightly.nsi.tmpl
index 35a354c08..865da9c36 100644
--- a/win/CS/Installer/MakeNightly.nsi.tmpl
+++ b/win/CS/Installer/MakeNightly.nsi.tmpl
@@ -138,6 +138,7 @@ Section "Handbrake" SEC01
File "HandBrakeInterop.dll"
File "SplitButton.dll"
File "Ookii.Dialogs.Wpf.dll"
+ File "defaultsettings.xml"
; Copy the standard doc set into the doc folder
SetOutPath "$INSTDIR\doc"
@@ -193,6 +194,7 @@ Section Uninstall
Delete "$INSTDIR\HandBrakeInterop.dll"
Delete "$INSTDIR\SplitButton.dll"
Delete "$INSTDIR\Ookii.Dialogs.Wpf.dll"
+ Delete "$INSTDIR\defaultsettings.dll"
Delete "$INSTDIR\doc\AUTHORS"
Delete "$INSTDIR\doc\COPYING"
diff --git a/win/CS/Installer/MakeNightly64.nsi.tmpl b/win/CS/Installer/MakeNightly64.nsi.tmpl
index 7b9d39628..b55e42f09 100644
--- a/win/CS/Installer/MakeNightly64.nsi.tmpl
+++ b/win/CS/Installer/MakeNightly64.nsi.tmpl
@@ -138,6 +138,7 @@ Section "Handbrake" SEC01
File "HandBrakeInterop.dll"
File "SplitButton.dll"
File "Ookii.Dialogs.Wpf.dll"
+ File "defaultsettings.xml"
; Copy the standard doc set into the doc folder
SetOutPath "$INSTDIR\doc"
@@ -193,6 +194,7 @@ Section Uninstall
Delete "$INSTDIR\HandBrakeInterop.dll"
Delete "$INSTDIR\SplitButton.dll"
Delete "$INSTDIR\Ookii.Dialogs.Wpf.dll"
+ Delete "$INSTDIR\defaultsettings.dll"
Delete "$INSTDIR\doc\AUTHORS"
Delete "$INSTDIR\doc\COPYING"
diff --git a/win/CS/Program.cs b/win/CS/Program.cs
index 406d8d0bb..847c70bd6 100644
--- a/win/CS/Program.cs
+++ b/win/CS/Program.cs
@@ -13,6 +13,7 @@ namespace Handbrake
using HandBrake.ApplicationServices;
using HandBrake.ApplicationServices.Exceptions;
using HandBrake.ApplicationServices.Services;
+ using HandBrake.ApplicationServices.Services.Interfaces;
using Handbrake.Properties;
using Handbrake.ToolWindows;
@@ -66,7 +67,7 @@ namespace Handbrake
// So I'm going to only allow this for users using svn builds.
// Going from major to major will require the user to reset.
// Going from svn to svn will attempt the upgrade.
- UserSettingService service = new UserSettingService();
+ IUserSettingService service = ServiceManager.UserSettingService;
string version = service.GetUserSetting<string>(UserSettingConstants.HandBrakeVersion);
if (version.Contains("svn"))
{
diff --git a/win/CS/Properties/Settings.Designer.cs b/win/CS/Properties/Settings.Designer.cs
index 08e3d417f..5ffb8b431 100644
--- a/win/CS/Properties/Settings.Designer.cs
+++ b/win/CS/Properties/Settings.Designer.cs
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:4.0.30319.431
+// Runtime Version:4.0.30319.468
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -324,18 +324,6 @@ namespace Handbrake.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool UpdateRequired {
- get {
- return ((bool)(this["UpdateRequired"]));
- }
- set {
- this["UpdateRequired"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int ActivityWindowLastMode {
get {
@@ -454,5 +442,17 @@ namespace Handbrake.Properties {
this["MinTitleLength"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool UpdateRequired {
+ get {
+ return ((bool)(this["UpdateRequired"]));
+ }
+ set {
+ this["UpdateRequired"] = value;
+ }
+ }
}
}
diff --git a/win/CS/Properties/Settings.settings b/win/CS/Properties/Settings.settings
index a5a61eb98..d9423eca7 100644
--- a/win/CS/Properties/Settings.settings
+++ b/win/CS/Properties/Settings.settings
@@ -77,9 +77,6 @@
<Setting Name="AutoNameRemoveUnderscore" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
- <Setting Name="UpdateRequired" Type="System.Boolean" Scope="User">
- <Value Profile="(Default)">True</Value>
- </Setting>
<Setting Name="ActivityWindowLastMode" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
@@ -111,5 +108,8 @@
<Setting Name="MinTitleLength" Type="System.String" Scope="User">
<Value Profile="(Default)">10</Value>
</Setting>
+ <Setting Name="UpdateRequired" Type="System.Boolean" Scope="User">
+ <Value Profile="(Default)">True</Value>
+ </Setting>
</Settings>
</SettingsFile> \ No newline at end of file
diff --git a/win/CS/app.config b/win/CS/app.config
index 91e3b40be..5217a8bda 100644
--- a/win/CS/app.config
+++ b/win/CS/app.config
@@ -85,9 +85,6 @@
<setting name="AutoNameRemoveUnderscore" serializeAs="String">
<value>True</value>
</setting>
- <setting name="UpdateRequired" serializeAs="String">
- <value>True</value>
- </setting>
<setting name="ActivityWindowLastMode" serializeAs="String">
<value>0</value>
</setting>
@@ -121,6 +118,9 @@
<setting name="MinTitleLength" serializeAs="String">
<value>10</value>
</setting>
+ <setting name="UpdateRequired" serializeAs="String">
+ <value>True</value>
+ </setting>
</Handbrake.Properties.Settings>
</userSettings>
diff --git a/win/CS/defaultsettings.xml b/win/CS/defaultsettings.xml
new file mode 100644
index 000000000..946abad17
--- /dev/null
+++ b/win/CS/defaultsettings.xml
@@ -0,0 +1,411 @@
+<?xml version="1.0"?>
+<dictionary>
+ <item>
+ <key>
+ <string>X264Step</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:double" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">0.25</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>Verbosity</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">1</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>WhenCompleteAction</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">Do nothing</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>GrowlEncode</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>GrowlQueue</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>ProcessPriority</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">Below Normal</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>PreventSleep</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>ShowCLI</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>SaveLogToCopyDirectory</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>SaveLogWithVideo</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>DisableLibDvdNav</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>SendFile</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>MinTitleScanDuration</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">10</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>HandBrakeBuild</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">2011080601</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>HandBrakeVersion</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">svn4156</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>updateStatus</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>tooltipEnable</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>defaultPreset</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance" />
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>skipversion</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">0</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>autoNaming</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>autoNamePath</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance" />
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>appcast</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">http://handbrake.fr/appcast.xml</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>appcast_unstable</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">http://handbrake.fr/appcast_unstable.xml</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>autoNameFormat</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">{source}-{title}</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>VLC_Path</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">C:\Program Files\VideoLAN\vlc\vlc.exe</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>MainWindowMinimize</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>QueryEditorTab</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>presetNotification</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>trayIconAlerts</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>lastUpdateCheckDate</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:dateTime" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">2011-08-15T00:00:00+01:00</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>daysBetweenUpdateCheck</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">7</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>useM4v</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">0</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>PromptOnUnmatchingQueries</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>NativeLanguage</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">Any</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>DubMode</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">255</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>CliExeHash</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance" />
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>previewScanCount</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">10</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>clearOldLogs</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>AutoNameTitleCase</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>AutoNameRemoveUnderscore</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>ActivityWindowLastMode</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">0</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>useClosedCaption</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>batchMinDuration</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">35</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>batchMaxDuration</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">65</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>defaultPlayer</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>SelectedLanguages</string>
+ </key>
+ <value>
+ <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>DubModeAudio</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">0</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>DubModeSubtitle</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">0</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>addOnlyOneAudioPerLanguage</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>MinTitleLength</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">10</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
+ <string>HandBrakeExeHash</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">RQuM6TVXbXkdih1PmGTf+h178Ho=</anyType>
+ </value>
+ </item>
+</dictionary> \ No newline at end of file
diff --git a/win/CS/frmAbout.cs b/win/CS/frmAbout.cs
index 7bceabdb6..518f4a289 100644
--- a/win/CS/frmAbout.cs
+++ b/win/CS/frmAbout.cs
@@ -17,7 +17,7 @@ namespace Handbrake
/// </summary>
public partial class frmAbout : Form
{
- IUserSettingService userSettingService = new UserSettingService();
+ IUserSettingService userSettingService = ServiceManager.UserSettingService;
/// <summary>
/// Initializes a new instance of the <see cref="frmAbout"/> class.
diff --git a/win/CS/frmMain.cs b/win/CS/frmMain.cs
index a3fe681d4..0db9db780 100644
--- a/win/CS/frmMain.cs
+++ b/win/CS/frmMain.cs
@@ -45,7 +45,7 @@ namespace Handbrake
{
#region Private Varibles
// Objects which may be used by one or more other objects *************
- private IUserSettingService userSettingService = new UserSettingService();
+ private IUserSettingService userSettingService = ServiceManager.UserSettingService;
private IQueueProcessor queueProcessor = new QueueProcessor(Program.InstanceId);
private PresetService presetHandler = new PresetService();
diff --git a/win/CS/frmOptions.cs b/win/CS/frmOptions.cs
index ac8092333..0e64dddc1 100644
--- a/win/CS/frmOptions.cs
+++ b/win/CS/frmOptions.cs
@@ -26,7 +26,7 @@ namespace Handbrake
{
private readonly frmMain mainWindow;
- private readonly IUserSettingService userSettingService = new UserSettingService();
+ private readonly IUserSettingService userSettingService = ServiceManager.UserSettingService;
private bool optionsWindowLoading = true;
public frmOptions(frmMain mw)
diff --git a/win/CS/frmQueue.cs b/win/CS/frmQueue.cs
index fc433f1a5..98012f78b 100644
--- a/win/CS/frmQueue.cs
+++ b/win/CS/frmQueue.cs
@@ -50,7 +50,7 @@ namespace Handbrake
/// <summary>
/// The User setting service
/// </summary>
- private readonly IUserSettingService userSettingService = new UserSettingService();
+ private readonly IUserSettingService userSettingService = ServiceManager.UserSettingService;
/// <summary>
/// Initializes a new instance of the <see cref="frmQueue"/> class.