<Window x:Class="MeterVision.Dlg.EditConfigDlg"
        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:MeterVision.Dlg"
        mc:Ignorable="d"
        xmlns:zdfflatui="clr-namespace:ZdfFlatUI;assembly=WPF.UI"
        Background="WhiteSmoke"
        ResizeMode="NoResize"
        WindowStartupLocation="CenterOwner"
        ShowInTaskbar="False"
        Title="基本参数设置" Height="300" Width="600">
    <Grid Margin="10 10 10 0">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="40" />
        </Grid.RowDefinitions>
        
        <Border BorderBrush="#D3D3D3" BorderThickness="1" Padding="0 0 0 0" Background="White"  Margin="0 0 0 0">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="40" />
                    <RowDefinition Height="10" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Border Grid.Row="0" Background="#E8F4FD" BorderBrush="#D3D3D3" BorderThickness="0 0 0 1" Padding="10">
                    <StackPanel>
                        <TextBlock Text="路径设置：" FontSize="15px" FontWeight="Bold" />
                    </StackPanel>
                </Border>

                <Grid Grid.Row="2" VerticalAlignment="Center">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="150" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="50" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="ONNX模型文件:" Foreground="#333333" FontSize="14px" 
                               Margin="0 0 20 0" HorizontalAlignment="Right" VerticalAlignment="Center" />
                    <ComboBox Grid.Column="1" Grid.ColumnSpan="1" x:Name="cmbOnnx" FontSize="13px" Foreground="#000000" 
                              SelectedValue="{Binding Path=mConfigItem.OnnxPath}" ItemsSource="{Binding Onnxs}"
                                      Margin="0,0,0,0" Padding="4" VerticalAlignment="Center"/>
                </Grid>

                <Grid Grid.Row="3" VerticalAlignment="Center">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="150" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="50" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="AI识别动态库:" Foreground="#333333" FontSize="14px" Margin="0 0 20 0" HorizontalAlignment="Right" VerticalAlignment="Center" />

                    <ComboBox Grid.Column="1" Grid.ColumnSpan="1" x:Name="cmbAiDll" FontSize="13px" Foreground="#000000" 
                                      SelectedValue="{Binding Path=mConfigItem.AiDll}" ItemsSource="{Binding AiDlls}"
                                      Margin="0,0,0,0" Padding="4" VerticalAlignment="Center"/>
                </Grid>

                <Grid Grid.Row="4" VerticalAlignment="Center">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="150" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="50" />
                    </Grid.ColumnDefinitions>
                    <!--<TextBlock Grid.Column="0" Text="AI目标图像路径:" Foreground="#333333" FontSize="14px" Margin="0 0 20 0" VerticalAlignment="Center" HorizontalAlignment="Right" />-->
                    <TextBlock Grid.Column="0" Text="识别数据输出路径:" Foreground="#333333" FontSize="14px" Margin="0 0 20 0" VerticalAlignment="Center" HorizontalAlignment="Right" />

                    <TextBox Grid.Column="1" Text="{Binding Path=mConfigItem.Output}" IsReadOnly="True"
                                     FontSize="13px" Margin="0 0 0 0" Padding="2"  VerticalAlignment="Center"/>

                    <zdfflatui:FlatButton Grid.Column="2" x:Name="btnDstImgPath" HorizontalAlignment="Center" BorderThickness="0"
                                                      Background="#0078D4" Foreground="White" Content="📂"
                                                  Click="BtnDstImgPath_Click" Margin="0 0 0 0" VerticalAlignment="Center"
                                                      Width="35" Height="30" FontSize="20px"  />
                </Grid>
            </Grid>
            
        </Border>

        <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
            <!--<Button x:Name="btnOK" Content="确定" Width="80" Height="26" FontSize="14px"
                    HorizontalAlignment="Center" Margin="0 0 20 0" Click="BtnOK_Click"/>-->
            <Button x:Name="btnClose" Content="关 闭" Width="80" Height="26" FontSize="14px"
                    VerticalAlignment="Center" HorizontalAlignment="Center" Click="BtnClose_Click"/>
        </StackPanel>

    </Grid>
</Window>
