1.新增图标

2.取消背景图
master
zhangxy 4 months ago
parent 2f23e79852
commit 950109260e

@ -262,6 +262,13 @@
<ItemGroup> <ItemGroup>
<Resource Include="海威图标-横.png" /> <Resource Include="海威图标-横.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="全屏.png" />
<Resource Include="关闭.png" />
<Resource Include="减号.png" />
<Resource Include="取消全屏.png" />
<Resource Include="海威图标-竖.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets" Condition="Exists('..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets')" /> <Import Project="..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets" Condition="Exists('..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

@ -8,7 +8,7 @@
xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options" xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
xmlns:local="clr-namespace:SocketExample" xmlns:local="clr-namespace:SocketExample"
mc:Ignorable="d" mc:Ignorable="d"
Title="RFID读写器多终端监控软件v1.07" Height="450" Width="800" Title="RFID读写器多终端监控软件v1.08" Height="680" Width="1180"
Background="Transparent" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterScreen"> Background="Transparent" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterScreen">
<Window.Resources> <Window.Resources>
@ -63,6 +63,7 @@
</LinearGradientBrush> </LinearGradientBrush>
</Border.Background> </Border.Background>
<Border CornerRadius="30"> <Border CornerRadius="30">
<!--
<Border.Background> <Border.Background>
<DrawingBrush Opacity="0.2" TileMode="Tile" Viewport="0,0,300,80" ViewportUnits="Absolute"> <DrawingBrush Opacity="0.2" TileMode="Tile" Viewport="0,0,300,80" ViewportUnits="Absolute">
<DrawingBrush.Transform> <DrawingBrush.Transform>
@ -72,22 +73,25 @@
<DrawingGroup> <DrawingGroup>
<GeometryDrawing Brush="Transparent"> <GeometryDrawing Brush="Transparent">
<GeometryDrawing.Geometry> <GeometryDrawing.Geometry>
<RectangleGeometry Rect="0,0,110,75"/> <RectangleGeometry Rect="30,70,300,300"/>
</GeometryDrawing.Geometry> </GeometryDrawing.Geometry>
</GeometryDrawing> </GeometryDrawing>
<ImageDrawing ImageSource="/海威图标-横.png" Rect="5,5,100,60"/> <ImageDrawing ImageSource="/海威图标-横.png" Rect="5,5,100,100"/>
</DrawingGroup> </DrawingGroup>
</DrawingBrush.Drawing> </DrawingBrush.Drawing>
</DrawingBrush> </DrawingBrush>
</Border.Background> </Border.Background>
-->
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="90"/> <RowDefinition Height="90"/>
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Border Grid.Row="0" CornerRadius="20" Background="{StaticResource PrimaryBrush}" Margin="10" Cursor=""> <Border Grid.Row="0" CornerRadius="20" Background="{StaticResource PrimaryBrush}" Margin="10">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="400"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
@ -97,15 +101,24 @@
<Button Content="生成" Click="GenerateButton_Click" Height="40" Width="50" Margin="10 0 0 0" Style="{StaticResource FlatButton}"/> <Button Content="生成" Click="GenerateButton_Click" Height="40" Width="50" Margin="10 0 0 0" Style="{StaticResource FlatButton}"/>
<Button Content="清空" Click="ClearButton_Click" Height="40" Width="50" Margin="10 0 0 0" Style="{StaticResource FlatButton}"/> <Button Content="清空" Click="ClearButton_Click" Height="40" Width="50" Margin="10 0 0 0" Style="{StaticResource FlatButton}"/>
</StackPanel> </StackPanel>
<Grid Grid.Column="1" HorizontalAlignment="Right" Margin="0 0 10 0" VerticalAlignment="Center"> <StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Vertical">
<TextBlock Text="RFID设备监控平台" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="25" FontWeight="SemiBold"/>
</StackPanel>
<Grid Grid.Column="2" HorizontalAlignment="Right" Margin="0 0 10 0" VerticalAlignment="Center">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button x:Name="Minimize_Button" Grid.Column="0" Content="最小化" Height="40" Width="50" Style="{StaticResource FlatButton}" Margin="0 0 16 0" Click="Minimize_Button_Click"/> <Button x:Name="Minimize_Button" Grid.Column="0" Height="40" Width="50" Style="{StaticResource FlatButton}" Margin="0 0 0 0" Click="Minimize_Button_Click">
<Button x:Name="Maxmize_Button" Grid.Column="1" Content="最大化" Height="40" Width="50" Style="{StaticResource FlatButton}" Margin="0 0 0 0" Click="Maxmize_Button_Click"/> <Image Source="/减号.png" />
<Button x:Name="Shutdown_Button" Grid.Column="2" Content="关闭" Height="40" Width="50" Style="{StaticResource FlatButton}" Click="Shutdown_Button_Click"/> </Button>
<Button x:Name="Maxmize_Button" Grid.Column="1" Height="40" Width="50" Style="{StaticResource FlatButton}" Margin="0 0 0 0" Click="Maxmize_Button_Click">
<Image x:Name="MaxMinImage" Source="/全屏.png"/>
</Button>
<Button x:Name="Shutdown_Button" Grid.Column="2" Height="40" Width="50" Style="{StaticResource FlatButton}" Click="Shutdown_Button_Click">
<Image Source="/关闭.png"/>
</Button>
</Grid> </Grid>
</Grid> </Grid>
</Border> </Border>
@ -191,7 +204,7 @@
</StackPanel> </StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal"> <StackPanel Grid.Row="1" Orientation="Horizontal">
<Label Content="标签:"/> <Label Content="标签:"/>
<TextBlock Text="{Binding EPCinfo}" FontSize="15" FontWeight="Bold" Foreground="Green" VerticalAlignment="Center"></TextBlock> <TextBlock Text="{Binding EPCinfo}" FontSize="15" FontWeight="Bold" Foreground="{Binding InfoColor}" VerticalAlignment="Center"></TextBlock>
</StackPanel> </StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal"> <StackPanel Grid.Row="2" Orientation="Horizontal">
<Label Content="HEX:"/> <Label Content="HEX:"/>
@ -225,7 +238,7 @@
<StackPanel Orientation="Horizontal" Margin="1 2 1 2"> <StackPanel Orientation="Horizontal" Margin="1 2 1 2">
<Label Content="触发动作:" FontWeight="Bold" FontSize="13"/> <Label Content="触发动作:" FontWeight="Bold" FontSize="13"/>
<TextBox Text="{Binding ActionType}" Width="70" TextAlignment="Center" VerticalContentAlignment="Center" FontSize="13"/> <TextBox Text="{Binding ActionType}" Width="70" TextAlignment="Center" VerticalContentAlignment="Center" FontSize="13"/>
<ComboBox x:Name="TextComboBox" Width="20" Height="20" ItemsSource="{Binding SendTextComboBox,Mode=TwoWay}"> <ComboBox x:Name="TextComboBox" Width="20" Height="25" ItemsSource="{Binding SendTextComboBox,Mode=TwoWay}">
<i:Interaction.Triggers> <i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged"> <i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction <i:InvokeCommandAction
@ -387,7 +400,7 @@
<Border BorderBrush="Black" BorderThickness="0.5"> <Border BorderBrush="Black" BorderThickness="0.5">
<Label Content="{Binding GPO1}"></Label> <Label Content="{Binding GPO1}"></Label>
</Border> </Border>
<ComboBox x:Name="GPO1ComboBox" Width="20" Height="20" ItemsSource="{Binding GPOComboBox,Mode=TwoWay}"> <ComboBox x:Name="GPO1ComboBox" Width="20" Height="25" ItemsSource="{Binding GPOComboBox,Mode=TwoWay}">
<i:Interaction.Triggers> <i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged"> <i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction <i:InvokeCommandAction
@ -402,7 +415,7 @@
<Border BorderBrush="Black" BorderThickness="0.5"> <Border BorderBrush="Black" BorderThickness="0.5">
<Label Content="{Binding GPO2}"></Label> <Label Content="{Binding GPO2}"></Label>
</Border> </Border>
<ComboBox x:Name="GPO2ComboBox" Width="20" Height="20" ItemsSource="{Binding GPOComboBox,Mode=TwoWay}"> <ComboBox x:Name="GPO2ComboBox" Width="20" Height="25" ItemsSource="{Binding GPOComboBox,Mode=TwoWay}">
<i:Interaction.Triggers> <i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged"> <i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction <i:InvokeCommandAction
@ -417,7 +430,7 @@
<Border BorderBrush="Black" BorderThickness="0.5"> <Border BorderBrush="Black" BorderThickness="0.5">
<Label Content="{Binding GPO3}"></Label> <Label Content="{Binding GPO3}"></Label>
</Border> </Border>
<ComboBox x:Name="GPO3ComboBox" Width="20" Height="20" ItemsSource="{Binding GPOComboBox,Mode=TwoWay}"> <ComboBox x:Name="GPO3ComboBox" Width="20" Height="25" ItemsSource="{Binding GPOComboBox,Mode=TwoWay}">
<i:Interaction.Triggers> <i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged"> <i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction <i:InvokeCommandAction
@ -432,7 +445,7 @@
<Border BorderBrush="Black" BorderThickness="0.5"> <Border BorderBrush="Black" BorderThickness="0.5">
<Label Content="{Binding GPO4}"></Label> <Label Content="{Binding GPO4}"></Label>
</Border> </Border>
<ComboBox x:Name="GPO4ComboBox" Width="20" Height="20" ItemsSource="{Binding GPOComboBox,Mode=TwoWay}"> <ComboBox x:Name="GPO4ComboBox" Width="20" Height="25" ItemsSource="{Binding GPOComboBox,Mode=TwoWay}">
<i:Interaction.Triggers> <i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged"> <i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction <i:InvokeCommandAction

@ -21,6 +21,7 @@ using System.Windows.Controls;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Markup; using System.Windows.Markup;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes; using System.Windows.Shapes;
using System.Xml; using System.Xml;
using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Command;
@ -1135,6 +1136,9 @@ namespace SocketExample
public string Countinfo { get => _countinfo; set { _countinfo = value; OnPropertyChanged(); } } public string Countinfo { get => _countinfo; set { _countinfo = value; OnPropertyChanged(); } }
private string _timeinfo;//当前时间 private string _timeinfo;//当前时间
public string Timeinfo { get => _timeinfo; set { _timeinfo = value; OnPropertyChanged(); } } public string Timeinfo { get => _timeinfo; set { _timeinfo = value; OnPropertyChanged(); } }
private string _infocolor;
public string InfoColor { get => _infocolor; set { _infocolor = value; OnPropertyChanged(); } }
private string _epcinfo;//EPC信息 private string _epcinfo;//EPC信息
private string _epcasc;//ASC2码 EPC信息 private string _epcasc;//ASC2码 EPC信息
public string EPCinfo { get => _epcinfo; set { _epcinfo = value; OnPropertyChanged(); } } public string EPCinfo { get => _epcinfo; set { _epcinfo = value; OnPropertyChanged(); } }
@ -1148,6 +1152,12 @@ namespace SocketExample
RSSIinfo = RSSI; RSSIinfo = RSSI;
Countinfo = count; Countinfo = count;
Timeinfo = time; Timeinfo = time;
if (infoEPC == "No Read")
{
InfoColor = "Red";
}
else
InfoColor = "Green";
} }
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
@ -1216,13 +1226,13 @@ namespace SocketExample
if (Buttonflag == 0) if (Buttonflag == 0)
{ {
this.WindowState = WindowState.Maximized; this.WindowState = WindowState.Maximized;
Maxmize_Button.Content = "缩小"; MaxMinImage.Source = new BitmapImage(new Uri(@"/取消全屏.png",UriKind.Relative));
Buttonflag = 1; Buttonflag = 1;
} }
else else
{ {
LoadWindowSettings(); LoadWindowSettings();
Maxmize_Button.Content = "最大化"; MaxMinImage.Source = new BitmapImage(new Uri(@"/全屏.png", UriKind.Relative));
Buttonflag = 0; Buttonflag = 0;
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Loading…
Cancel
Save