Commit d6afcf61 刘韬

优化板卡加载失败的提示

修改载具条码逻辑
1 个父辈 459bc4ee
......@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore 3e118616c07f7b355f3a704f34346d4bf67708ee")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore 459bc4ee5f86ccae0d831b10a463616def194026")]
[assembly: AssemblyCopyright("Copyright ? 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
......
......@@ -106,7 +106,7 @@ namespace OnlineStore.DeviceLibrary
//初始化 //连接设备
if (!IOManager.instance.ConnectionIOList(Config.DIODeviceNameList))
{
//throw new Exception("伺服板卡加载失败");
SetWarnMsg(ResourceControl.CustAlarm,"EtherCat PCI Card Open Fail.");
}
......@@ -1641,23 +1641,31 @@ namespace OnlineStore.DeviceLibrary
private string ProcessCode(string[] codeList)
{
string message = "";
string codeSize = "";
List<string> codelists = new List<string>(codeList);
//= 7x12 = CODE
foreach (string str in codeList)
foreach (string str in codelists.ToArray())
{
string code = str;
//根据二维码开头获取固定尺寸
string codeSize = Config.GetCodeSize(str.Trim());
if (String.IsNullOrEmpty(codeSize))
{
//无固定尺寸,判断宽度是否是固定,如果不是固定,直接获取当前高度宽度
codeSize = GetSize() + "x" + GetHeight();
}
if (!String.IsNullOrEmpty(code))
codeSize = Config.GetCodeSize(str.Trim());
if (!String.IsNullOrEmpty(codeSize))
{
message = message + "=" + "1+0x0-" + codeSize + "=" + code + dlScanSocket.spiltStr;
LogUtil.info(Name + "夹具弃用条码【" + codeSize + "】:" + code);
codelists.Remove(code);
break;
//message = message + "=" + "1+0x0-" + codeSize + "=" + code + dlScanSocket.spiltStr;
}
}
if (String.IsNullOrEmpty(codeSize))
{
//无固定尺寸,判断宽度是否是固定,如果不是固定,直接获取当前高度宽度
codeSize = GetSize() + "x" + GetHeight();
}
foreach (string code in codelists.ToArray())
{
message = message + "=" + "1+0x0-" + codeSize + "=" + code + dlScanSocket.spiltStr;
}
return message;
}
#endregion
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!