initial commit
This commit is contained in:
77
Views/UserControls/BenchParamConfigView.xaml
Normal file
77
Views/UserControls/BenchParamConfigView.xaml
Normal file
@@ -0,0 +1,77 @@
|
||||
<UserControl x:Class="HC_APTBS.Views.UserControls.BenchParamConfigView"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,7">
|
||||
|
||||
<UserControl.Resources>
|
||||
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Border BorderBrush="Black" BorderThickness="2" Padding="8">
|
||||
<StackPanel>
|
||||
<!-- Parameter name -->
|
||||
<TextBlock Text="{Binding Name}"
|
||||
FontSize="16" FontWeight="Bold" Foreground="Black"
|
||||
Margin="0,0,0,4"/>
|
||||
<Separator Margin="0,0,0,6"/>
|
||||
|
||||
<!-- CAN frame fields -->
|
||||
<WrapPanel Margin="0,0,0,4">
|
||||
<Label Content="CAN-Bus ID (0x)" VerticalAlignment="Bottom" Foreground="Black"/>
|
||||
<TextBox Text="{Binding MessageIdHex, UpdateSourceTrigger=LostFocus}"
|
||||
Width="40" VerticalAlignment="Center"
|
||||
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19"/>
|
||||
|
||||
<Label Content="Byte L" VerticalAlignment="Bottom" Foreground="Black" Margin="8,0,0,0"/>
|
||||
<TextBox Text="{Binding ByteL, UpdateSourceTrigger=LostFocus}"
|
||||
Width="35" VerticalAlignment="Center"
|
||||
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19"/>
|
||||
|
||||
<Label Content="Byte H" VerticalAlignment="Bottom" Foreground="Black" Margin="8,0,0,0"/>
|
||||
<TextBox Text="{Binding ByteH, UpdateSourceTrigger=LostFocus}"
|
||||
Width="35" VerticalAlignment="Center"
|
||||
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19"/>
|
||||
|
||||
<Label Content="Filter α" VerticalAlignment="Bottom" Foreground="Black" Margin="8,0,0,0"/>
|
||||
<TextBox Text="{Binding Alpha, UpdateSourceTrigger=LostFocus}"
|
||||
Width="40" VerticalAlignment="Center"
|
||||
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19"/>
|
||||
|
||||
<CheckBox Content="Enable formula" IsChecked="{Binding FormulaEnabled}"
|
||||
VerticalAlignment="Center" Foreground="Black" Margin="12,0,0,0"/>
|
||||
</WrapPanel>
|
||||
|
||||
<!-- Calibration coefficients — visible only when formula is enabled -->
|
||||
<WrapPanel Margin="0,2,0,0"
|
||||
Visibility="{Binding FormulaEnabled, Converter={StaticResource BoolToVis}}">
|
||||
<Label Content="P1:" Foreground="Black"/>
|
||||
<TextBox Text="{Binding P1, UpdateSourceTrigger=LostFocus}"
|
||||
Width="45" VerticalAlignment="Center" FontSize="13"
|
||||
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19" Margin="0,0,8,0"/>
|
||||
<Label Content="P2:" Foreground="Black"/>
|
||||
<TextBox Text="{Binding P2, UpdateSourceTrigger=LostFocus}"
|
||||
Width="45" VerticalAlignment="Center" FontSize="13"
|
||||
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19" Margin="0,0,8,0"/>
|
||||
<Label Content="P3:" Foreground="Black"/>
|
||||
<TextBox Text="{Binding P3, UpdateSourceTrigger=LostFocus}"
|
||||
Width="45" VerticalAlignment="Center" FontSize="13"
|
||||
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19" Margin="0,0,8,0"/>
|
||||
<Label Content="P4:" Foreground="Black"/>
|
||||
<TextBox Text="{Binding P4, UpdateSourceTrigger=LostFocus}"
|
||||
Width="45" VerticalAlignment="Center" FontSize="13"
|
||||
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19" Margin="0,0,8,0"/>
|
||||
<Label Content="P5:" Foreground="Black"/>
|
||||
<TextBox Text="{Binding P5, UpdateSourceTrigger=LostFocus}"
|
||||
Width="45" VerticalAlignment="Center" FontSize="13"
|
||||
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19" Margin="0,0,8,0"/>
|
||||
<Label Content="P6:" Foreground="Black"/>
|
||||
<TextBox Text="{Binding P6, UpdateSourceTrigger=LostFocus}"
|
||||
Width="45" VerticalAlignment="Center" FontSize="13"
|
||||
Background="#66FFFFFF" BorderBrush="{x:Null}" Height="19"/>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user