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/Base/EncodeBase.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/Base/EncodeBase.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs index 978d4c9af..48505fc6f 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs @@ -8,7 +8,6 @@ namespace HandBrake.ApplicationServices.Services.Base using System;
using System.IO;
using System.Text;
- using System.Threading;
using HandBrake.ApplicationServices.EventArgs;
using HandBrake.ApplicationServices.Functions;
@@ -29,6 +28,11 @@ namespace HandBrake.ApplicationServices.Services.Base private static readonly object fileWriterLock = new object();
/// <summary>
+ /// The User Setting Service
+ /// </summary>
+ private IUserSettingService userSettingService = new UserSettingService();
+
+ /// <summary>
/// Windows 7 API Pack wrapper
/// </summary>
private Win7 windowsSeven = new Win7();
@@ -210,17 +214,17 @@ namespace HandBrake.ApplicationServices.Services.Base File.Copy(tempLogFile, Path.Combine(logDir, encodeLogFile));
// Save a copy of the log file in the same location as the enocde.
- if (Properties.Settings.Default.SaveLogWithVideo)
+ if (this.userSettingService.GetUserSetting<bool>(UserSettingConstants.SaveLogWithVideo))
{
File.Copy(tempLogFile, Path.Combine(encodeDestinationPath, encodeLogFile));
}
// Save a copy of the log file to a user specified location
- if (Directory.Exists(Properties.Settings.Default.SaveLogCopyDirectory) &&
- Properties.Settings.Default.SaveLogToCopyDirectory)
+ if (Directory.Exists(this.userSettingService.GetUserSetting<string>(UserSettingConstants.SaveLogCopyDirectory)) &&
+ this.userSettingService.GetUserSetting<bool>(UserSettingConstants.SaveLogToCopyDirectory))
{
File.Copy(
- tempLogFile, Path.Combine(Properties.Settings.Default.SaveLogCopyDirectory, encodeLogFile));
+ tempLogFile, Path.Combine(this.userSettingService.GetUserSetting<string>(UserSettingConstants.SaveLogCopyDirectory), encodeLogFile));
}
}
catch (Exception)
|