You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
5.0 KiB
Plaintext

<UserControl x:Class="SlnMesnac.WPF.Page.History.HistoryControl"
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:SlnMesnac.WPF.Page.History"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="14*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#EBF4FD" BorderThickness="2" CornerRadius="10" Background="#EBF4FD" Margin="10,10">
<StackPanel Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Orientation="Horizontal">
<TextBlock Text="RFID" FontSize="18" Foreground="#31446E" Margin="10,3"/>
<TextBox Text="{Binding RfidCode}" FontSize="16" Grid.Row="1" Width="180" Height="30" VerticalContentAlignment="Center" HorizontalAlignment="Center" Padding="5">
<TextBox.Template>
<ControlTemplate TargetType="TextBox">
<Border Background="White" BorderBrush="White" BorderThickness="1" CornerRadius="5">
<ScrollViewer x:Name="PART_ContentHost" />
</Border>
</ControlTemplate>
</TextBox.Template>
</TextBox>
<TextBlock Text="扫描时间" FontSize="18" Foreground="#31446E" Margin="20,3,10,0"/>
<DatePicker x:Name="BeginTimeDatePicker" SelectedDate="{Binding BeginTime}" FontSize="14" Width="180" Height="30" VerticalContentAlignment="Center" HorizontalAlignment="Center" Padding="5" Margin="0,0,5,0"/>
<TextBlock Text="-" FontSize="18" Foreground="#31446E" Margin="10,3"/>
<DatePicker x:Name="EndTimeDatePicker" SelectedDate="{Binding EndTime}" FontSize="14" Width="180" Height="30" VerticalContentAlignment="Center" HorizontalAlignment="Center" Padding="5" Margin="0,0,5,0"/>
<Button Content="查 询" Command="{Binding QueryCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#5095F3" BorderBrush="#5095F3" Margin="10,0,10,0"/>
<Button Content="导 出" Command="{Binding ExportCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/>
</StackPanel>
</Border>
<Border Grid.Row="1" BorderBrush="#EBF4FD" BorderThickness="2" CornerRadius="10" Background="#EBF4FD" Margin="10,10">
<DataGrid Grid.Row="0" ItemsSource="{Binding ScanItems}" Background="Transparent"
FontSize="18" ColumnHeaderHeight="35"
RowHeight="40" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Hidden" BorderThickness="0" CanUserAddRows="False" HorizontalAlignment="Center"
Foreground="#31446E" x:Name="dataGrid" Margin="0,10,0,0" >
<!--resourceStyle 399行修改选中字体颜色-->
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding CreateTime ,StringFormat=\{0:yyyy-MM-dd HH:mm:ss\}}" Header="记录时间" Width="1.5*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding Rfid}" Header="RFID" Width="2*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding Code}" Header="ATR" Width="2*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding Ocr}" Header="OCR" Width="2*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding Result}" Header="最终结果" Width="2*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding IsOk}" Header="结果状态" Width="1*" IsReadOnly="True"/>
<DataGridTemplateColumn Header="操作" Width="1*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Content="查看图像" Command="{Binding DataContext.OpenImageFileCommand, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" CommandParameter="{Binding}" Style="{StaticResource BUTTON_AGREE}" FontSize="14" Width="80" Height="30" Background="#009999" BorderBrush="#FF36B5C1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Border>
</Grid>
</UserControl>