C3032
2025-12-20 d0ded5cd9bf5070a120bad58b5be21fe2ac6a4ff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<Window x:Class="SmartScanner.ResultJudge"
        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:local="clr-namespace:SmartScanner"
        mc:Ignorable="d"
        Title="检测方案编辑" Height="600" Width="450">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="15*"/>
            <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>
 
        <TextBlock Grid.Row="0" Text="检测方案编辑器" FontSize="16" FontWeight="Bold" Margin="0,0,0,10"/>
 
        <ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
            <ItemsControl ItemsSource="{Binding JudgmentPoints}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Border BorderBrush="LightGray" BorderThickness="1" Margin="0,5" Padding="10">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
 
                                <TextBlock Grid.Column="0" Text="{Binding PointNumber}" 
                                           FontWeight="Bold" VerticalAlignment="Center" Margin="0,0,10,0"/>
 
                                <StackPanel Grid.Column="1">
                                    <StackPanel Orientation="Horizontal" Margin="0,0,0,5">
                                        <TextBlock Text="目标数量:" Width="80"/>
                                        <ComboBox ItemsSource="{Binding DataContext.TargetCountOptions, RelativeSource={RelativeSource AncestorType=Window}}"
                                                  SelectedItem="{Binding TargetCount}" Width="50"/>
                                    </StackPanel>
 
                                    <StackPanel Orientation="Horizontal" Margin="0,0,0,5">
                                        <TextBlock Text="得分阈值:" Width="80"/>
                                        <TextBox Text="{Binding ScoreThreshold}" Width="50"/>
                                    </StackPanel>
 
                                    <ItemsControl ItemsSource="{Binding TargetConditions}" Margin="10,0,0,0">
                                        <ItemsControl.ItemTemplate>
                                            <DataTemplate>
                                                <StackPanel Orientation="Horizontal" Margin="0,0,0,5">
                                                    <TextBlock Text="目标类型:" Width="80"/>
                                                    <ComboBox ItemsSource="{Binding DataContext.TargetTypeOptions, RelativeSource={RelativeSource AncestorType=Window}}"
                          SelectedItem="{Binding TargetType}" Width="50"/>
                                                </StackPanel>
                                            </DataTemplate>
                                        </ItemsControl.ItemTemplate>
                                    </ItemsControl>
                                </StackPanel>
                            </Grid>
                        </Border>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </ScrollViewer>
 
        <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,0">
            <Button x:Name="LoadConfig_RJ" Content="加载配置" Width="80" Margin="0,0,10,0" Command="{Binding LoadCommand}"/>
            <Button x:Name="SaveConfig_RJ" Content="保存配置" Width="80" Command="{Binding SaveCommand}"/>
        </StackPanel>
    </Grid>
</Window>