summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs
diff options
context:
space:
mode:
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()