Commit bb5392ef 张东亮

仅使用扫码小程序

1 个父辈 26557779
...@@ -176,34 +176,46 @@ namespace OnlineStore.DeviceLibrary ...@@ -176,34 +176,46 @@ namespace OnlineStore.DeviceLibrary
{ {
LogUtil.error(deviceName + " RemoteDecodeHelper扫码出错:" + ex.ToString()); LogUtil.error(deviceName + " RemoteDecodeHelper扫码出错:" + ex.ToString());
} }
if (!findRightCode) //if (!findRightCode)
{ //{
Task eyemtask = Task.Factory.StartNew(delegate // Task eyemtask = Task.Factory.StartNew(delegate
{ // {
List<CodeInfo> tlci = EyemDecode.ModelDecoder(ref bmp); // try
foreach (CodeInfo code in tlci) // {
{ // List<CodeInfo> tlci = EyemDecode.ModelDecoder(ref bmp);
LogUtil.info(deviceName + " 【" + cameraName + "】[eyemDecode]" + code.CodeType + "(X: " + code.X + ",Y: " + code.Y + ") " + code.CodeStr); // foreach (CodeInfo code in tlci)
string str = CodeManager.ReplaceCode(code.CodeStr); // {
if (!codeList.Contains(str)) // LogUtil.info(deviceName + " 【" + cameraName + "】[eyemDecode]" + code.CodeType + "(X: " + code.X + ",Y: " + code.Y + ") " + code.CodeStr);
{ // string str = CodeManager.ReplaceCode(code.CodeStr);
codeList.Add(str); // if (!codeList.Contains(str))
r = r + "##eyem|" + code.CodeType + "|" + str; // {
if (!findRightCode) // codeList.Add(str);
{ // r = r + "##eyem|" + code.CodeType + "|" + str;
findRightCode = HasRightCode(str); // if (!findRightCode)
} // {
} // findRightCode = HasRightCode(str);
} // }
}); // }
//最多等待60秒 // }
bool taskResult = eyemtask.Wait(60000); // }catch(AccessViolationException ex)
if (!taskResult) // {
{ // LogUtil.error(deviceName + " 扫码出现AccessViolationException异常,关闭相机【" + cameraName + "】:" + ex.ToString());
LogUtil.error(deviceName + " 【" + cameraName + "】eyem扫码超时"); // Camera._cam.Close(cameraName);
eyemNoCode = true; // }
} // catch(Exception ex)
} // {
// LogUtil.error(deviceName + " 扫码出错:" + ex.ToString());
// }
// });
// //最多等待60秒
// bool taskResult = eyemtask.Wait(60000);
// if (!taskResult)
// {
// LogUtil.error(deviceName + " 【" + cameraName + "】eyem扫码超时");
// eyemNoCode = true;
// }
//}
//if (!findRightCode && SaveErrorImageToFile.Equals(1)) //if (!findRightCode && SaveErrorImageToFile.Equals(1))
if ((!findRightCode) || eyemNoCode) if ((!findRightCode) || eyemNoCode)
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!