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.
233 lines
16 KiB
XML
233 lines
16 KiB
XML
<Window x:Class="SlnMesnac.RfidUpload.UI.MainWindow"
|
|
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:SlnMesnac.RfidUpload.UI"
|
|
xmlns:local1="clr-namespace:SlnMesnac.RfidUpload.UI.converter"
|
|
mc:Ignorable="d" d:DesignHeight="1080" d:DesignWidth="1920"
|
|
Title="海威物联RFID移动盘点系统" Height="766" Width="1268"
|
|
WindowState="Maximized" WindowStyle="SingleBorderWindow" >
|
|
<!--ResizeMode="NoResize" Topmost="False"-->
|
|
|
|
<Window.Resources>
|
|
|
|
|
|
<!-- 自定义按钮样式 -->
|
|
<Style x:Key="NoBorderButtonStyle" TargetType="Button">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}">
|
|
<ContentPresenter HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"/>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="IconButtonStyle" TargetType="Button">
|
|
<Setter Property="FontFamily" Value="pack://application:,,,/SlnMesnac;Fonts/#iconfont" />
|
|
<Setter Property="FontSize" Value="24" />
|
|
<Setter Property="Foreground" Value="Black" />
|
|
</Style>
|
|
|
|
<local1:WorkModelParamConverter x:Key="WorkModelParamConverter" />
|
|
</Window.Resources>
|
|
|
|
<Border Margin="5" Background="White" CornerRadius="10">
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="2*"/>
|
|
<RowDefinition Height="10*"/>
|
|
<RowDefinition Height="5*"/>
|
|
</Grid.RowDefinitions>
|
|
<Border Grid.Row="0" BorderThickness="2" CornerRadius="5" Background="White" Margin="5,0,5,0">
|
|
<Border.Effect>
|
|
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
|
|
</Border.Effect>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border Grid.Row="0">
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
|
|
<TextBlock Text="串口:" FontSize="16" FontWeight="Black" Foreground="#006699" Margin="10,5,10,0"/>
|
|
<ComboBox FontSize="16" ItemsSource="{Binding SerialPortItems}" SelectedItem="{Binding SelectedSerialPortItems}" Width="120" Height="30"/>
|
|
<TextBlock Text="波特率:" FontSize="16" FontWeight="Black" Foreground="#006699" Margin="10,5,10,0"/>
|
|
<ComboBox FontSize="16" ItemsSource="{Binding BaudRateItems}" SelectedItem="{Binding SelectedBaudRateItems}" Width="120" Height="30"/>
|
|
<TextBlock Text="数据位:" FontSize="16" FontWeight="Black" Foreground="#006699" Margin="10,5,10,0"/>
|
|
<ComboBox FontSize="16" ItemsSource="{Binding DataBitsItems}" SelectedItem="{Binding SelectedDataBitsItems}" Width="120" Height="30"/>
|
|
<TextBlock Text="停止位:" FontSize="16" FontWeight="Black" Foreground="#006699" Margin="10,5,10,0"/>
|
|
<ComboBox FontSize="16" ItemsSource="{Binding StopBitsItems}" SelectedItem="{Binding SelectedStopBitsItems}" Width="120" Height="30"/>
|
|
<TextBlock Text="校验位:" FontSize="16" FontWeight="Black" Foreground="#006699" Margin="10,5,10,0"/>
|
|
|
|
|
|
<ComboBox FontSize="16" ItemsSource="{Binding ParityItems}" SelectedItem="{Binding SelectedParityItems}" Width="120" Height="30" Margin="10,5,10,0"/>
|
|
|
|
<Button Style="{StaticResource NoBorderButtonStyle}" Width="25" Height="25" Command="{Binding systemSetCommand}" Margin="100,0,0,0">
|
|
<Image Source="Fonts/setPng.png" Stretch="Uniform" />
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
|
|
|
|
</Border>
|
|
|
|
<Border Grid.Row="1">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="3*"/>
|
|
<ColumnDefinition Width="2*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Orientation="Horizontal">
|
|
<Button Content="打开串口" Command="{Binding OpenSerialPortCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009900" BorderBrush="#009900" Margin="10,0,10,0" />
|
|
<Button Content="关闭串口" Command="{Binding CloseSerialPortCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#FF0033" BorderBrush="#FF0033" Margin="0,0,10,0"/>
|
|
<Button Content="导出文件" Command="{Binding ExportFilesCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#007DFA" BorderBrush="#007DFA" Margin="0,0,10,0"/>
|
|
<Button Content="清空列表" Command="{Binding EmptyFilesCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="Orange" BorderBrush="Orange" Margin="0,0,10,0"/>
|
|
<Button Content="完成" Command="{Binding FinishCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#007DFA" BorderBrush="#007DFA" Margin="10,0,10,0"/>
|
|
<Label Content="数 量 :" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="20,0,0,0"/>
|
|
<Label Content="{Binding LabelCountParam}" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="5,0,10,0"/>
|
|
|
|
<Label Content="调拨单号 :" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="20,0,0,0"/>
|
|
<Label Content="{Binding MainPageDbdh}" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="5,0,10,0"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Right" Orientation="Horizontal">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0" VerticalAlignment="Center">
|
|
<TextBlock Text="串口连接状态" FontSize="20" FontWeight="Black" Foreground="#006699" Margin="2,0,10,0"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="1" Margin="0,0,20,0">
|
|
<Ellipse Width="30" Height="30">
|
|
<Ellipse.Style>
|
|
<Style TargetType="Ellipse">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding RfidDeviceStatus}" Value="0">
|
|
<Setter Property="Shape.Fill" Value="Orange"/>
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding RfidDeviceStatus}" Value="1">
|
|
<Setter Property="Shape.Fill" Value="Green"/>
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding RfidDeviceStatus}" Value="2">
|
|
<Setter Property="Shape.Fill" Value="Red"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Ellipse.Style>
|
|
</Ellipse>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
|
<Border Grid.Row="1" BorderThickness="2" CornerRadius="5" Background="White" Margin="5">
|
|
<Border.Effect>
|
|
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
|
|
</Border.Effect>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="159*"/>
|
|
<ColumnDefinition Width="152*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="2*"/>
|
|
<RowDefinition Height="15*"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
<Border Grid.Row="0" BorderBrush="CadetBlue" BorderThickness="0,0,0,0" CornerRadius="0" Background="Transparent" Margin="1,1,5,5" Grid.ColumnSpan="2" >
|
|
<TextBlock Text="标签信息" FontSize="17" FontWeight="Bold" Foreground="#0288d1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|
</Border>
|
|
|
|
<!--日志信息-->
|
|
<DataGrid Grid.Row="1" Name="DG" ItemsSource="{Binding LabelInfoDataGrid}" Background="Transparent"
|
|
FontSize="15" ColumnHeaderHeight="35"
|
|
RowHeight="31" AutoGenerateColumns="False" RowHeaderWidth="0"
|
|
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
|
|
ScrollViewer.VerticalScrollBarVisibility="Hidden" BorderThickness="0" CanUserAddRows="False"
|
|
Foreground="#0288d1" Grid.ColumnSpan="2" >
|
|
<!--resourceStyle 399行修改选中字体颜色-->
|
|
<DataGrid.Columns>
|
|
<!--<DataGridTextColumn Binding="{Binding no}" Header="no" Width="80" IsReadOnly="True"/>
|
|
<DataGridTextColumn Binding="{Binding stx}" Header="stx" Width="80" IsReadOnly="True"/>
|
|
<DataGridTextColumn Binding="{Binding len}" Header="len" Width="150" IsReadOnly="True"/>
|
|
<DataGridTextColumn Binding="{Binding cmd}" Header="cmd" Width="150" IsReadOnly="True"/>
|
|
<DataGridTextColumn Binding="{Binding status}" Header="status" Width="150" IsReadOnly="True"/>
|
|
<DataGridTextColumn Binding="{Binding data}" Header="data" Width="290" IsReadOnly="True"/>
|
|
<DataGridTextColumn Binding="{Binding xor}" Header="xor" Width="150" IsReadOnly="True"/>-->
|
|
<DataGridTextColumn Binding="{Binding no}" Header="序号" Width="80" IsReadOnly="True"/>
|
|
<DataGridTextColumn Binding="{Binding dbdh}" Header="调拨单号" Width="*" IsReadOnly="True"/>
|
|
<DataGridTextColumn Binding="{Binding result}" Header="结果" Width="*" IsReadOnly="True"/>
|
|
<DataGridTextColumn Binding="{Binding recordtime,StringFormat=\{0:MM月dd日 HH:mm.ss.ffff\}}" Header="时间" Width="230" IsReadOnly="True"/>
|
|
<!--<DataGridTextColumn Binding="{Binding recordTime,StringFormat=\{0:MM月dd日 HH:mm\}}" Header="时间" Width="150" IsReadOnly="True"/>-->
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!--日志信息-->
|
|
<Border Grid.Row="2" BorderThickness="2" CornerRadius="5" Background="White" Margin="5,0,5,0">
|
|
<Border.Effect>
|
|
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
|
|
</Border.Effect>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="2.5*"/>
|
|
<RowDefinition Height="9*"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
<Border Grid.Row="0" BorderBrush="CadetBlue" BorderThickness="0,0,0,0" CornerRadius="0" Background="Transparent" Margin="1,1,5,5" >
|
|
<TextBlock Text="设备监控" FontSize="17" FontWeight="Bold" Foreground="#0288d1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|
</Border>
|
|
|
|
<!--日志信息-->
|
|
<Border Grid.Row="1" BorderBrush="Green" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="1">
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="6*"/>
|
|
<RowDefinition Height="3*"/>
|
|
</Grid.RowDefinitions>
|
|
<Border Grid.Row="0" BorderBrush="Green" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="1">
|
|
<ListBox Grid.Row="0" x:Name="listBox" ItemsSource="{Binding LogInfoListBox}" FontSize="14" Foreground="Gray" Background="Transparent" BorderBrush="Transparent" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
|
|
</Border>
|
|
|
|
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center">
|
|
<Button Content="新容器入库" Command="{Binding SetWorkModelCommand}" CommandParameter="1" Style="{StaticResource BUTTON_AGREE}" Width="120" Height="30" Background="Orange" BorderBrush="Orange" Margin="10,0,10,0"/>
|
|
<Button Content="容器封发-按调拨单" Command="{Binding SetWorkModelCommand}" CommandParameter="2" Style="{StaticResource BUTTON_AGREE}" Width="120" Height="30" Background="#8771DC" BorderBrush="#8771DC" Margin="0,0,10,0"/>
|
|
<Button Content="库存容器封发配发" Command="{Binding SetWorkModelCommand}" CommandParameter="3" Style="{StaticResource BUTTON_AGREE}" Width="120" Height="30" Background="#52ACBD" BorderBrush="#52ACBD" Margin="0,0,10,0"/>
|
|
<Button Content="卸车容器封发配发" Command="{Binding SetWorkModelCommand}" CommandParameter="4" Style="{StaticResource BUTTON_AGREE}" Width="120" Height="30" Background="#007DFA" BorderBrush="#007DFA" Margin="0,0,10,0"/>
|
|
<Button Content="关 闭" Command="{Binding SetWorkModelCommand}" CommandParameter="5" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#FF0033" BorderBrush="#FF0033" Margin="0,0,10,0"/>
|
|
|
|
<Label Content="工作模式 :" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="20,0,0,0"/>
|
|
<Label Content="{Binding WorkModelParam, Converter={StaticResource WorkModelParamConverter}}" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="5,0,10,0"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
</Window>
|
|
|