diff options
author | sr55 <[email protected]> | 2011-08-15 16:54:19 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-08-15 16:54:19 +0000 |
commit | 44b2c7e69d5613631a4ab39a91e01b673046f030 (patch) | |
tree | 8fe8f170aea693a9993c44db3826a324a46cbd4b /win/CS/HandBrake.ApplicationServices/Services/Encode.cs | |
parent | 3e3deb33d5c5ec4aca3d6c855db646b511bf788b (diff) |
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
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/Encode.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/Encode.cs | 13 |
1 files changed, 9 insertions, 4 deletions
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 @@ -26,6 +26,11 @@ namespace HandBrake.ApplicationServices.Services #region Private Variables
/// <summary>
+ /// The User Setting Service
+ /// </summary>
+ private IUserSettingService userSettingService = new UserSettingService();
+
+ /// <summary>
/// Gets The Process Handle
/// </summary>
private IntPtr processHandle;
@@ -102,7 +107,7 @@ namespace HandBrake.ApplicationServices.Services }
}
- if (Properties.Settings.Default.PreventSleep)
+ if (this.userSettingService.GetUserSetting<bool>(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<bool>(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<string>(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<bool>(UserSettingConstants.PreventSleep))
{
Win32.AllowSleep();
}
|