Workshop - Implemented workshop installation, layout selection and removal

This commit is contained in:
RobertBeekman committed 2024-01-14 12:46:51 +01:00
1 parent dad6a56238
commit 28edabae89
23 files changed
+226 -168

No files matched your search

@@ -398,14 +398,6 @@ public class ArtemisDevice : CorePropertyChanged
}
}
/// <summary>
/// Invokes the <see cref="DeviceUpdated" /> event
/// </summary>
protected virtual void OnDeviceUpdated()
{
DeviceUpdated?.Invoke(this, EventArgs.Empty);
}
/// <summary>
/// Applies the provided layout to the device
/// </summary>
@@ -418,7 +410,7 @@ public class ArtemisDevice : CorePropertyChanged
/// A boolean indicating whether to remove excess LEDs present in the device but missing
/// in the layout
/// </param>
internal void ApplyLayout(ArtemisLayout? layout, bool createMissingLeds, bool removeExcessiveLeds)
public void ApplyLayout(ArtemisLayout? layout, bool createMissingLeds, bool removeExcessiveLeds)
{
if (layout != null && layout.IsValid && createMissingLeds && !DeviceProvider.CreateMissingLedsSupported)
throw new ArtemisCoreException($"Cannot apply layout with {nameof(createMissingLeds)} set to true because the device provider does not support it");
@@ -445,6 +437,14 @@ public class ArtemisDevice : CorePropertyChanged
CalculateRenderProperties();
}
/// <summary>
/// Invokes the <see cref="DeviceUpdated" /> event
/// </summary>
protected virtual void OnDeviceUpdated()
{
DeviceUpdated?.Invoke(this, EventArgs.Empty);
}
private void ClearLayout()
{
if (Layout == null)