|
| 1 | +<Window x:Class="STM32Visualization.MainWindow" |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + Title="STM32 Visualization" Height="800" Width="600" |
| 5 | + SizeChanged="Window_SizeChanged"> |
| 6 | + |
| 7 | + <Grid Margin="20"> |
| 8 | + <Grid.RowDefinitions> |
| 9 | + <RowDefinition Height="7*"/> |
| 10 | + <RowDefinition Height="*"/> |
| 11 | + <RowDefinition Height="2*"/> |
| 12 | + </Grid.RowDefinitions> |
| 13 | + |
| 14 | + <!-- Heatmap Grid --> |
| 15 | + <Grid x:Name="heatmapGrid" Grid.Row="0" Margin="0,0,0,0" Width="{Binding ActualHeight, ElementName=heatmapGrid}"> |
| 16 | + <!-- Define 8x8 rows and columns --> |
| 17 | + <Grid.Resources> |
| 18 | + <!-- This will be used for the heatmap color --> |
| 19 | + <Style TargetType="Rectangle"> |
| 20 | + <Setter Property="Width" Value="Auto"/> |
| 21 | + <Setter Property="Height" Value="Auto"/> |
| 22 | + </Style> |
| 23 | + </Grid.Resources> |
| 24 | + |
| 25 | + <!-- Generate rows --> |
| 26 | + <Grid.RowDefinitions> |
| 27 | + <RowDefinition Height="*"/> |
| 28 | + <RowDefinition Height="*"/> |
| 29 | + <RowDefinition Height="*"/> |
| 30 | + <RowDefinition Height="*"/> |
| 31 | + <RowDefinition Height="*"/> |
| 32 | + <RowDefinition Height="*"/> |
| 33 | + <RowDefinition Height="*"/> |
| 34 | + <RowDefinition Height="*"/> |
| 35 | + </Grid.RowDefinitions> |
| 36 | + |
| 37 | + <!-- Generate columns --> |
| 38 | + <Grid.ColumnDefinitions> |
| 39 | + <ColumnDefinition Width="*"/> |
| 40 | + <ColumnDefinition Width="*"/> |
| 41 | + <ColumnDefinition Width="*"/> |
| 42 | + <ColumnDefinition Width="*"/> |
| 43 | + <ColumnDefinition Width="*"/> |
| 44 | + <ColumnDefinition Width="*"/> |
| 45 | + <ColumnDefinition Width="*"/> |
| 46 | + <ColumnDefinition Width="*"/> |
| 47 | + </Grid.ColumnDefinitions> |
| 48 | + |
| 49 | + </Grid> |
| 50 | + |
| 51 | + |
| 52 | + <!-- Legend Canvas --> |
| 53 | + <Canvas x:Name="legendCanvas" Grid.Row="1" Margin="0,0,0,50"> |
| 54 | + <!-- Color legend for heatmap goes here. Add rectangles or text as needed --> |
| 55 | + </Canvas> |
| 56 | + |
| 57 | + <!-- Canvas for delta_X and delta_Y visualization --> |
| 58 | + |
| 59 | + <!-- Controls for COM ports, baud rate, and start/stop button --> |
| 60 | + <StackPanel Orientation="Horizontal" Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Right"> |
| 61 | + <ComboBox x:Name="comboBoxComPorts" Width="100" Margin="5"/> |
| 62 | + <ComboBox x:Name="comboBoxBaudRates" Width="100" Margin="5"/> |
| 63 | + <Button x:Name="btnStartStop" Content="Start" Width="100" Click="btnStartStop_Click" Margin="5"/> |
| 64 | + <CheckBox x:Name="toggleCheckBox" Content="Print Parsed" Checked="ToggleCheckBox_Checked" Unchecked="ToggleCheckBox_Unchecked" Margin="5"/> |
| 65 | + </StackPanel> |
| 66 | + <RichTextBox x:Name="richTextBox" Margin="140,10,0,0" Grid.Row="2" Grid.RowSpan="1"> |
| 67 | + </RichTextBox> |
| 68 | + <Canvas x:Name="blobCanvas" |
| 69 | + HorizontalAlignment="Center" |
| 70 | + VerticalAlignment="Center" |
| 71 | + Height="{Binding ActualHeight, ElementName=heatmapGrid}" |
| 72 | + Width="{Binding ActualWidth, ElementName=heatmapGrid}" |
| 73 | + /> |
| 74 | + |
| 75 | + |
| 76 | + <Canvas Name="frameCanvas" HorizontalAlignment="Left" Height="125" VerticalAlignment="Top" Width="125" Background="White" Margin="10,14,0,0" Grid.Row="2"> |
| 77 | + <Label Content="dC" HorizontalAlignment="Left" Canvas.Top="99" VerticalAlignment="Top"/> |
| 78 | + </Canvas> |
| 79 | + </Grid> |
| 80 | +</Window> |
0 commit comments