public void ShowResult(HWndCtrl hWndCtrl, List <ToolBase> runToolList, bool runningResultFlag) { if (runningResultFlag == false) { hWndCtrl.ShowNg(); if (IniStatus.Instance.SaveNgImage == 1) { DateTime dt = DateTime.Now; string timeNow = dt.ToString("yyyy_MM_dd_HH_mm_ss_fff"); string project = Path.GetFileNameWithoutExtension(UserSetting.Instance.ProjectPath); string NGImagePath = "D:\\data\\" + project + "\\NgImage\\" + "\\工具组" + settingIndex + "\\"; SaveImage(NGImagePath + timeNow + ".png", runToolList[0].ImageTestOut); } } else { hWndCtrl.ShowOK(); if (IniStatus.Instance.SaveOkImage == 1) { DateTime dt = DateTime.Now; string timeNow = dt.ToString("yyyy_MM_dd_HH_mm_ss_fff"); string project = Path.GetFileNameWithoutExtension(UserSetting.Instance.ProjectPath); string NGImagePath = "D:\\data\\" + project + "\\OKImage\\" + "\\工具组" + settingIndex + "\\"; SaveImage(NGImagePath + timeNow + ".png", runToolList[0].ImageTestOut); } } HTuple showStart1; HOperatorSet.CountSeconds(out showStart1); hWndCtrl.ChangeGraphicSettings(Mode.LINESTYLE, new HTuple()); hWndCtrl.AddIconicVar(runToolList[0].ImageTestOut); foreach (ToolBase item in runToolList) { try { item.ShowResult(hWndCtrl); if (item.Message != null && item.Message.Length > 0) { Util.Notify(string.Format("工具{0}_{1}", item.Name, item.Message)); } } catch (Exception ex) { Util.Notify(string.Format("工具{0}显示异常", item.Name)); //("工具{0}显示异常{1}", item.Name,e.message)); Util.WriteLog(this.GetType(), ex); } } hWndCtrl.Repaint(); }