mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Surface - Removed the ArtemisSurface and reworked device loading
This commit is contained in:
1 parent
7ccc9c54fb
commit
056b2bface
50 files changed
+1292
-1506
No files matched your search
@@ -42,6 +42,7 @@
|
||||
<StackPanel>
|
||||
<Button Content="Open plugin directory" Command="{s:Action OpenPluginDirectory}" />
|
||||
<Button Content="Open image directory" Command="{s:Action OpenImageDirectory}" />
|
||||
<Button Content="Reload layout" Command="{s:Action ReloadLayout}" />
|
||||
</StackPanel>
|
||||
</materialDesign:PopupBox>
|
||||
</StackPanel>
|
||||
|
||||
@@ -12,12 +12,14 @@ namespace Artemis.UI.Screens.Settings.Debug
|
||||
public class DeviceDebugViewModel : Screen
|
||||
{
|
||||
private readonly IDeviceService _deviceService;
|
||||
private readonly IRgbService _rgbService;
|
||||
private readonly IDialogService _dialogService;
|
||||
private ArtemisLed _selectedLed;
|
||||
|
||||
public DeviceDebugViewModel(ArtemisDevice device, IDeviceService deviceService, IDialogService dialogService)
|
||||
public DeviceDebugViewModel(ArtemisDevice device, IDeviceService deviceService, IRgbService rgbService, IDialogService dialogService)
|
||||
{
|
||||
_deviceService = deviceService;
|
||||
_rgbService = rgbService;
|
||||
_dialogService = dialogService;
|
||||
Device = device;
|
||||
}
|
||||
@@ -78,6 +80,17 @@ namespace Artemis.UI.Screens.Settings.Debug
|
||||
}
|
||||
}
|
||||
|
||||
public void ReloadLayout()
|
||||
{
|
||||
if (Device.Layout == null)
|
||||
_rgbService.ApplyBestDeviceLayout(Device);
|
||||
else
|
||||
{
|
||||
Device.Layout.ReloadFromDisk();
|
||||
_rgbService.ApplyDeviceLayout(Device, Device.Layout);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// ReSharper restore UnusedMember.Global
|
||||
|
||||
Reference in new issue
Block a user