From 44b2c7e69d5613631a4ab39a91e01b673046f030 Mon Sep 17 00:00:00 2001 From: sr55 Date: Mon, 15 Aug 2011 16:54:19 +0000 Subject: WinGui: Finished re-writing the user settings service to use xml file storage rather than built-in settings. Moved all the Services Library settings over to use the service. Main application will be done later. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4175 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrake.ApplicationServices/Services/Encode.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'win/CS/HandBrake.ApplicationServices/Services/Encode.cs') diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs index 6acfe5807..04290eced 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs @@ -25,6 +25,11 @@ namespace HandBrake.ApplicationServices.Services { #region Private Variables + /// + /// The User Setting Service + /// + private IUserSettingService userSettingService = new UserSettingService(); + /// /// Gets The Process Handle /// @@ -102,7 +107,7 @@ namespace HandBrake.ApplicationServices.Services } } - if (Properties.Settings.Default.PreventSleep) + if (this.userSettingService.GetUserSetting(UserSettingConstants.PreventSleep)) { Win32.PreventSleep(); } @@ -116,7 +121,7 @@ namespace HandBrake.ApplicationServices.Services RedirectStandardOutput = true, RedirectStandardError = enableLogging ? true : false, UseShellExecute = false, - CreateNoWindow = !Properties.Settings.Default.ShowCLI ? true : false + CreateNoWindow = !this.userSettingService.GetUserSetting(UserSettingConstants.ShowCLI) ? true : false }; this.HbProcess = new Process { StartInfo = cliStart }; @@ -142,7 +147,7 @@ namespace HandBrake.ApplicationServices.Services } // Set the Process Priority - switch (Properties.Settings.Default.ProcessPriority) + switch (this.userSettingService.GetUserSetting(UserSettingConstants.ProcessPriority)) { case "Realtime": this.HbProcess.PriorityClass = ProcessPriorityClass.RealTime; @@ -253,7 +258,7 @@ namespace HandBrake.ApplicationServices.Services this.WindowsSeven.SetTaskBarProgressToNoProgress(); } - if (Properties.Settings.Default.PreventSleep) + if (this.userSettingService.GetUserSetting(UserSettingConstants.PreventSleep)) { Win32.AllowSleep(); } -- cgit v1.2.3