Commit 2980e5fa 张东亮

及时删除贴标图片

1 个父辈 5e620c53
......@@ -183,7 +183,7 @@ namespace OnlineStore.DeviceLibrary
try
{
List<CodeInfo> cc = new List<CodeInfo>();
// eyemNoCode = true;
// eyemNoCode = true;
RemoteDecodeHelper.RemoteDecodeParam remoteDecodeParam = new RemoteDecodeHelper.RemoteDecodeParam
{
......@@ -384,7 +384,7 @@ namespace OnlineStore.DeviceLibrary
if (!codeList.Contains(c))
{
codeList.Add(c);
// r = r + "##halcon|" + c.CodeType + "|" + c.CodeStr;
// r = r + "##halcon|" + c.CodeType + "|" + c.CodeStr;
LogUtil.info(" 【" + cameraName + "】[remote]" + c.CodeType + "(X: " + c.X + ",Y: " + c.Y + ") " + c.CodeStr);
//if (!findRightCode)
//{
......@@ -487,7 +487,22 @@ namespace OnlineStore.DeviceLibrary
}
return dire + iamgeName;
}
public static void DelImg(string deviceName, string imgPath)
{
try
{
if (File.Exists(imgPath))
{
File.Delete(imgPath);
LogUtil.info(deviceName + "删除图片【" + imgPath + "】成功");
}
}
catch (Exception ex)
{
LogUtil.error("删除" + deviceName + "图片【" + imgPath + "】出错" + ex.ToString());
}
}
private static int SaveErrorImageToFile = ConfigAppSettings.GetIntValue(Setting_Init.SaveErrorImageToFile);
//private static void SaveImageToFile(string deviceName, string cameraName, HalconDotNet.HObject bitmap)
......
......@@ -314,7 +314,6 @@ namespace OnlineStore.DeviceLibrary
BufferDataManager.BOutStoreInfo.Labeled = true;
}
MoveLog($"打标:{MoveInfo.MoveParam.PosInfo.barcode}标记为打标,计算的贴标旋转角度:{MoveInfo.MoveParam.PosInfo.relativeAngle}°");
SetWarnMsg();
BufferDataManager.LabelInfo = MoveInfo.MoveParam.PosInfo.ToCopy();
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
}
......@@ -329,9 +328,9 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(StepEnum.Label10_Finish);
//MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
SetWarnMsg();
Label_CylinderBack(MoveInfo);
MoveLog($"打标:标签被取走,流程结束");
CodeManager.DelImg(Name,MoveInfo?.MoveParam?.PosInfo?.LabelParam.BitmapFilename);
}
else if (MoveInfo.IsTimeOut())
{
......
......@@ -96,6 +96,7 @@ namespace OnlineStore.XLRStore
button3_Click(null, null);
}
LogUtil.info($"手动清除贴标缓存:{BufferDataManager.LabelInfo.ToStr()}");
CodeManager.DelImg(Name, BufferDataManager.LabelInfo?.LabelParam.BitmapFilename);
BufferDataManager.LabelInfo = null;
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!