1、优化LOG显示与引用

2、添加PMA工具,工具内容待完善
3、修复流程树显示
4、添加开源项目,优化UI空间
5、其他BUG更改
This commit is contained in:
liu.wenjie
2021-11-23 15:51:37 +08:00
parent 47f77f5e64
commit a24dda2525
474 changed files with 91916 additions and 6429 deletions

View File

@@ -15,6 +15,7 @@ using CommonMethods;
using CommonMethods.Interface;
using FormLib;
using HalconDotNet;
using Logger;
using System;
using System.Collections.Generic;
using System.Drawing;
@@ -38,29 +39,29 @@ namespace FindLineTool
if (L_toolList[toolIndex].GetInput(L_toolList[toolIndex].toolInput[j].IOName).value == null)
{
selectNode.ForeColor = Color.Red;
Logger.LoggerClass.WriteLog(L_toolList[toolIndex].toolName + " 无输入图像", Logger.MsgLevel.Exception);
LoggerClass.WriteLog(L_toolList[toolIndex].toolName + " 无输入图像", MsgLevel.Exception);
}
else
{
string sourceFrom = L_toolList[toolIndex].GetInput(L_toolList[toolIndex].toolInput[j].IOName).value.ToString();
if (L_toolList[toolIndex].toolInput[j].IOName == "InputImage")
{
string sourceToolName = Regex.Split(sourceFrom, " . ")[0];
sourceToolName = sourceToolName.Substring(3, Regex.Split(sourceFrom, " . ")[0].Length - 3);
string toolItem = Regex.Split(sourceFrom, " . ")[1];
string sourceToolName = Regex.Split(sourceFrom, "->")[0];
sourceToolName = sourceToolName.Substring(3, Regex.Split(sourceFrom, "->")[0].Length - 3);
string toolItem = Regex.Split(sourceFrom, "->")[1];
myFindLine.inputImage = myJob.GetToolInfoByToolName(sourceToolName).GetOutput(toolItem).value as HObject;
}
}
}
myFindLine.Run(SoftwareRunState.Release);
if (myFindLine.toolRunStatu == ToolRunStatu.Succeed)
if (myFindLine.toolRunStatu != ToolRunStatu.Succeed)
{
myFindLine.DispMainWindow(FormImageWindow.Instance.myHWindow);
myJob.FormLogDisp(L_toolList[toolIndex].toolName + " 运行成功", Color.Green, selectNode);
myJob.FormLogDisp($"{L_toolList[toolIndex].toolName} 运行失败,失败原因:{myFindLine.runMessage}", Color.Red, selectNode, Logger.MsgLevel.Exception);
}
else
{
myJob.FormLogDisp(L_toolList[toolIndex].toolName + " 运行失败", Color.Red, selectNode, Logger.MsgLevel.Exception);
myJob.FormLogDisp($"{L_toolList[toolIndex].toolName} 运行成功,{myFindLine.runTime}", Color.Green, selectNode);
myFindLine.DispMainWindow(FormImageWindow.Instance.myHWindow.DispHWindow);
}
}
}