更改运行方式,添加两种模式Debug和Release模式对在界面点击运行和在工具中运行进行区分

This commit is contained in:
liu.wenjie
2019-08-13 20:45:04 +08:00
parent a4993a95fa
commit e2de1d384f
124 changed files with 137 additions and 95 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ namespace HalconTool
{
}
myHalconTool.DispImage();
myHalconTool.Run(SoftwareRunState.Debug);
ParamsTrans();
}
+18 -28
View File
@@ -81,32 +81,16 @@ namespace HalconTool
/// 读取单张图像或批量读取文件夹图像工作模式
/// </summary>
internal WorkMode workMode = WorkMode.ReadMultImage;
public ToolRunStatu toolRunStatu { get; set; } = ToolRunStatu.Not_Run;
public ToolRunStatu toolRunStatu
{
get
{
throw new NotImplementedException();
}
public HObject inputImage { get; set; } = null;
set
{
throw new NotImplementedException();
}
}
public HObject inputImage
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
/// <summary>
/// 运行模式
/// </summary>
public SoftwareRunState softwareRunState { get; set; } = SoftwareRunState.Debug;
public bool ReadImage(out string filePath)
{
@@ -124,8 +108,9 @@ namespace HalconTool
return true;
}
public void Run()
public void Run(SoftwareRunState softwareState)
{
softwareRunState = softwareState;
DispImage();
}
@@ -149,13 +134,18 @@ namespace HalconTool
}
catch
{
FormHalconTool.Instance.txbLog.Text = "图像文件异常或路径不合法";
CommonMethods.CommonMethods.Delay(1000);
if(softwareRunState == SoftwareRunState.Debug)
{
FormHalconTool.Instance.txbLog.Text = "图像文件异常或路径不合法";
}
return;
}
if (outputImage != null)
{
FormHalconTool.Instance.myHwindow.HobjectToHimage(outputImage);
if (softwareRunState == SoftwareRunState.Debug)
{
FormHalconTool.Instance.myHwindow.HobjectToHimage(outputImage);
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.