|
|
|
<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"
|
|
|
|
mc:Ignorable="d"
|
|
|
|
Title="海威物联RFID移动盘点系统" Height="766" Width="1268" ResizeMode="NoResize" Topmost="False">
|
|
|
|
<!--<Window.Background>
|
|
|
|
<ImageBrush ImageSource="/templates/image/background.jpg" />
|
|
|
|
</Window.Background>-->
|
|
|
|
<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.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"/>
|
|
|
|
|
|
|
|
<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"/>
|
|
|
|
</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>
|
|
|
|
<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.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" >
|
|
|
|
<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" >
|
|
|
|
<!--resourceStyle 399行修改选中字体颜色-->
|
|
|
|
<DataGrid.Columns>
|
|
|
|
<DataGridTextColumn Binding="{Binding no}" Header="stx" 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 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">
|
|
|
|
<ListBox x:Name="listBox" ItemsSource="{Binding LogInfoListBox}" FontSize="14" Foreground="Gray" Background="Transparent" BorderBrush="Transparent" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
|
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
</Window>
|
|
|
|
|