summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-08-15 16:54:19 +0000
committersr55 <[email protected]>2011-08-15 16:54:19 +0000
commit44b2c7e69d5613631a4ab39a91e01b673046f030 (patch)
tree8fe8f170aea693a9993c44db3826a324a46cbd4b /win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
parent3e3deb33d5c5ec4aca3d6c855db646b511bf788b (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/LibEncode.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
index d7af9b224..e677d4784 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
@@ -33,6 +33,11 @@ namespace HandBrake.ApplicationServices.Services
private static readonly object logLock = new object();
/// <summary>
+ /// The User Setting Service
+ /// </summary>
+ private IUserSettingService userSettingService = new UserSettingService();
+
+ /// <summary>
/// The Start time of the current Encode;
/// </summary>
private DateTime startTime;
@@ -109,7 +114,7 @@ namespace HandBrake.ApplicationServices.Services
}
// Prvent the system from sleeping if the user asks
- if (Properties.Settings.Default.PreventSleep)
+ if (this.userSettingService.GetUserSetting<bool>(UserSettingConstants.PreventSleep) )
{
Win32.PreventSleep();
}
@@ -121,7 +126,7 @@ namespace HandBrake.ApplicationServices.Services
this.instance.StartEncode(encodeJob);
// Set the Process Priority
- switch (Properties.Settings.Default.ProcessPriority)
+ switch (this.userSettingService.GetUserSetting<string>(UserSettingConstants.ProcessPriority))
{
case "Realtime":
Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime;
@@ -280,7 +285,7 @@ namespace HandBrake.ApplicationServices.Services
this.WindowsSeven.SetTaskBarProgressToNoProgress();
}
- if (Properties.Settings.Default.PreventSleep)
+ if (this.userSettingService.GetUserSetting<bool>(UserSettingConstants.PreventSleep))
{
Win32.AllowSleep();
}