mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 21:46:30 +00:00
b21f8e320f
add tensorrt engine
184 lines
12 KiB
XML
184 lines
12 KiB
XML
<UserControl x:Class="Azaion.Common.Controls.DetectionClasses"
|
|
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"
|
|
d:DesignHeight="300" d:DesignWidth="300">
|
|
<UserControl.Resources>
|
|
<Style x:Key="ButtonRadioButtonStyle" TargetType="RadioButton">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="RadioButton">
|
|
<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}"
|
|
Background="{TemplateBinding Background}" BorderThickness="1"
|
|
Padding="10,5" CornerRadius="2">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="Border" Property="Background" Value="Gray"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Border" Property="Background" Value="DarkGray"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="BorderBrush" Value="White"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
</Style>
|
|
</UserControl.Resources>
|
|
<Grid Background="Black">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<!-- Your DataGrid with detection classes -->
|
|
<DataGrid x:Name="DetectionDataGrid"
|
|
Grid.Row="0"
|
|
Background="Black"
|
|
RowBackground="#252525"
|
|
Foreground="White"
|
|
RowHeaderWidth="0"
|
|
Padding="2 0 0 0"
|
|
AutoGenerateColumns="False"
|
|
SelectionMode="Single"
|
|
CellStyle="{DynamicResource DataGridCellStyle1}"
|
|
IsReadOnly="True"
|
|
CanUserResizeRows="False"
|
|
CanUserResizeColumns="False"
|
|
SelectionChanged="DetectionDataGrid_SelectionChanged"
|
|
x:FieldModifier="public"
|
|
>
|
|
<DataGrid.Columns>
|
|
<DataGridTemplateColumn Width="50" Header="Клавіша" CanUserSort="False">
|
|
<DataGridTemplateColumn.HeaderStyle>
|
|
<Style TargetType="DataGridColumnHeader">
|
|
<Setter Property="Background" Value="#252525"/>
|
|
</Style>
|
|
</DataGridTemplateColumn.HeaderStyle>
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<Border Background="{Binding Path=ColorBrush}">
|
|
<TextBlock Text="{Binding Path=ClassNumber}"/>
|
|
</Border>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
<DataGridTextColumn Width="*" Header="Назва" Binding="{Binding Path=ShortName}" CanUserSort="False">
|
|
<DataGridTextColumn.HeaderStyle>
|
|
<Style TargetType="DataGridColumnHeader">
|
|
<Setter Property="Background" Value="#252525"/>
|
|
</Style>
|
|
</DataGridTextColumn.HeaderStyle>
|
|
</DataGridTextColumn>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
<!-- StackPanel with mode switcher RadioButtons -->
|
|
<StackPanel x:Name="ModeSwitcherPanel"
|
|
Grid.Row="1"
|
|
Orientation="Horizontal"
|
|
HorizontalAlignment="Center"
|
|
Margin="0,2,0,2">
|
|
<RadioButton x:Name="NormalModeRadioButton"
|
|
Tag="0"
|
|
GroupName="Mode"
|
|
Checked="ModeRadioButton_Checked"
|
|
IsChecked="True"
|
|
Style="{StaticResource ButtonRadioButtonStyle}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Height="16" Width="16">
|
|
<Image.Source>
|
|
<DrawingImage>
|
|
<DrawingImage.Drawing>
|
|
<DrawingGroup ClipGeometry="M0,0 V640 H640 V0 H0 Z">
|
|
<GeometryDrawing Brush="LightGray" Geometry="m256,105.5c-83.9,0-152.2,68.3-152.2,152.2 0,83.9 68.3,152.2 152.2,152.2 83.9,0 152.2-68.3
|
|
152.2-152.2 0-84-68.3-152.2-152.2-152.2zm0,263.5c-61.4,0-111.4-50-111.4-111.4 0-61.4 50-111.4 111.4-111.4 61.4,0 111.4,50 111.4,111.4
|
|
0,61.4-50,111.4-111.4,111.4z" />
|
|
<GeometryDrawing Brush="LightGray" Geometry="m256,74.8c11.3,0 20.4-9.1 20.4-20.4v-23c0-11.3-9.1-20.4-20.4-20.4-11.3,0-20.4,9.1-20.4,20.4v23c2.84217e-14,11.3 9.1,20.4 20.4,20.4z" />
|
|
<GeometryDrawing Brush="LightGray" Geometry="m256,437.2c-11.3,0-20.4,9.1-20.4,20.4v22.9c0,11.3 9.1,20.4 20.4,20.4 11.3,0 20.4-9.1 20.4-20.4v-22.9c0-11.2-9.1-20.4-20.4-20.4z" />
|
|
<GeometryDrawing Brush="LightGray" Geometry="m480.6,235.6h-23c-11.3,0-20.4,9.1-20.4,20.4 0,11.3 9.1,20.4 20.4,20.4h23c11.3,0 20.4-9.1 20.4-20.4 0-11.3-9.1-20.4-20.4-20.4z" />
|
|
<GeometryDrawing Brush="LightGray" Geometry="m54.4,235.6h-23c-11.3,0-20.4,9.1-20.4,20.4 0,11.3 9.1,20.4 20.4,20.4h22.9c11.3,0 20.4-9.1 20.4-20.4 0.1-11.3-9.1-20.4-20.3-20.4z" />
|
|
<GeometryDrawing Brush="LightGray" Geometry="M400.4,82.8L384.1,99c-8,8-8,20.9,0,28.9s20.9,8,28.9,0l16.2-16.2c8-8,8-20.9,0-28.9S408.3,74.8,400.4,82.8z" />
|
|
<GeometryDrawing Brush="LightGray" Geometry="m99,384.1l-16.2,16.2c-8,8-8,20.9 0,28.9 8,8 20.9,8 28.9,0l16.2-16.2c8-8 8-20.9 0-28.9s-20.9-7.9-28.9,0z" />
|
|
<GeometryDrawing Brush="LightGray" Geometry="m413,384.1c-8-8-20.9-8-28.9,0-8,8-8,20.9 0,28.9l16.2,16.2c8,8 20.9,8 28.9,0 8-8 8-20.9 0-28.9l-16.2-16.2z" />
|
|
<GeometryDrawing Brush="LightGray" Geometry="m99,127.9c8,8 20.9,8 28.9,0 8-8 8-20.9 0-28.9l-16.2-16.2c-8-8-20.9-8-28.9,0-8,8-8,20.9 0,28.9l16.2,16.2z" />
|
|
</DrawingGroup>
|
|
</DrawingImage.Drawing>
|
|
</DrawingImage>
|
|
</Image.Source>
|
|
</Image>
|
|
<TextBlock Name="RegularModeButton"
|
|
Padding="3"
|
|
/>
|
|
</StackPanel>
|
|
</RadioButton>
|
|
<RadioButton x:Name="EveningModeRadioButton"
|
|
Tag="20"
|
|
GroupName="Mode"
|
|
Checked="ModeRadioButton_Checked" Margin="3,0,0,0"
|
|
Style="{StaticResource ButtonRadioButtonStyle}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Height="16" Width="16">
|
|
<Image.Source>
|
|
<DrawingImage>
|
|
<DrawingImage.Drawing>
|
|
<DrawingGroup ClipGeometry="M0,0 V640 H640 V0 H0 Z">
|
|
<GeometryDrawing Brush="LightGray" Geometry="m444.8,256l50.2-50.2c8-8 8-20.9 0-28.9-8-8-20.9-8-28.9,0l-58.7,58.7h-85c-1.3-4.2-3-8.3-5-12.1l60.1-60.1h83c11.3,
|
|
0 20.4-9.1 20.4-20.4 0-11.3-9.1-20.4-20.4-20.4h-71v-71c0-11.3-9.1-20.4-20.4-20.4s-20.4,9.1-20.4,20.4v83l-60.1,60.1c-3.8-2-7.9-3.7-12.1-5v-85l58.7-58.7c8-8 8-20.9
|
|
0-28.9-8-8-20.9-8-28.9,0l-50.3,50.1-50.2-50.2c-8-8-20.9-8-28.9,0-8,8-8,20.9 0,28.9l58.7,58.7v85c-4.2,1.3-8.3,
|
|
3-12.1,5l-60.1-60.1v-83c0-11.3-9.1-20.4-20.4-20.4-11.3,0-20.4,9.1-20.4,20.4v71h-71c-11.3,0-20.4,9.1-20.4,20.4 0,11.3 9.1,20.4 20.4,
|
|
20.4h83l60.1,60.1c-2,3.8-3.7,7.9-5,12.1h-85l-58.7-58.7c-8-8-20.9-8-28.9,0-8,8-8,20.9 0,28.9l50.1,50.3-50.2,50.2c-8,8-8,20.9 0,28.9
|
|
8,8 20.9,8 28.9,0l58.7-58.7h85c1.3,4.2 3,8.3 5,12.1l-60.1,60.1h-83c-11.3,0-20.4,9.1-20.4,20.4 0,11.3 9.1,20.4 20.4,20.4h71v71c0,11.3
|
|
9.1,20.4 20.4,20.4 11.3,0 20.4-9.1 20.4-20.4v-83l60.1-60.1c3.8,2 7.9,3.7 12.1,5v85l-58.7,58.7c-8,8-8,20.9 0,28.9 8,8 20.9,8 28.9,0l50.2-50.2
|
|
50.2,50.2c8,8 20.9,8 28.9,0 8-8 8-20.9 0-28.9l-58.7-58.7v-85c4.2-1.3 8.3-3 12.1-5l60.1,60.1v83c0,11.3 9.1,20.4 20.4,20.4s20.4-9.1 20.4-20.4v-71h71c11.3,0
|
|
20.4-9.1 20.4-20.4 0-11.3-9.1-20.4-20.4-20.4h-83l-60.1-60.1c2-3.8 3.7-7.9 5-12.1h85l58.7,58.7c8,8 20.9,8 28.9,0 8-8 8-20.9
|
|
0-28.9l-50-50.2zm-217.3,0c0-15.7 12.8-28.5 28.5-28.5s28.5,12.8 28.5,28.5-12.8,28.5-28.5,28.5-28.5-12.8-28.5-28.5z" />
|
|
</DrawingGroup>
|
|
</DrawingImage.Drawing>
|
|
</DrawingImage>
|
|
</Image.Source>
|
|
</Image>
|
|
<TextBlock Name="WinterModeButton"
|
|
Padding="3"
|
|
/>
|
|
</StackPanel>
|
|
</RadioButton>
|
|
<RadioButton x:Name="NightModeRadioButton"
|
|
Tag="40"
|
|
GroupName="Mode"
|
|
Checked="ModeRadioButton_Checked" Margin="3,0,0,0"
|
|
Style="{StaticResource ButtonRadioButtonStyle}"
|
|
>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Height="16" Width="16">
|
|
<Image.Source>
|
|
<DrawingImage>
|
|
<DrawingImage.Drawing>
|
|
<DrawingGroup ClipGeometry="M0,0 V640 H640 V0 H0 Z">
|
|
<GeometryDrawing Brush="LightGray" Geometry="m500,113.1c-2.4-7.5-8.9-13-16.8-14.1l-55.2-7.9-24.6-48.9c-3.5-7-10.7-11.4-18.5-11.4-7.8,0-15,4.4-18.5,11.4l-24.6,
|
|
48.9-55.2,7.9c-7.8,1.1-14.3,6.6-16.8,14.1-2.4,7.5-0.3,15.8 5.4,21.3l39.7,37.9-9.4,53.4c-1.4,7.7 1.8,15.6 8.1,20.2 6.3,4.7 14.7,5.3 21.7,1.7l49.5-25.5
|
|
49.5,25.5c3,1.5 6.2,2.3 9.5,2.3 4.3,0 8.6-1.4 12.2-4 6.3-4.6 9.5-12.5 8.1-20.2l-9.4-53.4 39.7-37.9c5.9-5.5 8-13.8 5.6-21.3zm-81.6,36.9c-5,4.8-7.3,
|
|
11.7-6.1,18.5l4.1,23.3-22-11.3c-5.9-3-13-3-18.9,0l-22,11.3 4.1-23.3c1.2-6.8-1.1-13.7-6.1-18.5l-16.9-16.2 23.8-3.4c6.7-1 12.5-5.1 15.5-11.2l11-21.9
|
|
11,21.9c3,6 8.8,10.2 15.5,11.2l23.8,3.4-16.8,16.2z" />
|
|
<GeometryDrawing Brush="LightGray" Geometry="m442,361c-14.9,3.4-30.3,5.1-45.7,5.1-113.8,0-206.4-92.6-206.4-206.3 0-41.8 12.4-82 35.9-116.3
|
|
4.8-7 4.8-16.3 0-23.4-4.8-7.1-13.4-10.5-21.8-8.6-54,12.2-103,42.7-138,86-35.4,43.8-55,99.2-55,155.7 0,66.2 25.8,128.4 72.6,175.2 46.8,46.8
|
|
109.1,72.6 175.3,72.6 81.9,0 158.4-40.4 204.8-108.1 4.8-7 4.8-16.3 0-23.4-4.8-7-13.4-10.4-21.7-8.5zm-183.1,98.5c-113.8,0-206.4-92.6-206.4-206.3
|
|
0-78.2 45.3-149.1 112.8-183.8-11.2,28.6-17,59.1-17, 90.4 0,66.2 25.8,128.4 72.6,175.2 46.7,46.7 108.8,72.5 174.9,72.6-37.3,33.1-85.8,51.9-136.9,51.9z" />
|
|
</DrawingGroup>
|
|
</DrawingImage.Drawing>
|
|
</DrawingImage>
|
|
</Image.Source>
|
|
</Image>
|
|
<TextBlock Name="NightModeButton"
|
|
Padding="3"
|
|
/>
|
|
</StackPanel>
|
|
</RadioButton>
|
|
</StackPanel>
|
|
</Grid>
|
|
</UserControl>
|