mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +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);
|
_pluginSettingEntity.Value = JsonConvert.SerializeObject(Value);
|
||||||
_pluginRepository.SaveSetting(_pluginSettingEntity);
|
_pluginRepository.SaveSetting(_pluginSettingEntity);
|
||||||
|
OnSettingSaved();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Occurs when the value of the setting has been changed
|
/// Occurs when the value of the setting has been changed
|
||||||
/// </summary>
|
/// </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 />
|
/// <inheritdoc />
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
@@ -108,5 +114,13 @@ namespace Artemis.Core
|
|||||||
{
|
{
|
||||||
SettingChanged?.Invoke(this, EventArgs.Empty);
|
SettingChanged?.Invoke(this, EventArgs.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Invokes the <see cref="OnSettingSaved" /> event
|
||||||
|
/// </summary>
|
||||||
|
protected internal virtual void OnSettingSaved()
|
||||||
|
{
|
||||||
|
SettingSaved?.Invoke(this, EventArgs.Empty);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
|
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ACCESSORHOLDER_ATTRIBUTE_ON_SAME_LINE_EX/@EntryValue">NEVER</s:String>
|
||||||
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_LIMIT/@EntryValue">200</s:Int64>
|
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_LIMIT/@EntryValue">200</s:Int64>
|
||||||
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/XmlFormatter/WRAP_LIMIT/@EntryValue">200</s:Int64>
|
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/XmlFormatter/WRAP_LIMIT/@EntryValue">200</s:Int64>
|
||||||
<s:String x:Key="/Default/CodeStyle/CSharpVarKeywordUsage/ForBuiltInTypes/@EntryValue">UseExplicitType</s:String>
|
<s:String x:Key="/Default/CodeStyle/CSharpVarKeywordUsage/ForBuiltInTypes/@EntryValue">UseExplicitType</s:String>
|
||||||
|
|||||||
Reference in new issue
Block a user