mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Added UI elements borrowed from DarthAffe
Added a WIP of profile classes
This commit is contained in:
1 parent
4f146865a4
commit
6eefa733b4
23 files changed
+847
-108
No files matched your search
@@ -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";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user