mirror of
https://github.com/eggplantlwj/VisionEdit.git
synced 2026-03-29 11:56:34 +08:00
更改运行方式,添加两种模式Debug和Release模式对在界面点击运行和在工具中运行进行区分
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user