|
|
|
@ -87,25 +87,27 @@ namespace SlnMesnac.WPF.ViewModel.Index
|
|
|
|
|
[RelayCommand]
|
|
|
|
|
private void ReadEpcCode(string deviceCode)
|
|
|
|
|
{
|
|
|
|
|
string configKey = string.Empty;
|
|
|
|
|
if (deviceCode == "050-B" || deviceCode == "I68")
|
|
|
|
|
{
|
|
|
|
|
configKey = "I68";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
configKey = deviceCode;
|
|
|
|
|
}
|
|
|
|
|
var rfidConfig = _appConfig.rfidConfig.Where(x => x.equipKey == configKey).FirstOrDefault();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
string configKey = string.Empty;
|
|
|
|
|
if (deviceCode == "050-B" || deviceCode == "I68")
|
|
|
|
|
{
|
|
|
|
|
configKey = "I68";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
configKey = deviceCode;
|
|
|
|
|
}
|
|
|
|
|
var rfidConfig = _appConfig.rfidConfig.Where(x => x.equipKey == configKey).FirstOrDefault();
|
|
|
|
|
|
|
|
|
|
if (rfidConfig != null)
|
|
|
|
|
{
|
|
|
|
|
var session = rfidConfig.session as TcpClient;
|
|
|
|
|
|
|
|
|
|
if (session != null)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
session.Connect();
|
|
|
|
|
|
|
|
|
|
var waitClinet = session.CreateWaitingClient(new WaitingOptions()
|
|
|
|
|
{
|
|
|
|
|
FilterFunc = response =>
|
|
|
|
@ -172,30 +174,37 @@ namespace SlnMesnac.WPF.ViewModel.Index
|
|
|
|
|
NotifiactionType = EnumPromptType.Error
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
finally
|
|
|
|
|
{
|
|
|
|
|
var session = rfidConfig.session as TcpClient;
|
|
|
|
|
|
|
|
|
|
session.Close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[RelayCommand]
|
|
|
|
|
private void WriteEpcCode(string deviceCode)
|
|
|
|
|
{
|
|
|
|
|
string configKey = string.Empty;
|
|
|
|
|
if (deviceCode == "050-B" || deviceCode == "I68")
|
|
|
|
|
{
|
|
|
|
|
configKey = "I68";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
configKey = deviceCode;
|
|
|
|
|
}
|
|
|
|
|
var rfidConfig = _appConfig.rfidConfig.Where(x => x.equipKey == configKey).FirstOrDefault();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
string configKey = string.Empty;
|
|
|
|
|
if (deviceCode == "050-B" || deviceCode == "I68")
|
|
|
|
|
{
|
|
|
|
|
configKey = "I68";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
configKey = deviceCode;
|
|
|
|
|
}
|
|
|
|
|
var rfidConfig = _appConfig.rfidConfig.Where(x => x.equipKey == configKey).FirstOrDefault();
|
|
|
|
|
|
|
|
|
|
if (rfidConfig != null)
|
|
|
|
|
{
|
|
|
|
|
var session = rfidConfig.session as TcpClient;
|
|
|
|
|
|
|
|
|
|
if (session != null)
|
|
|
|
|
{
|
|
|
|
|
session.Connect();
|
|
|
|
|
|
|
|
|
|
var waitClinet = session.CreateWaitingClient(new WaitingOptions()
|
|
|
|
|
{
|
|
|
|
|
FilterFunc = response =>
|
|
|
|
@ -304,6 +313,12 @@ namespace SlnMesnac.WPF.ViewModel.Index
|
|
|
|
|
NotifiactionType = EnumPromptType.Error
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
finally
|
|
|
|
|
{
|
|
|
|
|
var session = rfidConfig.session as TcpClient;
|
|
|
|
|
|
|
|
|
|
session.Close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[RelayCommand]
|
|
|
|
|