<UserControl x:Class="XHandler.View.BacteriaPickResult.BacteriaPickResult"
|
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"
|
xmlns:local="clr-namespace:XHandler.View.BacteriaPickResult"
|
mc:Ignorable="d"
|
d:DesignHeight="450" d:DesignWidth="1920"
|
xmlns:str="clr-namespace:XHandler.Properties"
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
xmlns:page="clr-namespace:XHandler.View.Page"
|
xmlns:ctrls="clr-namespace:XHandler.Controls" Loaded="UserControl_Loaded">
|
|
<UserControl.Resources>
|
<Style x:Key="rowStyle" TargetType="DataGridRow">
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
<Setter Property="Background" Value="White" />
|
<Setter Property="Height" Value="100"/>
|
<Setter Property="FontSize" Value="16" />
|
<Setter Property="Foreground" Value="Black" />
|
<Style.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Background" Value="{DynamicResource lightBlueBrush}"/>
|
<Setter Property="Foreground" Value="Black"/>
|
</Trigger>
|
</Style.Triggers>
|
</Style>
|
|
<Style x:Key="headerStyle" TargetType="DataGridColumnHeader">
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="DataGridColumnHeader">
|
<Grid Margin="{TemplateBinding Padding}">
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="Auto" />
|
</Grid.ColumnDefinitions>
|
|
<ContentPresenter />
|
<Thumb x:Name="PART_RightHeaderGripper" Grid.Column="1" HorizontalAlignment="Right" Width="0.8" BorderThickness="0.08"
|
BorderBrush="{Binding VerticalGridLinesBrush, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DataGrid}}}" Cursor="SizeWE"/>
|
</Grid>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<Style x:Key="dataGridHeaderStyle" TargetType="DataGridColumnHeader">
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
<Setter Property="MinWidth" Value="0" />
|
<Setter Property="MinHeight" Value="28" />
|
<Setter Property="Foreground" Value="#323433" />
|
<Setter Property="FontSize" Value="16" />
|
<Setter Property="Cursor" Value="Hand" />
|
<Setter Property="Height" Value="40"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="DataGridColumnHeader">
|
<Border x:Name="BackgroundBorder" BorderThickness="0.8,0.8,0.8,0.8" BorderBrush="LightGray" Width="Auto" Background="{DynamicResource lightGrayBrush}">
|
<Grid >
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="Auto" />
|
</Grid.ColumnDefinitions>
|
<ContentPresenter Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
<Thumb x:Name="PART_RightHeaderGripper" Grid.Column="1" HorizontalAlignment="Right" Width="0.8" BorderThickness="0.08"
|
BorderBrush="{Binding VerticalGridLinesBrush, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DataGrid}}}" Cursor="SizeWE"/>
|
</Grid>
|
</Border>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<Style TargetType="{x:Type Button}">
|
<Setter Property="Width" Value="22"/>
|
<Setter Property="Height" Value="22"/>
|
</Style>
|
</UserControl.Resources>
|
|
<Grid>
|
<Border Background="White" CornerRadius="0,10,10,0" Margin="0,0,10,0" >
|
<Grid Margin="20 10">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="50"/>
|
<RowDefinition Height="*"/>
|
</Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="*"/>
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Orientation="Horizontal" Grid.Row="0">
|
<!--#region 成像期间 -->
|
<TextBlock Text="成像期间" VerticalAlignment="Center" FontSize="16"/>
|
<ctrls:PromptTextBox x:Name="txtStart" Height="30" Width="90" FontSize="16" VerticalContentAlignment="Center" Background="{DynamicResource lightGrayBrush}"
|
BorderThickness="0" Text="" Margin="20 0 0 0" Watermark="{x:Static str:Resources.strBeginDate}"/>
|
|
<TextBox Height="30" Width="30" FontSize="16" VerticalContentAlignment="Center" Background="{DynamicResource lightGrayBrush}"
|
BorderThickness="0" Text=" - " Margin="0 0 0 0" IsReadOnly="True"/>
|
|
<ctrls:PromptTextBox x:Name="txtEnd" Height="30" Width="90" FontSize="16" VerticalContentAlignment="Center" Background="{DynamicResource lightGrayBrush}"
|
BorderThickness="0" Text="" Margin="0 0 0 0" Watermark="{x:Static str:Resources.strEndDate}"/>
|
<ctrls:ImageButton x:Name="btnDatePick" Width="30" Height="30" Click="btnDatePick_Click" BorderThickness="0" NormalImage="../../Assets/calendar.png">
|
</ctrls:ImageButton>
|
<!--#endregion-->
|
|
<!--#region 平皿码 -->
|
<TextBlock Text="{x:Static str:Resources.strDishBarcode}" VerticalAlignment="Center" Margin="30 0 0 0"
|
FontSize="16"/>
|
<TextBox Height="30" Width="150" x:Name="txtDishBarcode" FontSize="16" VerticalContentAlignment="Center" Background="{DynamicResource lightGrayBrush}"
|
BorderThickness="0" Text="{Binding bacteria_name, Mode=TwoWay}" Margin="20 0 0 0"/>
|
<!--#endregion-->
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal" Grid.Row="1">
|
<!--#region 识别方法 -->
|
<TextBlock Text="{x:Static str:Resources.strIdentification}" VerticalAlignment="Center" FontSize="16"/>
|
<ComboBox x:Name="comboxIdentification" Height="30" Width="80" BorderThickness="0" Background="{DynamicResource lightGrayBrush}" Margin="20 0 0 0"
|
DisplayMemberPath="dropdown_name" SelectedValuePath="dropdown_id" IsEditable="False"/>
|
<!--#endregion-->
|
|
<!--#region 批次号 -->
|
<TextBlock Text="{x:Static str:Resources.strRunProductID}" VerticalAlignment="Center" Margin="30 0 0 0"
|
FontSize="16"/>
|
<TextBox Height="30" Width="150" x:Name="txtRunProductId" FontSize="16" VerticalContentAlignment="Center" Background="{DynamicResource lightGrayBrush}"
|
BorderThickness="0" Text="" Margin="20 0 0 0"/>
|
<!--#endregion-->
|
|
<!--查询-->
|
<Button x:Name="btnSearch" Content="{x:Static str:Resources.strBtnSearch}" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="350 0 0 0" FontSize="16" Width="80" Height="30"
|
Foreground="White" Style="{DynamicResource BlueButtonStyle}" Background="{DynamicResource blueBrush}" Click="btnSearch_Click"/>
|
</StackPanel>
|
|
<page:PagerToolsControl Grid.Row="2" x:Name="pagerToolsControl_paging" VerticalAlignment="Top" Margin="15,20,0,0"
|
PageCntChanged="pagerToolsControl_paging_PageCntChanged" OnePageRowCntChanged="pagerToolsControl_paging_OnePageRowCntChanged" />
|
|
<!--#region 菌落挑选结果 -->
|
<ScrollViewer Grid.Row="3" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" CanContentScroll="True">
|
<DataGrid x:Name="dgResult" AutoGenerateColumns="False" BorderThickness="0" FontSize="16" RowHeaderWidth="0"
|
BorderBrush="LightGray" CanUserResizeColumns="True" CanUserResizeRows="False" Margin="20 20" Background="White"
|
CanUserSortColumns="False" CanUserReorderColumns="False" CanUserAddRows="False" ColumnHeaderStyle="{DynamicResource dataGridColumnHeaderStyle}"
|
GridLinesVisibility="None" IsReadOnly="True" RowStyle="{StaticResource dataGridRowStyle}" CellStyle="{StaticResource dataGridCellStyleDoubleClick}"
|
PreviewMouseDoubleClick="DataGridCell_PreviewMouseDoubleClick" Width="1700">
|
<DataGrid.Columns>
|
<!--编号-->
|
<DataGridTextColumn Width="80" Binding="{Binding indexNum}" Header="{x:Static str:Resources.strNo}" />
|
<!--批次号-->
|
<DataGridTextColumn Width="200" Binding="{Binding ExperimentId}" Header="{x:Static str:Resources.strRunProductID}" />
|
<!--#region 菌落图片 -->
|
<DataGridTemplateColumn Width="120" Header="{x:Static str:Resources.strBacteriaPic}" >
|
<DataGridTemplateColumn.CellTemplate>
|
<DataTemplate>
|
<Image Source="{Binding UpdateImagePath}" Margin="0 5"/>
|
</DataTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn>
|
<!--#endregion-->
|
<!--平皿码-->
|
<DataGridTextColumn Width="*" Binding="{Binding SourceBarcode}" Header="{x:Static str:Resources.strDishBarcode}" />
|
<!--成像时间-->
|
<DataGridTextColumn Width="200" Binding="{Binding TakePhotoTime,StringFormat='yyyy/MM/dd HH:mm:ss'}" Header="{x:Static str:Resources.strCaptureTime}" />
|
<!--识别方法-->
|
<DataGridTextColumn Width="*" Binding="{Binding IdentificationName,Converter={StaticResource autoManulaConvert}}" Header="{x:Static str:Resources.strIdentification}" />
|
<!--成像菌落数-->
|
<DataGridTextColumn Width="*" Binding="{Binding CountAutoAnalysis}" Header="{x:Static str:Resources.strIdentifyBacteriaCount}" />
|
<!--人工挑选菌落数-->
|
<DataGridTextColumn Width="*" Binding="{Binding CountManualChoice}" Header="{x:Static str:Resources.strManualPickBacteriaCount}" />
|
<!--人工删除菌落数-->
|
<DataGridTextColumn Width="*" Binding="{Binding CountManualDelete}" Header="{x:Static str:Resources.strManualDeleteBacteriaCount}" />
|
<!--涂布菌落数-->
|
<DataGridTextColumn Width="*" Binding="{Binding CountCoating}" Header="{x:Static str:Resources.strTotalBacteriaCount}" />
|
<!--操作人--><!--
|
<DataGridTextColumn Width="*" Binding="{Binding SourceImagePath}" Header="{x:Static str:Resources.strOperater}" />-->
|
<!--#region 操作 -->
|
<DataGridTemplateColumn Header="{x:Static str:Resources.strOperation}" Width="100" >
|
<DataGridTemplateColumn.CellTemplate>
|
<DataTemplate>
|
<StackPanel Orientation="Horizontal">
|
<!--挑选详情-->
|
<Button x:Name="btnPickDetail" Content="{x:Static str:Resources.strPickDetail}" Width="45" Height="25" Style="{DynamicResource LinkButton}"
|
Tag="{Binding RunChoiceBacteraId}" Foreground="{DynamicResource blueBrush}" Click="btnPickDetail_Click"/>
|
<!--涂布报告-->
|
<Button x:Name="btnCoatingReport" Content="{x:Static str:Resources.strCoatingReport}" Width="45" Height="25" Style="{DynamicResource LinkButton}"
|
Tag="{Binding RunChoiceBacteraId}" Foreground="{DynamicResource blueBrush}" Click="btnCoatingReport_Click"/>
|
</StackPanel>
|
</DataTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn>
|
<!--#endregion-->
|
</DataGrid.Columns>
|
|
</DataGrid>
|
</ScrollViewer>
|
<!--#endregion-->
|
|
<Calendar Grid.Row="1" Grid.RowSpan="3" x:Name="calendar" HorizontalAlignment="Left" Margin="120 10 0 0" SelectionMode="SingleRange"
|
SelectedDatesChanged ="calendar_SelectedDatesChanged" Visibility="Collapsed" VerticalAlignment="Top"/>
|
</Grid>
|
</Border>
|
</Grid>
|
</UserControl>
|