mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 20:06:33 +00:00
UI - Many misc fixes I can't remember
Profile editor - Removed layer outline, increasing performance by a lot Device visualizer - Streamlined custom Device providers - Added debug device provider ASUS - Added Maximus X Hero thanks @copystring Plugin core - Added PerLedLayerBrush Noise layer - Converted to PerLedLayerBrush, increasing performance and quality
This commit is contained in:
1 parent
f36049a0e1
commit
29489fe7b3
29 files changed
+767
-277
No files matched your search
@@ -0,0 +1,39 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Artemis.Core.Plugins.Abstract;
|
||||
using Artemis.Core.Plugins.Abstract.ViewModels;
|
||||
using Artemis.Core.Plugins.Models;
|
||||
using Artemis.Plugins.Devices.Debug.Settings;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.Plugins.Devices.Debug.ViewModels
|
||||
{
|
||||
public class DebugConfigurationViewModel : PluginConfigurationViewModel
|
||||
{
|
||||
private PluginSetting<List<DeviceDefinition>> _definitions;
|
||||
|
||||
public DebugConfigurationViewModel(Plugin plugin, PluginSettings settings) : base(plugin)
|
||||
{
|
||||
_definitions = settings.GetSetting<List<DeviceDefinition>>("DeviceDefinitions");
|
||||
Definitions = new BindableCollection<DeviceDefinition>(_definitions.Value);
|
||||
}
|
||||
|
||||
public BindableCollection<DeviceDefinition> Definitions { get; }
|
||||
|
||||
public void SaveChanges()
|
||||
{
|
||||
// Ignore empty definitions
|
||||
_definitions.Value.Clear();
|
||||
_definitions.Value.AddRange(Definitions.Where(d => !string.IsNullOrWhiteSpace(d.Layout) || !string.IsNullOrWhiteSpace(d.ImageLayout)));
|
||||
_definitions.Save();
|
||||
|
||||
RequestClose();
|
||||
}
|
||||
|
||||
public void Cancel()
|
||||
{
|
||||
_definitions.RejectChanges();
|
||||
RequestClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user