Added UI elements borrowed from DarthAffe

Added a WIP of profile classes
This commit is contained in:
SpoinkyNL committed 2018-01-13 00:06:28 +01:00
1 parent 4f146865a4
commit 6eefa733b4
23 files changed
+847 -108

No files matched your search

+28 -1
View File
@@ -1,10 +1,37 @@
using Artemis.UI.ViewModels.Interfaces;
using System.Linq;
using Artemis.Core.Services.Interfaces;
using Artemis.UI.ViewModels.Interfaces;
using RGB.NET.Core;
using Stylet;
namespace Artemis.UI.ViewModels
{
public class SettingsViewModel : Screen, ISettingsViewModel
{
private readonly IRgbService _rgbService;
public SettingsViewModel(IRgbService rgbService)
{
_rgbService = rgbService;
_rgbService.FinishedLoadedDevices += (sender, args) => SetTestDevice();
}
protected override void OnActivate()
{
SetTestDevice();
base.OnActivate();
}
private void SetTestDevice()
{
if (!IsActive)
return;
if (!_rgbService.LoadingDevices)
TestDevice = _rgbService.Surface.Devices.FirstOrDefault(d => d.DeviceInfo.DeviceType == RGBDeviceType.Keyboard);
}
public IRGBDevice TestDevice { get; set; }
public string Title => "Settings";
}
}