diff options
author | sr55 <[email protected]> | 2011-08-15 19:23:58 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-08-15 19:23:58 +0000 |
commit | 746186658150dcbca2721d6d6fea77b4d7c09467 (patch) | |
tree | ebf2f050abe5418dbf4acf6cb1602815eb786d49 /win/CS/Functions | |
parent | 774af7004dd17c59fee9606273cd52a24867eb98 (diff) |
WinGui: Add a service manager to maintain single instances of services & update the user settings service to import defaults from an xml file.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4177 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/Functions')
-rw-r--r-- | win/CS/Functions/Main.cs | 2 | ||||
-rw-r--r-- | win/CS/Functions/PresetLoader.cs | 6 | ||||
-rw-r--r-- | win/CS/Functions/QueryGenerator.cs | 2 |
3 files changed, 6 insertions, 4 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
|