mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Started layout editor implementation
Rearranged VMs/Views Updated RGB.NET
This commit is contained in:
1 parent
390dcc6ae1
commit
6e23c079b1
52 files changed
+741
-185
No files matched your search
@@ -0,0 +1,28 @@
|
||||
using Artemis.Core.Events;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
using Artemis.UI.ViewModels.Controls.Settings;
|
||||
using Artemis.UI.ViewModels.Interfaces;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI.ViewModels.Screens
|
||||
{
|
||||
public class SettingsViewModel : Screen, ISettingsViewModel
|
||||
{
|
||||
public SettingsViewModel(IRgbService rgbService)
|
||||
{
|
||||
DeviceSettingsViewModels = new BindableCollection<RgbDeviceSettingsViewModel>();
|
||||
foreach (var device in rgbService.Surface.Devices)
|
||||
DeviceSettingsViewModels.Add(new RgbDeviceSettingsViewModel(device));
|
||||
|
||||
rgbService.DeviceLoaded += UpdateDevices;
|
||||
}
|
||||
|
||||
public BindableCollection<RgbDeviceSettingsViewModel> DeviceSettingsViewModels { get; set; }
|
||||
public string Title => "Settings";
|
||||
|
||||
private void UpdateDevices(object sender, DeviceEventArgs deviceEventArgs)
|
||||
{
|
||||
DeviceSettingsViewModels.Add(new RgbDeviceSettingsViewModel(deviceEventArgs.Device));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user