mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Plugin settings - Added SettingSaved event
Meta - Tweak R# ruleset
This commit is contained in:
1 parent
17d41647b6
commit
ced30d3538
2 files changed
+16
-1
No files matched your search
@@ -88,12 +88,18 @@ namespace Artemis.Core
|
||||
|
||||
_pluginSettingEntity.Value = JsonConvert.SerializeObject(Value);
|
||||
_pluginRepository.SaveSetting(_pluginSettingEntity);
|
||||
OnSettingSaved();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when the value of the setting has been changed
|
||||
/// </summary>
|
||||
public event EventHandler<EventArgs> SettingChanged;
|
||||
public event EventHandler SettingChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when the value of the setting has been saved
|
||||
/// </summary>
|
||||
public event EventHandler SettingSaved;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ToString()
|
||||
@@ -108,5 +114,13 @@ namespace Artemis.Core
|
||||
{
|
||||
SettingChanged?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the <see cref="OnSettingSaved" /> event
|
||||
/// </summary>
|
||||
protected internal virtual void OnSettingSaved()
|
||||
{
|
||||
SettingSaved?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user