Added profile hierarchy creation and editing (doesn't save yet)

This commit is contained in:
SpoinkyNL committed 2019-11-23 23:56:07 +01:00
1 parent ff959b6f9c
commit 1bb2d4a4f2
43 files changed
+676 -241

No files matched your search

@@ -6,15 +6,15 @@
xmlns:s="https://github.com/canton7/Stylet"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
d:DesignHeight="213.053" d:DesignWidth="254.425" >
d:DesignHeight="213.053" d:DesignWidth="254.425">
<StackPanel Margin="16">
<TextBlock Style="{StaticResource MaterialDesignTitleTextBlock}">
Add a new surface layout
</TextBlock>
<TextBox materialDesign:HintAssist.Hint="Layout name"
<TextBox materialDesign:HintAssist.Hint="Layout name"
Margin="0 8 0 16"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding SurfaceName, UpdateSourceTrigger=PropertyChanged}" />
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
@@ -21,9 +21,9 @@ namespace Artemis.UI.Screens.SurfaceEditor
{
public class SurfaceEditorViewModel : Screen, IScreenViewModel
{
private readonly IDeviceService _deviceService;
private readonly IDialogService _dialogService;
private readonly ISettingsService _settingsService;
private readonly IDeviceService _deviceService;
private readonly ISurfaceService _surfaceService;
public SurfaceEditorViewModel(ISurfaceService surfaceService, IDialogService dialogService, ISettingsService settingsService, IDeviceService deviceService)
@@ -52,6 +52,9 @@ namespace Artemis.UI.Screens.SurfaceEditor
get => _selectedSurface;
set
{
if (value == null)
return;
_selectedSurface = value;
ApplySelectedSurfaceConfiguration();
}
@@ -104,12 +107,6 @@ namespace Artemis.UI.Screens.SurfaceEditor
private void ApplySelectedSurfaceConfiguration()
{
if (SelectedSurface == null)
{
Execute.PostToUIThread(Devices.Clear);
return;
}
// Make sure all devices have an up-to-date VM
foreach (var surfaceDeviceConfiguration in SelectedSurface.Devices)
{
@@ -59,7 +59,7 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
<!-- Selection rectangle -->
<Rectangle Width="Auto" Height="Auto" StrokeThickness="2">
<Rectangle.Stroke>