mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Shared UI - Moved initialization code
Color picker - Added toggle to preview color on devices Settings - Added toggable auto-save
This commit is contained in:
1 parent
33373bda57
commit
fa329a9048
16 files changed
+276
-103
No files matched your search
@@ -48,12 +48,14 @@ namespace Artemis.Core
|
||||
get => _value;
|
||||
set
|
||||
{
|
||||
if (!Equals(_value, value))
|
||||
{
|
||||
_value = value;
|
||||
OnSettingChanged();
|
||||
NotifyOfPropertyChange(nameof(Value));
|
||||
}
|
||||
if (Equals(_value, value)) return;
|
||||
|
||||
_value = value;
|
||||
OnSettingChanged();
|
||||
NotifyOfPropertyChange(nameof(Value));
|
||||
|
||||
if (AutoSave)
|
||||
Save();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +64,12 @@ namespace Artemis.Core
|
||||
/// </summary>
|
||||
public bool HasChanged => JsonConvert.SerializeObject(Value) != _pluginSettingEntity.Value;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether changes must automatically be saved
|
||||
/// <para>Note: When set to <c>true</c> <see cref="HasChanged" /> is always <c>false</c></para>
|
||||
/// </summary>
|
||||
public bool AutoSave { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Resets the setting to the last saved value
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user