mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-01-02 10:43:31 +00:00
Compare commits
No commits in common. "ff2e57aeaa21960192d7a8d9a5fa28fef244e784" and "107b604c86e071671bd9bf0b76310b2d2f7b32e5" have entirely different histories.
ff2e57aeaa
...
107b604c86
@ -7,7 +7,6 @@ public class LayoutSelection : CorePropertyChanged
|
|||||||
{
|
{
|
||||||
private string? _type;
|
private string? _type;
|
||||||
private string? _parameter;
|
private string? _parameter;
|
||||||
private string? _errorState;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets what kind of layout reference this is.
|
/// Gets or sets what kind of layout reference this is.
|
||||||
@ -26,13 +25,4 @@ public class LayoutSelection : CorePropertyChanged
|
|||||||
get => _parameter;
|
get => _parameter;
|
||||||
set => SetAndNotify(ref _parameter, value);
|
set => SetAndNotify(ref _parameter, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the error state of the layout reference.
|
|
||||||
/// </summary>
|
|
||||||
public string? ErrorState
|
|
||||||
{
|
|
||||||
get => _errorState;
|
|
||||||
set => SetAndNotify(ref _errorState, value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -184,14 +184,13 @@ internal class DeviceService : IDeviceService
|
|||||||
device.ApplyLayout(null, false, false);
|
device.ApplyLayout(null, false, false);
|
||||||
else
|
else
|
||||||
provider?.ApplyLayout(device, layout);
|
provider?.ApplyLayout(device, layout);
|
||||||
|
|
||||||
UpdateLeds();
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
device.LayoutSelection.ErrorState = e.Message;
|
|
||||||
_logger.Error(e, "Failed to apply device layout");
|
_logger.Error(e, "Failed to apply device layout");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UpdateLeds();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|||||||
@ -9,16 +9,7 @@
|
|||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="800"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="800"
|
||||||
x:Class="Artemis.UI.Screens.Device.Layout.DeviceLayoutTabView"
|
x:Class="Artemis.UI.Screens.Device.Layout.DeviceLayoutTabView"
|
||||||
x:DataType="layout:DeviceLayoutTabViewModel">
|
x:DataType="layout:DeviceLayoutTabViewModel">
|
||||||
<Grid RowDefinitions="Auto,*">
|
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||||
<controls:InfoBar Grid.Row="0"
|
|
||||||
Title="Failed to apply layout"
|
|
||||||
IsOpen="{CompiledBinding Device.LayoutSelection.ErrorState, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
|
||||||
Message="{CompiledBinding Device.LayoutSelection.ErrorState}"
|
|
||||||
Severity="Error"
|
|
||||||
IsClosable="False"
|
|
||||||
Margin="5 0"/>
|
|
||||||
|
|
||||||
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
|
||||||
<Border Classes="card" Margin="5">
|
<Border Classes="card" Margin="5">
|
||||||
<Grid RowDefinitions="*,Auto">
|
<Grid RowDefinitions="*,Auto">
|
||||||
<StackPanel Grid.Row="0">
|
<StackPanel Grid.Row="0">
|
||||||
@ -114,6 +105,4 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
Loading…
x
Reference in New Issue
Block a user