add -引入高频读写器静态文件

main
frankiecao 1 year ago
commit 2caede0485

@ -1,4 +1,5 @@
using SlnMesnac.Plc;
using SlnMesnac.Common;
using SlnMesnac.Plc;
using SlnMesnac.Rfid;
using System;
using System.Collections.Generic;
@ -35,10 +36,16 @@ namespace SlnMesnac.Business.@base
private readonly List<RfidAbsractFactory> _rfidFactories;
public BaseBusiness(List<PlcAbsractFactory> plcFactories, List<RfidAbsractFactory> rfidFactories)
private readonly StringChange stringChange;
private readonly HIDMode hIDMode;
public BaseBusiness(List<PlcAbsractFactory> plcFactories, List<RfidAbsractFactory> rfidFactories, StringChange stringChanges, HIDMode hIDModes)
{
_plcFactories = plcFactories;
_rfidFactories = rfidFactories;
stringChange = stringChanges;
hIDMode = hIDModes;
}
/// <summary>

@ -0,0 +1,56 @@
using HighRFIDSendCardDemo;
using System;
using System.Collections.Generic;
using System.Text;
namespace SlnMesnac.Common
{
public class HIDMode
{
DeviceClass deviceClass = new DeviceClass();
public HIDMode()
{
deviceClass.isConnectedFunc = ConnectStart;
deviceClass.pushTagData = GetTag;
}
public void ConnectStart(bool Start)
{
if (Start)
{
//button1.Text = "DisConnect";
}
else
{
//button1.Text = "Monitor";
}
}
private void GetTag(Tag tag)
{
//this.Invoke(new Action(() => {
// int flag = 0;
// foreach (ListViewItem viewitem in listView1.Items)
// {
// if (viewitem.SubItems[1].Text == tag.UID)
// {
// viewitem.SubItems[2].Text = (int.Parse(viewitem.SubItems[2].Text) + 1).ToString();
// viewitem.SubItems[3].Text = System.DateTime.Now.ToString();
// flag = 1;
// }
// }
// if (flag == 0)
// {
// System.Windows.Forms.ListViewItem EPCitem = new System.Windows.Forms.ListViewItem((listView1.Items.Count + 1).ToString());
// EPCitem.SubItems.Add(tag.UID);
// EPCitem.SubItems.Add("1");
// DateTime TimeNow_temp = System.DateTime.Now;
// string TimeNow_str = TimeNow_temp.ToString();
// EPCitem.SubItems.Add(TimeNow_str);
// listView1.Items.Add(EPCitem);
// }
//}));
}
}
}

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
@ -10,4 +10,10 @@
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="HighRFIDSendCardDLL">
<HintPath>C:\Users\Administrator\Desktop\信明橡塑\Tool For HID Mode_V1.0.0\Tool For HID Mode_V1.0.0\HighRFIDSendCardDLL.dll</HintPath>
</Reference>
</ItemGroup>
</Project>

@ -7,6 +7,11 @@
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
</Grid>
</UserControl>

@ -36,7 +36,7 @@
<!--<Setter Property="Background" Value="#dddddd"/>
<Setter Property="Foreground" Value="Black"/>-->
<!--<Setter Property="BorderThickness" Value="1" />-->
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="BorderBrush" Value="#4285DE" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="15"/>
@ -139,6 +139,7 @@
Foreground="#FFFFFF" SelectedItem="{Binding SelectedDataItem}">
<!--resourceStyle 399行修改选中字体颜色-->
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding baggageTagCode}" Header="序号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding baggageTagCode}" Header="ERP订单编号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding baggageTagCode}" Header="工单编号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<!--<DataGridTextColumn Binding="{Binding date,StringFormat=\{0:yyyy-MM-dd\}}" Header="工单编号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
@ -222,6 +223,104 @@
<Border Grid.Row="2">
<TextBlock Text="工单明细" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="3">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0" Grid.Column="0">
<TextBlock Text="计划数量" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="0" Grid.Column="1" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="0" Grid.Column="2">
<TextBlock Text="实际数量" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="0" Grid.Column="3" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="1" Grid.Column="0">
<TextBlock Text="实际开始时间" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" Grid.Column="1" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="1" Grid.Column="2">
<TextBlock Text="实际完成时间" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" Grid.Column="3" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="2" Grid.Column="0">
<TextBlock Text="当前班组班长" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="2" Grid.Column="1" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="2" Grid.Column="2">
<TextBlock Text="下一班组班长" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="2" Grid.Column="3" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="3" Grid.Column="0">
<TextBlock Text="创建人" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="3" Grid.Column="1" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="3" Grid.Column="2">
<TextBlock Text="创建时间" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="3" Grid.Column="3" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="4" Grid.Column="0">
<TextBlock Text="更新人" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="4" Grid.Column="1" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="4" Grid.Column="2">
<TextBlock Text="更新时间" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="4" Grid.Column="3" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
</Grid>
</Border>
</Grid>
</Border>
</Grid>

@ -2,6 +2,7 @@
using GalaSoft.MvvmLight.Command;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using SlnMesnac.Common;
using SlnMesnac.WPF.Page;
using SlnMesnac.WPF.Page.Generate;
using System;
@ -85,6 +86,8 @@ namespace SlnMesnac.WPF.ViewModel
UserContent = _executePage;
_logger = App.ServiceProvider.GetService<ILogger<MainWindowViewModel>>();
var info = App.ServiceProvider.GetService<StringChange>();
ControlOnClickCommand = new RelayCommand<object>(obj => ControlOnClick(obj));
FormControlCommand = new RelayCommand<object>(x => FormControl(x));

Loading…
Cancel
Save