summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-01-17 22:29:37 +0000
committersr55 <[email protected]>2013-01-17 22:29:37 +0000
commit7dd8b460af31e84d3b1cb82b63f03464dbadf3ee (patch)
tree83399a9a0e8a942831a2fb6d7a4d849100b6ad7b /win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs
parent6f7272a5caf858b0dd461eee74654c1e4d54500b (diff)
WinGui: UI Tweaks.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5180 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs b/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs
index ab77ce800..db7389637 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs
@@ -16,6 +16,7 @@ namespace HandBrake.ApplicationServices.Services
using System.Xml.Serialization;
using HandBrake.ApplicationServices.Collections;
+ using HandBrake.ApplicationServices.EventArgs;
using HandBrake.ApplicationServices.Exceptions;
using HandBrake.ApplicationServices.Services.Interfaces;
@@ -48,6 +49,11 @@ namespace HandBrake.ApplicationServices.Services
}
/// <summary>
+ /// The setting changed.
+ /// </summary>
+ public event SettingEventHandler SettingChanged;
+
+ /// <summary>
/// Set the specified user setting.
/// </summary>
/// <param name="name">
@@ -60,6 +66,8 @@ namespace HandBrake.ApplicationServices.Services
{
this.userSettings[name] = value;
this.Save();
+
+ this.OnSettingChanged(new SettingChangedEventArgs {Key = name, Value = value});
}
/// <summary>
@@ -99,6 +107,21 @@ namespace HandBrake.ApplicationServices.Services
}
/// <summary>
+ /// The on setting changed.
+ /// </summary>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ protected virtual void OnSettingChanged(SettingChangedEventArgs e)
+ {
+ SettingEventHandler handler = this.SettingChanged;
+ if (handler != null)
+ {
+ handler(this, e);
+ }
+ }
+
+ /// <summary>
/// Save the User Settings
/// </summary>
private void Save()