mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
310 lines
20 KiB
XML
310 lines
20 KiB
XML
<mde:MaterialWindow x:Class="Artemis.UI.Screens.Settings.Debug.DeviceDebugView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:s="https://github.com/canton7/Stylet"
|
|
xmlns:mde="clr-namespace:MaterialDesignExtensions.Controls;assembly=MaterialDesignExtensions"
|
|
xmlns:debug="clr-namespace:Artemis.UI.Screens.Settings.Debug"
|
|
xmlns:core="clr-namespace:Artemis.Core;assembly=Artemis.Core"
|
|
xmlns:shared="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
|
|
mc:Ignorable="d"
|
|
Title="Artemis device debugger"
|
|
TitleBarIcon="{StaticResource BowIcon}"
|
|
Foreground="{DynamicResource MaterialDesignBody}"
|
|
Background="{DynamicResource MaterialDesignPaper}"
|
|
FontFamily="pack://application:,,,/MaterialDesignThemes.Wpf;component/Resources/Roboto/#Roboto"
|
|
UseLayoutRounding="True"
|
|
FadeContentIfInactive="False"
|
|
Width="840"
|
|
Height="800"
|
|
d:DesignHeight="800" d:DesignWidth="800" d:DataContext="{d:DesignInstance debug:DeviceDebugViewModel}"
|
|
Icon="/Resources/Images/Logo/logo-512.png">
|
|
<mde:MaterialWindow.InputBindings>
|
|
<KeyBinding Command="{s:Action ClearSelection}" Key="Escape" />
|
|
</mde:MaterialWindow.InputBindings>
|
|
<DockPanel>
|
|
<mde:AppBar Type="Dense"
|
|
Title="{Binding Device.RgbDevice.DeviceInfo.Model}"
|
|
ShowShadow="True"
|
|
DockPanel.Dock="Top"
|
|
Margin="-18 0 0 0">
|
|
<mde:AppBar.AppIcon>
|
|
<materialDesign:PackIcon Kind="HammerWrench" Width="20" Height="28" />
|
|
</mde:AppBar.AppIcon>
|
|
|
|
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
|
|
<Button Style="{StaticResource MaterialDesignIconForegroundButton}" ToolTip="Identify" Command="{s:Action IdentifyDevice}">
|
|
<materialDesign:PackIcon Kind="AlarmLight" />
|
|
</Button>
|
|
<materialDesign:PopupBox PlacementMode="BottomAndAlignRightEdges" StaysOpen="False">
|
|
<StackPanel>
|
|
<Button Command="{s:Action OpenPluginDirectory}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<materialDesign:PackIcon Kind="Plugin" Margin="0 0 10 0 " VerticalAlignment="Center" />
|
|
<TextBlock VerticalAlignment="Center">Open plugin directory</TextBlock>
|
|
</StackPanel>
|
|
</Button>
|
|
<Button Command="{s:Action OpenImageDirectory}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<materialDesign:PackIcon Kind="Image" Margin="0 0 10 0 " VerticalAlignment="Center" />
|
|
<TextBlock VerticalAlignment="Center">Open layout image directory</TextBlock>
|
|
</StackPanel>
|
|
</Button>
|
|
<Separator />
|
|
<Button Command="{s:Action ReloadLayout}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<materialDesign:PackIcon Kind="Reload" Margin="0 0 10 0 " VerticalAlignment="Center" />
|
|
<TextBlock VerticalAlignment="Center">Reload layout</TextBlock>
|
|
</StackPanel>
|
|
</Button>
|
|
<Button Command="{s:Action ExportLayout}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<materialDesign:PackIcon Kind="Xml" Margin="0 0 10 0 " VerticalAlignment="Center" />
|
|
<TextBlock VerticalAlignment="Center">Export layout</TextBlock>
|
|
</StackPanel>
|
|
</Button>
|
|
</StackPanel>
|
|
</materialDesign:PopupBox>
|
|
</StackPanel>
|
|
</mde:AppBar>
|
|
|
|
<ScrollViewer>
|
|
<Grid Margin="15">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock TextWrapping="Wrap" Margin="0 0 0 10">
|
|
In this window you can view detailed information of the device.
|
|
Please note that having this window open can have a performance impact on your system.
|
|
</TextBlock>
|
|
|
|
<materialDesign:Card materialDesign:ShadowAssist.ShadowDepth="Depth1" Grid.Row="1" Padding="15" Margin="0 10">
|
|
<shared:DeviceVisualizer Device="{Binding Device}"
|
|
HighlightedLeds="{Binding SelectedLeds}"
|
|
HorizontalAlignment="Center"
|
|
MaxHeight="400"
|
|
ShowColors="True" />
|
|
</materialDesign:Card>
|
|
|
|
<materialDesign:Card materialDesign:ShadowAssist.ShadowDepth="Depth1" Grid.Row="2" Padding="15" Margin="0 10">
|
|
<Expander VerticalAlignment="Center" Header="Device properties">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0" Margin="15" HorizontalAlignment="Stretch">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Device name</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}"
|
|
Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}"
|
|
TextWrapping="Wrap"
|
|
Text="{Binding Device.RgbDevice.DeviceInfo.DeviceName}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="0 5" />
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Manufacturer</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}"
|
|
Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}"
|
|
TextWrapping="Wrap"
|
|
Text="{Binding Device.RgbDevice.DeviceInfo.Manufacturer}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="0 5" />
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Device type</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}"
|
|
Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}"
|
|
TextWrapping="Wrap"
|
|
Text="{Binding Device.RgbDevice.DeviceInfo.DeviceType}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="0 5" />
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Physical layout</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}"
|
|
Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}"
|
|
TextWrapping="Wrap"
|
|
Text="{Binding Device.PhysicalLayout}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="0 5" />
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Device image</TextBlock>
|
|
<TextBox Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}"
|
|
TextWrapping="Wrap"
|
|
Text="{Binding Device.Layout.Image, Mode=OneWay}"
|
|
IsReadOnly="True" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="1" Margin="15" HorizontalAlignment="Stretch">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Size (1px = 1mm)</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}"
|
|
Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}"
|
|
TextWrapping="Wrap"
|
|
Text="{Binding Device.RgbDevice.Size}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="0 5" />
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Location (1px = 1mm)</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}"
|
|
Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}"
|
|
TextWrapping="Wrap"
|
|
Text="{Binding Device.RgbDevice.Location}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="0 5" />
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Rotation (degrees)</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}"
|
|
Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}"
|
|
TextWrapping="Wrap"
|
|
Text="{Binding Device.RgbDevice.Rotation.Degrees}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="0 5" />
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Logical layout</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}"
|
|
Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}"
|
|
TextWrapping="Wrap"
|
|
Text="{Binding Device.LogicalLayout}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="0 5" />
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Layout file path</TextBlock>
|
|
<TextBox Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}"
|
|
TextWrapping="Wrap"
|
|
Text="{Binding Device.Layout.FilePath, Mode=OneWay}"
|
|
IsReadOnly="True" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Expander>
|
|
</materialDesign:Card>
|
|
|
|
<materialDesign:Card Grid.Row="3" materialDesign:ShadowAssist.ShadowDepth="Depth1" Padding="15" MaxHeight="413" Margin="0 10">
|
|
<DataGrid ItemsSource="{Binding Device.Leds}"
|
|
d:DataContext="{d:DesignInstance Type=core:ArtemisLed}"
|
|
CanUserSortColumns="True"
|
|
IsReadOnly="True"
|
|
CanUserAddRows="False"
|
|
AutoGenerateColumns="False"
|
|
materialDesign:DataGridAssist.CellPadding="13 8 8 8"
|
|
materialDesign:DataGridAssist.ColumnHeaderPadding="8"
|
|
SelectedItem="{Binding SelectedLed}"
|
|
CanUserResizeRows="False">
|
|
<DataGrid.Columns>
|
|
<materialDesign:DataGridTextColumn Binding="{Binding RgbLed.Id}" Header="LED ID" Width="Auto" />
|
|
<materialDesign:DataGridTextColumn Binding="{Binding RgbLed.Color}" Header="Color (ARGB)" Width="Auto" />
|
|
<materialDesign:DataGridTextColumn Binding="{Binding RgbLed.Image}" Header="Image path" />
|
|
<materialDesign:DataGridTextColumn Binding="{Binding RgbLed.Shape}" Header="Shape" />
|
|
<materialDesign:DataGridTextColumn Binding="{Binding RgbLed.Size}" Header="Size" Width="Auto" />
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</materialDesign:Card>
|
|
|
|
|
|
</Grid>
|
|
</ScrollViewer>
|
|
|
|
</DockPanel>
|
|
</mde:MaterialWindow> |