mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Surface editor - Display temporary color in device list
This commit is contained in:
parent
b154badd9c
commit
0464abfafe
@ -234,81 +234,67 @@
|
|||||||
|
|
||||||
<materialDesign:Card materialDesign:ShadowAssist.ShadowDepth="Depth1" Grid.Row="1" Grid.Column="2" VerticalAlignment="Stretch" Margin="5,0,0,0">
|
<materialDesign:Card materialDesign:ShadowAssist.ShadowDepth="Depth1" Grid.Row="1" Grid.Column="2" VerticalAlignment="Stretch" Margin="5,0,0,0">
|
||||||
<materialDesign:DialogHost Identifier="SurfaceListDialogHost" DialogTheme="Inherit" CloseOnClickAway="True">
|
<materialDesign:DialogHost Identifier="SurfaceListDialogHost" DialogTheme="Inherit" CloseOnClickAway="True">
|
||||||
<Grid HorizontalAlignment="Stretch">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<ListBox Grid.Row="0" HorizontalContentAlignment="Stretch" ItemsSource="{Binding ListDeviceViewModels}" SelectionMode="Multiple">
|
|
||||||
<ListBox.ItemContainerStyle>
|
|
||||||
<Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
|
|
||||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
</ListBox.ItemContainerStyle>
|
<ListBox Grid.Row="0" HorizontalContentAlignment="Stretch" ItemsSource="{Binding ListDeviceViewModels}" SelectionMode="Multiple">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemContainerStyle>
|
||||||
<DataTemplate>
|
<Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
|
||||||
<ContentControl s:View.Model="{Binding}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" IsTabStop="False">
|
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||||
<ContentControl.ContextMenu>
|
</Style>
|
||||||
<ContextMenu>
|
|
||||||
<MenuItem Header="Identify" Command="{s:Action IdentifyDevice}" CommandParameter="{Binding Device}">
|
</ListBox.ItemContainerStyle>
|
||||||
<MenuItem.Icon>
|
<ListBox.ItemTemplate>
|
||||||
<materialDesign:PackIcon Kind="AlarmLight" />
|
<DataTemplate>
|
||||||
</MenuItem.Icon>
|
<ContentControl s:View.Model="{Binding}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" IsTabStop="False">
|
||||||
</MenuItem>
|
<ContentControl.ContextMenu>
|
||||||
<Separator />
|
<ContextMenu>
|
||||||
<MenuItem Header="Bring to Front" Command="{s:Action BringToFront}" CommandParameter="{Binding Device}">
|
<MenuItem Header="Identify" Command="{s:Action IdentifyDevice}" CommandParameter="{Binding Device}">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
<materialDesign:PackIcon Kind="ArrangeBringToFront" />
|
<materialDesign:PackIcon Kind="AlarmLight" />
|
||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Header="Bring Forward" Command="{s:Action BringForward}" CommandParameter="{Binding Device}">
|
<Separator />
|
||||||
<MenuItem.Icon>
|
<MenuItem Header="Bring to Front" Command="{s:Action BringToFront}" CommandParameter="{Binding Device}">
|
||||||
<materialDesign:PackIcon Kind="ArrangeBringForward" />
|
<MenuItem.Icon>
|
||||||
</MenuItem.Icon>
|
<materialDesign:PackIcon Kind="ArrangeBringToFront" />
|
||||||
</MenuItem>
|
</MenuItem.Icon>
|
||||||
<MenuItem Header="Send to Back" Command="{s:Action SendToBack}" CommandParameter="{Binding Device}">
|
</MenuItem>
|
||||||
<MenuItem.Icon>
|
<MenuItem Header="Bring Forward" Command="{s:Action BringForward}" CommandParameter="{Binding Device}">
|
||||||
<materialDesign:PackIcon Kind="ArrangeSendToBack" />
|
<MenuItem.Icon>
|
||||||
</MenuItem.Icon>
|
<materialDesign:PackIcon Kind="ArrangeBringForward" />
|
||||||
</MenuItem>
|
</MenuItem.Icon>
|
||||||
<MenuItem Header="Send Backward" Command="{s:Action SendBackward}" CommandParameter="{Binding Device}">
|
</MenuItem>
|
||||||
<MenuItem.Icon>
|
<MenuItem Header="Send to Back" Command="{s:Action SendToBack}" CommandParameter="{Binding Device}">
|
||||||
<materialDesign:PackIcon Kind="ArrangeSendBackward" />
|
<MenuItem.Icon>
|
||||||
</MenuItem.Icon>
|
<materialDesign:PackIcon Kind="ArrangeSendToBack" />
|
||||||
</MenuItem>
|
</MenuItem.Icon>
|
||||||
<Separator />
|
</MenuItem>
|
||||||
<!-- Stylet can't disable it for us here, do it ourselves -->
|
<MenuItem Header="Send Backward" Command="{s:Action SendBackward}" CommandParameter="{Binding Device}">
|
||||||
<MenuItem Header="Identify input"
|
<MenuItem.Icon>
|
||||||
Command="{s:Action DetectInput}"
|
<materialDesign:PackIcon Kind="ArrangeSendBackward" />
|
||||||
CommandParameter="{Binding Device}"
|
</MenuItem.Icon>
|
||||||
IsEnabled="{Binding CanDetectInput}"
|
</MenuItem>
|
||||||
ToolTip="Teach Artemis which keypresses and/or button presses belong to this device">
|
<Separator />
|
||||||
<MenuItem.Icon>
|
<!-- Stylet can't disable it for us here, do it ourselves -->
|
||||||
<materialDesign:PackIcon Kind="GestureDoubleTap" />
|
<MenuItem Header="Identify input"
|
||||||
</MenuItem.Icon>
|
Command="{s:Action DetectInput}"
|
||||||
</MenuItem>
|
CommandParameter="{Binding Device}"
|
||||||
<MenuItem Header="View properties" Command="{s:Action ViewProperties}" CommandParameter="{Binding Device}">
|
IsEnabled="{Binding CanDetectInput}"
|
||||||
<MenuItem.Icon>
|
ToolTip="Teach Artemis which keypresses and/or button presses belong to this device">
|
||||||
<materialDesign:PackIcon Kind="Gear" />
|
<MenuItem.Icon>
|
||||||
</MenuItem.Icon>
|
<materialDesign:PackIcon Kind="GestureDoubleTap" />
|
||||||
</MenuItem>
|
</MenuItem.Icon>
|
||||||
</ContextMenu>
|
</MenuItem>
|
||||||
</ContentControl.ContextMenu>
|
<MenuItem Header="View properties" Command="{s:Action ViewProperties}" CommandParameter="{Binding Device}">
|
||||||
</ContentControl>
|
<MenuItem.Icon>
|
||||||
</DataTemplate>
|
<materialDesign:PackIcon Kind="Gear" />
|
||||||
</ListBox.ItemTemplate>
|
</MenuItem.Icon>
|
||||||
</ListBox>
|
</MenuItem>
|
||||||
<Button Grid.Row="0"
|
</ContextMenu>
|
||||||
Style="{StaticResource MaterialDesignFloatingActionButton}"
|
</ContentControl.ContextMenu>
|
||||||
Command="{s:Action AddSurfaceConfiguration}"
|
</ContentControl>
|
||||||
Margin="0 0 10 10"
|
</DataTemplate>
|
||||||
HorizontalAlignment="Right"
|
</ListBox.ItemTemplate>
|
||||||
VerticalAlignment="Bottom"
|
</ListBox>
|
||||||
ToolTip="Add a new surface layout">
|
|
||||||
<materialDesign:PackIcon Kind="Add" Height="24" Width="24" />
|
|
||||||
</Button>
|
|
||||||
</Grid>
|
|
||||||
</materialDesign:DialogHost>
|
</materialDesign:DialogHost>
|
||||||
</materialDesign:Card>
|
</materialDesign:Card>
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
@ -24,17 +23,16 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
{
|
{
|
||||||
public class SurfaceEditorViewModel : Screen, IMainScreenViewModel
|
public class SurfaceEditorViewModel : Screen, IMainScreenViewModel
|
||||||
{
|
{
|
||||||
private readonly IDeviceService _deviceService;
|
|
||||||
private readonly IInputService _inputService;
|
|
||||||
private readonly IDialogService _dialogService;
|
|
||||||
private readonly IRgbService _rgbService;
|
|
||||||
private readonly ICoreService _coreService;
|
private readonly ICoreService _coreService;
|
||||||
|
private readonly IDeviceService _deviceService;
|
||||||
|
private readonly IDialogService _dialogService;
|
||||||
|
private readonly IInputService _inputService;
|
||||||
|
private readonly IRgbService _rgbService;
|
||||||
private readonly ISettingsService _settingsService;
|
private readonly ISettingsService _settingsService;
|
||||||
private Cursor _cursor;
|
private Cursor _cursor;
|
||||||
private PanZoomViewModel _panZoomViewModel;
|
private PanZoomViewModel _panZoomViewModel;
|
||||||
private RectangleGeometry _selectionRectangle;
|
private RectangleGeometry _selectionRectangle;
|
||||||
private PluginSetting<GridLength> _surfaceListWidth;
|
private PluginSetting<GridLength> _surfaceListWidth;
|
||||||
private List<ArtemisDevice> _shuffledDevices;
|
|
||||||
|
|
||||||
public SurfaceEditorViewModel(IRgbService rgbService,
|
public SurfaceEditorViewModel(IRgbService rgbService,
|
||||||
ICoreService coreService,
|
ICoreService coreService,
|
||||||
@ -113,17 +111,9 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
|
|
||||||
private void CoreServiceOnFrameRendering(object sender, FrameRenderingEventArgs e)
|
private void CoreServiceOnFrameRendering(object sender, FrameRenderingEventArgs e)
|
||||||
{
|
{
|
||||||
float amount = 360f / _shuffledDevices.Count;
|
foreach (ListDeviceViewModel listDeviceViewModel in ListDeviceViewModels)
|
||||||
for (int i = 0; i < _shuffledDevices.Count; i++)
|
foreach (ArtemisLed artemisLed in listDeviceViewModel.Device.Leds)
|
||||||
{
|
e.Canvas.DrawRect(artemisLed.AbsoluteRectangle, new SKPaint {Color = listDeviceViewModel.Color});
|
||||||
ArtemisDevice rgbServiceDevice = _shuffledDevices[i];
|
|
||||||
foreach (ArtemisLed artemisLed in rgbServiceDevice.Leds)
|
|
||||||
{
|
|
||||||
SKColor color = SKColor.FromHsv(amount * i, 100, 100);
|
|
||||||
e.Canvas.DrawRect(artemisLed.AbsoluteRectangle, new SKPaint(){Color = color});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Overrides of Screen
|
#region Overrides of Screen
|
||||||
@ -133,7 +123,15 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
LoadWorkspaceSettings();
|
LoadWorkspaceSettings();
|
||||||
SurfaceDeviceViewModels.AddRange(_rgbService.EnabledDevices.OrderBy(d => d.ZIndex).Select(d => new SurfaceDeviceViewModel(d, _rgbService)));
|
SurfaceDeviceViewModels.AddRange(_rgbService.EnabledDevices.OrderBy(d => d.ZIndex).Select(d => new SurfaceDeviceViewModel(d, _rgbService)));
|
||||||
ListDeviceViewModels.AddRange(_rgbService.EnabledDevices.OrderBy(d => d.ZIndex * -1).Select(d => new ListDeviceViewModel(d)));
|
ListDeviceViewModels.AddRange(_rgbService.EnabledDevices.OrderBy(d => d.ZIndex * -1).Select(d => new ListDeviceViewModel(d)));
|
||||||
_shuffledDevices = _rgbService.EnabledDevices.OrderBy(d => Guid.NewGuid()).ToList();
|
|
||||||
|
List<ArtemisDevice> shuffledDevices = _rgbService.EnabledDevices.OrderBy(d => Guid.NewGuid()).ToList();
|
||||||
|
float amount = 360f / shuffledDevices.Count;
|
||||||
|
for (int i = 0; i < shuffledDevices.Count; i++)
|
||||||
|
{
|
||||||
|
ArtemisDevice rgbServiceDevice = shuffledDevices[i];
|
||||||
|
ListDeviceViewModel vm = ListDeviceViewModels.First(l => l.Device == rgbServiceDevice);
|
||||||
|
vm.Color = SKColor.FromHsv(amount * i, 100, 100);
|
||||||
|
}
|
||||||
|
|
||||||
_coreService.FrameRendering += CoreServiceOnFrameRendering;
|
_coreService.FrameRendering += CoreServiceOnFrameRendering;
|
||||||
|
|
||||||
@ -169,6 +167,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
SurfaceDeviceViewModel deviceViewModel = SurfaceDeviceViewModels[i];
|
SurfaceDeviceViewModel deviceViewModel = SurfaceDeviceViewModels[i];
|
||||||
deviceViewModel.Device.ZIndex = i + 1;
|
deviceViewModel.Device.ZIndex = i + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ListDeviceViewModels.Sort(l => l.Device.ZIndex * -1);
|
ListDeviceViewModels.Sort(l => l.Device.ZIndex * -1);
|
||||||
|
|
||||||
_rgbService.SaveDevices();
|
_rgbService.SaveDevices();
|
||||||
@ -186,6 +185,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
SurfaceDeviceViewModel deviceViewModel = SurfaceDeviceViewModels[i];
|
SurfaceDeviceViewModel deviceViewModel = SurfaceDeviceViewModels[i];
|
||||||
deviceViewModel.Device.ZIndex = i + 1;
|
deviceViewModel.Device.ZIndex = i + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ListDeviceViewModels.Sort(l => l.Device.ZIndex * -1);
|
ListDeviceViewModels.Sort(l => l.Device.ZIndex * -1);
|
||||||
|
|
||||||
_rgbService.SaveDevices();
|
_rgbService.SaveDevices();
|
||||||
@ -200,6 +200,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
SurfaceDeviceViewModel deviceViewModel = SurfaceDeviceViewModels[i];
|
SurfaceDeviceViewModel deviceViewModel = SurfaceDeviceViewModels[i];
|
||||||
deviceViewModel.Device.ZIndex = i + 1;
|
deviceViewModel.Device.ZIndex = i + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ListDeviceViewModels.Sort(l => l.Device.ZIndex * -1);
|
ListDeviceViewModels.Sort(l => l.Device.ZIndex * -1);
|
||||||
|
|
||||||
_rgbService.SaveDevices();
|
_rgbService.SaveDevices();
|
||||||
@ -216,6 +217,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
SurfaceDeviceViewModel deviceViewModel = SurfaceDeviceViewModels[i];
|
SurfaceDeviceViewModel deviceViewModel = SurfaceDeviceViewModels[i];
|
||||||
deviceViewModel.Device.ZIndex = i + 1;
|
deviceViewModel.Device.ZIndex = i + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ListDeviceViewModels.Sort(l => l.Device.ZIndex * -1);
|
ListDeviceViewModels.Sort(l => l.Device.ZIndex * -1);
|
||||||
|
|
||||||
_rgbService.SaveDevices();
|
_rgbService.SaveDevices();
|
||||||
@ -299,10 +301,8 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
if (device.SelectionStatus != SelectionStatus.Selected)
|
if (device.SelectionStatus != SelectionStatus.Selected)
|
||||||
{
|
{
|
||||||
if (!Keyboard.IsKeyDown(Key.LeftShift) && !Keyboard.IsKeyDown(Key.RightShift))
|
if (!Keyboard.IsKeyDown(Key.LeftShift) && !Keyboard.IsKeyDown(Key.RightShift))
|
||||||
{
|
|
||||||
foreach (SurfaceDeviceViewModel others in SurfaceDeviceViewModels)
|
foreach (SurfaceDeviceViewModel others in SurfaceDeviceViewModels)
|
||||||
others.SelectionStatus = SelectionStatus.None;
|
others.SelectionStatus = SelectionStatus.None;
|
||||||
}
|
|
||||||
|
|
||||||
device.SelectionStatus = SelectionStatus.Selected;
|
device.SelectionStatus = SelectionStatus.Selected;
|
||||||
}
|
}
|
||||||
@ -329,12 +329,10 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
RectangleGeometry selectedRect = new(new Rect(_mouseDragStartPoint, position));
|
RectangleGeometry selectedRect = new(new Rect(_mouseDragStartPoint, position));
|
||||||
List<SurfaceDeviceViewModel> devices = HitTestUtilities.GetHitViewModels<SurfaceDeviceViewModel>((Visual) sender, selectedRect);
|
List<SurfaceDeviceViewModel> devices = HitTestUtilities.GetHitViewModels<SurfaceDeviceViewModel>((Visual) sender, selectedRect);
|
||||||
foreach (SurfaceDeviceViewModel device in SurfaceDeviceViewModels)
|
foreach (SurfaceDeviceViewModel device in SurfaceDeviceViewModels)
|
||||||
{
|
|
||||||
if (devices.Contains(device))
|
if (devices.Contains(device))
|
||||||
device.SelectionStatus = SelectionStatus.Selected;
|
device.SelectionStatus = SelectionStatus.Selected;
|
||||||
else if (!Keyboard.IsKeyDown(Key.LeftShift) && !Keyboard.IsKeyDown(Key.RightShift))
|
else if (!Keyboard.IsKeyDown(Key.LeftShift) && !Keyboard.IsKeyDown(Key.RightShift))
|
||||||
device.SelectionStatus = SelectionStatus.None;
|
device.SelectionStatus = SelectionStatus.None;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -356,12 +354,10 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
|
|
||||||
List<SurfaceDeviceViewModel> devices = HitTestUtilities.GetHitViewModels<SurfaceDeviceViewModel>((Visual) sender, SelectionRectangle);
|
List<SurfaceDeviceViewModel> devices = HitTestUtilities.GetHitViewModels<SurfaceDeviceViewModel>((Visual) sender, SelectionRectangle);
|
||||||
foreach (SurfaceDeviceViewModel device in SurfaceDeviceViewModels)
|
foreach (SurfaceDeviceViewModel device in SurfaceDeviceViewModels)
|
||||||
{
|
|
||||||
if (devices.Contains(device))
|
if (devices.Contains(device))
|
||||||
device.SelectionStatus = SelectionStatus.Selected;
|
device.SelectionStatus = SelectionStatus.Selected;
|
||||||
else if (!Keyboard.IsKeyDown(Key.LeftShift) && !Keyboard.IsKeyDown(Key.RightShift))
|
else if (!Keyboard.IsKeyDown(Key.LeftShift) && !Keyboard.IsKeyDown(Key.RightShift))
|
||||||
device.SelectionStatus = SelectionStatus.None;
|
device.SelectionStatus = SelectionStatus.None;
|
||||||
}
|
|
||||||
|
|
||||||
ApplySurfaceSelection();
|
ApplySurfaceSelection();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,16 +8,24 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800"
|
d:DesignHeight="450" d:DesignWidth="800"
|
||||||
d:DataContext="{d:DesignInstance {x:Type local:ListDeviceViewModel}}">
|
d:DataContext="{d:DesignInstance {x:Type local:ListDeviceViewModel}}">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<shared:SKColorToColorConverter x:Key="SKColorToColorConverter" />
|
||||||
|
</UserControl.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="50" />
|
<ColumnDefinition Width="50" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<shared:DeviceVisualizer Device="{Binding Device}" Width="30" Height="30" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
<shared:DeviceVisualizer Device="{Binding Device}" Width="30" Height="30" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||||
<StackPanel Grid.Column="1" VerticalAlignment="Center" >
|
<StackPanel Grid.Column="1" VerticalAlignment="Center">
|
||||||
<TextBlock Text="{Binding Device.RgbDevice.DeviceInfo.Model}" />
|
<TextBlock Text="{Binding Device.RgbDevice.DeviceInfo.Model}" />
|
||||||
<TextBlock Text="{Binding Device.RgbDevice.DeviceInfo.Manufacturer}" Foreground="{DynamicResource MaterialDesignBodyLight}" />
|
<TextBlock Text="{Binding Device.RgbDevice.DeviceInfo.Manufacturer}" Foreground="{DynamicResource MaterialDesignBodyLight}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<Ellipse Grid.Column="2" Width="20" Height="20" Stroke="{DynamicResource MaterialDesignBody}" StrokeThickness="1">
|
||||||
|
<Ellipse.Fill>
|
||||||
|
<SolidColorBrush Color="{Binding Color, Converter={StaticResource SKColorToColorConverter}}" />
|
||||||
|
</Ellipse.Fill>
|
||||||
|
</Ellipse>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@ -1,4 +1,5 @@
|
|||||||
using Artemis.Core;
|
using Artemis.Core;
|
||||||
|
using SkiaSharp;
|
||||||
using Stylet;
|
using Stylet;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.SurfaceEditor.Visualization
|
namespace Artemis.UI.Screens.SurfaceEditor.Visualization
|
||||||
@ -6,6 +7,7 @@ namespace Artemis.UI.Screens.SurfaceEditor.Visualization
|
|||||||
public class ListDeviceViewModel : PropertyChangedBase
|
public class ListDeviceViewModel : PropertyChangedBase
|
||||||
{
|
{
|
||||||
private bool _isSelected;
|
private bool _isSelected;
|
||||||
|
private SKColor _color;
|
||||||
public ArtemisDevice Device { get; }
|
public ArtemisDevice Device { get; }
|
||||||
|
|
||||||
public bool IsSelected
|
public bool IsSelected
|
||||||
@ -14,6 +16,12 @@ namespace Artemis.UI.Screens.SurfaceEditor.Visualization
|
|||||||
set => SetAndNotify(ref _isSelected, value);
|
set => SetAndNotify(ref _isSelected, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SKColor Color
|
||||||
|
{
|
||||||
|
get => _color;
|
||||||
|
set => SetAndNotify(ref _color, value);
|
||||||
|
}
|
||||||
|
|
||||||
public ListDeviceViewModel(ArtemisDevice device)
|
public ListDeviceViewModel(ArtemisDevice device)
|
||||||
{
|
{
|
||||||
Device = device;
|
Device = device;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user