From c339e592f9232e460602093cb3248adf2484eebb Mon Sep 17 00:00:00 2001 From: wells.liu <wells.liu@broconcentric.com> Date: 星期一, 29 六月 2020 12:31:30 +0800 Subject: [PATCH] Merge branch 'master' of http://gitblit.broconcentric.com:8088/r/M071 --- src/Bro.Process/ProcessControl.cs | 29 +++++++++++++++++------------ 1 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/Bro.Process/ProcessControl.cs b/src/Bro.Process/ProcessControl.cs index 1c146c5..474d0c0 100644 --- a/src/Bro.Process/ProcessControl.cs +++ b/src/Bro.Process/ProcessControl.cs @@ -398,7 +398,7 @@ #endregion #region Halcon绠楀瓙璁剧疆 - private void InitialHalconTool() + protected virtual void InitialHalconTool() { foreach (HDevEngineTool tool in _halconToolDict.Values) { @@ -413,22 +413,27 @@ { toolPath.GetHalconToolPathList().ForEach(path => { - if (!string.IsNullOrWhiteSpace(path)) - { - string directoryPath = Path.GetDirectoryName(path); - string fileName = Path.GetFileNameWithoutExtension(path); - - HDevEngineTool tool = new HDevEngineTool(directoryPath); - tool.LoadProcedure(fileName); - - //浣跨敤鈥渱鈥濅綔涓洪棿闅旂 - _halconToolDict[monitorSet.Id + "|" + path] = tool; - } + LoadHalconTool(path, monitorSet.Id); }); } }); } + protected void LoadHalconTool(string algorithemPath, string prefix) + { + if (!string.IsNullOrWhiteSpace(algorithemPath)) + { + string directoryPath = Path.GetDirectoryName(algorithemPath); + string fileName = Path.GetFileNameWithoutExtension(algorithemPath); + + HDevEngineTool tool = new HDevEngineTool(directoryPath); + tool.LoadProcedure(fileName); + + //浣跨敤鈥渱鈥濅綔涓洪棿闅旂 + _halconToolDict[prefix + "|" + algorithemPath] = tool; + } + } + /// <summary> /// 鑾峰彇棰勫厛杞藉叆鐨凥alcon绠楁硶 /// </summary> -- Gitblit v1.8.0