initial commit

This commit is contained in:
2026-04-11 12:45:18 +02:00
commit 6e1b929e2f
1246 changed files with 177580 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
<UserControl x:Class="HC_APTBS.Views.UserControls.StatusDisplayView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:conv="clr-namespace:HC_APTBS.Converters"
mc:Ignorable="d"
d:DesignHeight="70" d:DesignWidth="375">
<UserControl.Resources>
<conv:HexColorToBrushConverter x:Key="HexToBrush"/>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="28"/>
<RowDefinition/>
</Grid.RowDefinitions>
<!-- Title -->
<TextBlock Text="{Binding Title}"
HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="14" FontWeight="SemiBold" Foreground="Black"/>
<!-- 16-bit indicator row -->
<ItemsControl Grid.Row="1"
ItemsSource="{Binding Bits}"
Margin="10,0,10,6">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Rows="1"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<!-- Each bit: coloured dot + bit-number label -->
<Grid Margin="1,0">
<Grid.RowDefinitions>
<RowDefinition Height="3*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Rectangle Fill="{Binding Color, Converter={StaticResource HexToBrush}}"
Stroke="#5D5D5D" StrokeThickness="1"
Width="12" Height="12"
HorizontalAlignment="Center" VerticalAlignment="Center"
ToolTip="{Binding Description}"
SnapsToDevicePixels="True"/>
<TextBlock Grid.Row="1" FontSize="8"
HorizontalAlignment="Center" VerticalAlignment="Center"
Foreground="DimGray"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</UserControl>