summaryrefslogtreecommitdiffstats
path: root/win/CS/frmActivityWindow.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-08-17 14:05:33 +0000
committersr55 <[email protected]>2011-08-17 14:05:33 +0000
commitebc5352895fbb61f31d7e6f4b48718e5f9be2a0e (patch)
treeb6425004a46d2aeff48a43df1a8b51285a2b74d0 /win/CS/frmActivityWindow.cs
parent1bd57899117e7b796d95cade71520dc87984a197 (diff)
WinGui: Finish migrating the settings over to the new user setting service.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4183 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/frmActivityWindow.cs')
-rw-r--r--win/CS/frmActivityWindow.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/win/CS/frmActivityWindow.cs b/win/CS/frmActivityWindow.cs
index c3dc5c966..eb6f30ee1 100644
--- a/win/CS/frmActivityWindow.cs
+++ b/win/CS/frmActivityWindow.cs
@@ -13,6 +13,7 @@ namespace Handbrake
using System.Threading;
using System.Windows.Forms;
+ using HandBrake.ApplicationServices;
using HandBrake.ApplicationServices.Services.Interfaces;
using Handbrake.Functions;
@@ -38,6 +39,11 @@ namespace Handbrake
private readonly IScan scan;
/// <summary>
+ /// The User Setting Service.
+ /// </summary>
+ private readonly IUserSettingService UserSettingService = ServiceManager.UserSettingService;
+
+ /// <summary>
/// The current position in the log file
/// </summary>
private int position;
@@ -122,8 +128,7 @@ namespace Handbrake
this.mode = setMode;
Array values = Enum.GetValues(typeof(ActivityLogMode));
- Properties.Settings.Default.ActivityWindowLastMode = (int)values.GetValue(Convert.ToInt32(setMode));
- Properties.Settings.Default.Save();
+ this.UserSettingService.SetUserSetting(UserSettingConstants.ActivityWindowLastMode, (int)values.GetValue(Convert.ToInt32(setMode)));
this.Text = mode == ActivityLogMode.Scan
? "Activity Window (Scan Log)"
@@ -173,7 +178,8 @@ namespace Handbrake
else
{
// Otherwise, use the last mode the window was in.
- ActivityLogMode activitLogMode = (ActivityLogMode)Enum.ToObject(typeof(ActivityLogMode), Properties.Settings.Default.ActivityWindowLastMode);
+ ActivityLogMode activitLogMode = (ActivityLogMode)Enum.ToObject(typeof(ActivityLogMode),
+ this.UserSettingService.GetUserSetting<int>(UserSettingConstants.ActivityWindowLastMode));
this.logSelector.SelectedIndex = activitLogMode == ActivityLogMode.Scan ? 0 : 1;
}
}