Core - Split up RGBService into RenderService and DeviceService

Core - Removed rendering from CoreService
Core - Store and restore original device LEDs when applying/clearing layouts
This commit is contained in:
Robert committed 2023-10-05 20:38:07 +02:00
1 parent 919199a8d0
commit 2a0a0f3cfd
43 files changed
+1363 -1189

No files matched your search

@@ -16,12 +16,12 @@ public class ProfilePreviewViewModel : ActivatableViewModelBase
private readonly IWindowService _windowService;
private ProfileConfiguration? _profileConfiguration;
public ProfilePreviewViewModel(IProfileService profileService, IRgbService rgbService, IWindowService windowService)
public ProfilePreviewViewModel(IProfileService profileService, IDeviceService deviceService, IWindowService windowService)
{
_profileService = profileService;
_windowService = windowService;
Devices = new ObservableCollection<ArtemisDevice>(rgbService.EnabledDevices.OrderBy(d => d.ZIndex));
Devices = new ObservableCollection<ArtemisDevice>(deviceService.EnabledDevices.OrderBy(d => d.ZIndex));
this.WhenAnyValue(vm => vm.ProfileConfiguration).Subscribe(_ => Update());
this.WhenActivated(d => Disposable.Create(() => PreviewProfile(null)).DisposeWith(d));