mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Data model - Improved encapsulation
Conditions - Renamed from DisplayConditions to DataModelConditions to better match their nature Core - More documentation
This commit is contained in:
1 parent
6b93b1c878
commit
a646ff95ed
39 files changed
+581
-355
No files matched your search
@@ -6,6 +6,10 @@ using Stylet;
|
||||
|
||||
namespace Artemis.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a setting tied to a plugin of type <typeparamref name="T" />
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The value type of the setting</typeparam>
|
||||
public class PluginSetting<T> : PropertyChangedBase
|
||||
{
|
||||
// ReSharper disable once NotAccessedField.Local
|
||||
@@ -78,14 +82,21 @@ namespace Artemis.Core
|
||||
_pluginRepository.SaveSetting(_pluginSettingEntity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when the value of the setting has been changed
|
||||
/// </summary>
|
||||
public event EventHandler<EventArgs> SettingChanged;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{nameof(Name)}: {Name}, {nameof(Value)}: {Value}, {nameof(HasChanged)}: {HasChanged}";
|
||||
}
|
||||
|
||||
protected virtual void OnSettingChanged()
|
||||
/// <summary>
|
||||
/// Invokes the <see cref="SettingChanged" /> event
|
||||
/// </summary>
|
||||
protected internal virtual void OnSettingChanged()
|
||||
{
|
||||
SettingChanged?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user