From 27ec4a74d3ed9aa8ce1ee8e5d0955596c67cb996 Mon Sep 17 00:00:00 2001 From: wells.liu <wells.liu@broconcentric.com> Date: 星期一, 13 七月 2020 18:36:39 +0800 Subject: [PATCH] Excel追加 +设置样式做好了 --- src/Bro.Process/ProcessControl_Calibration.cs | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Bro.Process/ProcessControl_Calibration.cs b/src/Bro.Process/ProcessControl_Calibration.cs index dcd38a2..1d7a0e4 100644 --- a/src/Bro.Process/ProcessControl_Calibration.cs +++ b/src/Bro.Process/ProcessControl_Calibration.cs @@ -40,13 +40,13 @@ _frmCalibration_9P.ShowDialog(); }); - return (int)PLCReplyValue.NG; + return (int)ReplyValue.NG; } if (config.InputPara[0] <= 0 || config.InputPara[0] > config.Results.Count) { config.InputPara = null; - return (int)PLCReplyValue.IGNORE; + return (int)ReplyValue.IGNORE; } int sequence = config.InputPara[0]; @@ -100,14 +100,19 @@ //} config.InputPara = null; - return (int)PLCReplyValue.OK; + return (int)ReplyValue.OK; } public void GetCalibrationPoints(CameraBase camera, CalibrationConfig config, string methodName, int sequence) { //string imgSetId = ""; List<IShapeElement> pointList = new List<IShapeElement>(); - using (HObject hImage = CollectHImage(camera, config.CameraOpConfig, out string imgSetId)) + + IImageSet set = CollectHImage(camera, config.CameraOpConfig); + if (set == null) + return; + + using (HObject hImage = set.HImage) { var tool = GetHalconTool(config.CameraOpConfig); @@ -125,7 +130,7 @@ pointList.Add(new PointIndicator((float)xList[i], (float)yList[i])); } - camera.SaveFitImage(pointList, imgSetId); + camera.SaveFitImage(pointList, set.Id); } config.Results[sequence - 1].ImageMarkPoint = new CustomizedPoint((pointList[0] as PointIndicator).Center); -- Gitblit v1.8.0