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.

144 lines
9.6 KiB
XML

<UserControl x:Class="Aucma.Core.CodeBinding.Views.IndexPageView"
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:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
xmlns:local="clr-namespace:Aucma.Core.CodeBinding.Views"
mc:Ignorable="d"
d:DesignHeight="800"
d:DesignWidth="1000" >
<UserControl.Resources>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style x:Key="ColumnHeaderStyle" TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="Background" Value="#dddddd"/>
</Style>
</UserControl.Resources>
<Grid Margin="1 5 1 0" >
<Grid.RowDefinitions>
<RowDefinition Height="0.1*"/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<!--扫描信息-->
<Border Grid.Row="0" BorderThickness="1" BorderBrush="#0288d1" CornerRadius="4" Background="Transparent" Width="100" Height="30" VerticalAlignment="Top" HorizontalAlignment="Center">
<TextBlock Text="扫描信息" FontSize="20" FontWeight="Bold" Foreground="#0288d1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Background="Transparent" Margin="3,1,5,5">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="50 0 0 0 ">
<Label Content="MES条码 " FontSize="20" Foreground="#FFFFFF"/>
<TextBox TextWrapping="Wrap" Text="{Binding Code1}" Width="350" FontSize="20" Foreground="#FFFFFF"/>
<!--<Label Content="订单号 " FontSize="20" Foreground="#FFFFFF"/>
<TextBox TextWrapping="Wrap" Width="300" FontSize="20" Foreground="#FFFFFF"/>-->
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="50 0 0 0 ">
<Label Content="成品条码 " FontSize="20" Foreground="#FFFFFF"/>
<TextBox TextWrapping="Wrap" Text="{Binding Code2}" Width="350" FontSize="20" Foreground="#FFFFFF"/>
<!--<Label Content="型号 " FontSize="20" Foreground="#FFFFFF"/>
<TextBox TextWrapping="Wrap" Width="300" FontSize="20" Foreground="#FFFFFF"/>-->
</StackPanel>
<StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="50 0 0 0 ">
<Label Content="提示信息 " FontSize="20" Foreground="#FFFFFF"/>
<TextBox TextWrapping="Wrap" Text="{Binding BindingInfo}" Width="500" Height="150" FontSize="20" Foreground="#FFFFFF"/>
</StackPanel>
</Grid>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,5,5" >
<TextBlock Text="扫描型号统计" FontSize="15" FontWeight="Bold" Foreground="#0288d1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" >
<lvc:CartesianChart Series="{Binding ModelStatistics, UpdateSourceTrigger=PropertyChanged}" Margin="5" Foreground="White">
<lvc:CartesianChart.AxisX>
<lvc:Axis Labels="{Binding ProductionHourList}" FontSize="15">
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" StrokeThickness="1.5" StrokeDashArray="0" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis FontSize="15">
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisY>
</lvc:CartesianChart>
</Border>
</Grid>
</Grid>
</Border>
<!--扫描记录-->
<Border Grid.Row="2" Grid.ColumnSpan="2" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="3,1,3,5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderThickness="1" BorderBrush="#0288d1" CornerRadius="4" Background="Transparent" Width="100" Height="30" VerticalAlignment="Top" HorizontalAlignment="Center" >
<TextBlock Text="扫描纪录" FontSize="20" FontWeight="Bold" Foreground="#0288d1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<!--扫描纪录-->
<Border x:Name="ScanPanel" Grid.Row="1" Grid.Column="0" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="1,1,5,5">
<DataGrid Grid.Row="0" ItemsSource="{Binding ListItems}" Background="#00000000"
ColumnHeaderHeight="35"
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0" AlternationCount="2"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="White" >
<!-- 表头剧中-->
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center">
</Setter>
<Setter Property="Background" Value="Transparent" />
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</DataGrid.CellStyle>
<!--修改选中字体颜色-->
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding No}" Header="序号" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
<DataGridTextColumn Binding="{Binding BoxCode}" Header="MES条码" Width="4*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding ProductCode}" Header="成品条码" Width="4*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding BoxName}" Header="产品型号" Width="4*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding BindingResult}" Header="绑定结果" Width="2*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding IsPlcPass}" Header="plc下传结果" Width="2*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding RecordTime,StringFormat=\{0:yyyy-MM-dd HH:mm\}}" Header="记录时间" Width="4*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
</DataGrid.Columns>
</DataGrid>
</Border>
</Grid>
</Border>
</Grid>
</UserControl>