Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
efcf79ea0d | |||
7011e4f353 | |||
6696c4e106 |
@ -110,7 +110,7 @@ namespace CanFly.Canvas.Shape
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否填充多边形。使用:select_fill_color 或 fill_color 填充。
|
/// 是否填充多边形 使用:select_fill_color 或 fill_color 填充
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool fill = false;
|
public bool fill = false;
|
||||||
|
|
||||||
|
8
CanFly.Canvas/UI/FlyCanvas.Designer.cs
generated
8
CanFly.Canvas/UI/FlyCanvas.Designer.cs
generated
@ -3,14 +3,14 @@
|
|||||||
partial class FlyCanvas
|
partial class FlyCanvas
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
///// 清理所有正在使用的资源。
|
///// 清理所有正在使用的资源
|
||||||
///// </summary>
|
///// </summary>
|
||||||
///// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
///// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
//protected override void Dispose(bool disposing)
|
//protected override void Dispose(bool disposing)
|
||||||
//{
|
//{
|
||||||
// if (disposing && (components != null))
|
// if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
@ -1704,9 +1704,9 @@ namespace CanFly.Canvas.UI
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
|
16
CanFly/Properties/Resources.Designer.cs
generated
16
CanFly/Properties/Resources.Designer.cs
generated
@ -1,10 +1,10 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// 此代码由工具生成。
|
// 此代码由工具生成
|
||||||
// 运行时版本:4.0.30319.42000
|
// 运行时版本:4.0.30319.42000
|
||||||
//
|
//
|
||||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
// 重新生成代码,这些更改将会丢失。
|
// 重新生成代码,这些更改将会丢失
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -13,12 +13,12 @@ namespace XKRS.CanFly.Properties {
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
/// 一个强类型的资源类,用于查找本地化的字符串等
|
||||||
/// </summary>
|
/// </summary>
|
||||||
// 此类是由 StronglyTypedResourceBuilder
|
// 此类是由 StronglyTypedResourceBuilder
|
||||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的
|
||||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
// (以 /str 作为命令选项),或重新生成 VS 项目
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
@ -33,7 +33,7 @@ namespace XKRS.CanFly.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
/// 返回此类使用的缓存的 ResourceManager 实例
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
@ -48,7 +48,7 @@ namespace XKRS.CanFly.Properties {
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
/// 使用此强类型资源类的所有资源查找执行重写
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Globalization.CultureInfo Culture {
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
@ -61,7 +61,7 @@ namespace XKRS.CanFly.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
/// 查找 System.Drawing.Bitmap 类型的本地化资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap Close {
|
internal static System.Drawing.Bitmap Close {
|
||||||
get {
|
get {
|
||||||
|
8
CanFly/UI/GuidePanel/CtrlTitleBar.Designer.cs
generated
8
CanFly/UI/GuidePanel/CtrlTitleBar.Designer.cs
generated
@ -3,14 +3,14 @@
|
|||||||
partial class CtrlTitleBar
|
partial class CtrlTitleBar
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
8
CanFly/UI/GuidePanel/GuideCircleCtrl.Designer.cs
generated
8
CanFly/UI/GuidePanel/GuideCircleCtrl.Designer.cs
generated
@ -3,14 +3,14 @@
|
|||||||
partial class GuideCircleCtrl
|
partial class GuideCircleCtrl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
8
CanFly/UI/GuidePanel/GuideHeightCtrl.Designer.cs
generated
8
CanFly/UI/GuidePanel/GuideHeightCtrl.Designer.cs
generated
@ -3,14 +3,14 @@
|
|||||||
partial class GuideHeightCtrl
|
partial class GuideHeightCtrl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
partial class GuideLineCircleCtrl
|
partial class GuideLineCircleCtrl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
8
CanFly/UI/GuidePanel/GuideLineCtrl.Designer.cs
generated
8
CanFly/UI/GuidePanel/GuideLineCtrl.Designer.cs
generated
@ -3,14 +3,14 @@
|
|||||||
partial class GuideLineCtrl
|
partial class GuideLineCtrl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
@ -6,6 +6,8 @@ using System.Text.RegularExpressions;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Drawing.Design;
|
using System.Drawing.Design;
|
||||||
using AntdUI;
|
using AntdUI;
|
||||||
|
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using static DH.Commons.Enums.EnumHelper;
|
using static DH.Commons.Enums.EnumHelper;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
using DH.Commons.Enums;
|
using DH.Commons.Enums;
|
||||||
@ -282,6 +284,7 @@ namespace DH.Commons.Base
|
|||||||
[Category("关联相机")]
|
[Category("关联相机")]
|
||||||
[DisplayName("相机源ID")]
|
[DisplayName("相机源ID")]
|
||||||
[Description("关联相机的唯一标识符")]
|
[Description("关联相机的唯一标识符")]
|
||||||
|
[JsonPropertyName("camera_sourceId")]
|
||||||
//[TypeConverter(typeof(CollectionCountConvert))]
|
//[TypeConverter(typeof(CollectionCountConvert))]
|
||||||
public string CameraSourceId
|
public string CameraSourceId
|
||||||
{
|
{
|
||||||
@ -616,6 +619,13 @@ namespace DH.Commons.Base
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Category("启用配置")]
|
[Category("启用配置")]
|
||||||
|
[DisplayName("是否启用预处理")]
|
||||||
|
[JsonPropertyName("is_PreEnabled")]
|
||||||
|
public bool IsPreEnabled { get; set; }
|
||||||
|
// public bool IsAddStation { get; set; } = true;
|
||||||
|
|
||||||
|
private bool _isAddStation;
|
||||||
|
[Category("启用配置")]
|
||||||
[DisplayName("是否加入检测工位")]
|
[DisplayName("是否加入检测工位")]
|
||||||
[Description("是否加入检测工位")]
|
[Description("是否加入检测工位")]
|
||||||
public bool IsAddStation
|
public bool IsAddStation
|
||||||
@ -901,6 +911,7 @@ namespace DH.Commons.Base
|
|||||||
ModelPath = modelPath ?? string.Empty;
|
ModelPath = modelPath ?? string.Empty;
|
||||||
Name = name;
|
Name = name;
|
||||||
ModelType = modelType;
|
ModelType = modelType;
|
||||||
|
ModelPath = modelPath ?? string.Empty;
|
||||||
IsEnableGPU = isEnableGPU;
|
IsEnableGPU = isEnableGPU;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -916,6 +927,7 @@ namespace DH.Commons.Base
|
|||||||
|
|
||||||
|
|
||||||
private bool _selected = false;
|
private bool _selected = false;
|
||||||
|
|
||||||
public bool Selected
|
public bool Selected
|
||||||
{
|
{
|
||||||
get { return _selected; }
|
get { return _selected; }
|
||||||
@ -926,6 +938,7 @@ namespace DH.Commons.Base
|
|||||||
OnPropertyChanged(nameof(Selected));
|
OnPropertyChanged(nameof(Selected));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[JsonPropertyName("name")]
|
||||||
private string _name;
|
private string _name;
|
||||||
public string Name
|
public string Name
|
||||||
{
|
{
|
||||||
@ -940,6 +953,7 @@ namespace DH.Commons.Base
|
|||||||
|
|
||||||
|
|
||||||
private string _value;
|
private string _value;
|
||||||
|
[JsonPropertyName("value")]
|
||||||
public string Value
|
public string Value
|
||||||
{
|
{
|
||||||
get { return _value; }
|
get { return _value; }
|
||||||
@ -955,7 +969,9 @@ namespace DH.Commons.Base
|
|||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public CellLink[] CellLinks
|
public CellLink[] CellLinks
|
||||||
{
|
{
|
||||||
get { return cellLinks; }
|
get {
|
||||||
|
|
||||||
|
return cellLinks; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (cellLinks == value) return;
|
if (cellLinks == value) return;
|
||||||
@ -995,7 +1011,7 @@ namespace DH.Commons.Base
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[JsonPropertyName("labelId")]
|
||||||
public string LabelId
|
public string LabelId
|
||||||
{
|
{
|
||||||
get { return _labelId; }
|
get { return _labelId; }
|
||||||
@ -1006,7 +1022,7 @@ namespace DH.Commons.Base
|
|||||||
OnPropertyChanged(nameof(LabelId));
|
OnPropertyChanged(nameof(LabelId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[JsonPropertyName("labelName")]
|
||||||
public string LabelName
|
public string LabelName
|
||||||
{
|
{
|
||||||
get { return _labelName; }
|
get { return _labelName; }
|
||||||
@ -1039,7 +1055,7 @@ namespace DH.Commons.Base
|
|||||||
OnPropertyChanged(nameof(MinScore));
|
OnPropertyChanged(nameof(MinScore));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[JsonPropertyName("maxArea")]
|
||||||
public double MaxArea
|
public double MaxArea
|
||||||
{
|
{
|
||||||
get { return _maxArea; }
|
get { return _maxArea; }
|
||||||
@ -1050,7 +1066,7 @@ namespace DH.Commons.Base
|
|||||||
OnPropertyChanged(nameof(MaxArea));
|
OnPropertyChanged(nameof(MaxArea));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[JsonPropertyName("minArea")]
|
||||||
public double MinArea
|
public double MinArea
|
||||||
{
|
{
|
||||||
get { return _minArea; }
|
get { return _minArea; }
|
||||||
@ -1061,7 +1077,7 @@ namespace DH.Commons.Base
|
|||||||
OnPropertyChanged(nameof(MinArea));
|
OnPropertyChanged(nameof(MinArea));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[JsonPropertyName("_resultState")]
|
||||||
public ResultState ResultState
|
public ResultState ResultState
|
||||||
{
|
{
|
||||||
get { return _resultState; }
|
get { return _resultState; }
|
||||||
@ -1072,12 +1088,14 @@ namespace DH.Commons.Base
|
|||||||
OnPropertyChanged(nameof(ResultState));
|
OnPropertyChanged(nameof(ResultState));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private CellLink[] cellLinks;
|
private CellLink[] cellLinks;
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public CellLink[] CellLinks
|
public CellLink[] CellLinks
|
||||||
{
|
{
|
||||||
get { return cellLinks; }
|
get {
|
||||||
|
|
||||||
|
return cellLinks; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (cellLinks == value) return;
|
if (cellLinks == value) return;
|
||||||
@ -1095,6 +1113,60 @@ namespace DH.Commons.Base
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public class PreTreatCollect
|
||||||
|
{
|
||||||
|
|
||||||
|
[Category("尺寸测量集合")]
|
||||||
|
[DisplayName("预处理-算法文件路径")]
|
||||||
|
[Description("预处理算法文件路径配置")]
|
||||||
|
[JsonPropertyName("halconPath_Pre")]
|
||||||
|
// [Editor(typeof(FileDialogEditor), typeof(UITypeEditor))]
|
||||||
|
public string HalconPath_Pre { get; set; }
|
||||||
|
|
||||||
|
[Category("尺寸测量集合")]
|
||||||
|
[DisplayName("输入参数列表")]
|
||||||
|
[Description("输入参数列表")]
|
||||||
|
[JsonPropertyName("preParams")]
|
||||||
|
// [TypeConverter(typeof(CollectionCountConvert))]
|
||||||
|
// [Editor(typeof(ComplexCollectionEditor<PreTreatParam>), typeof(UITypeEditor))]
|
||||||
|
public List<PreTreatParam> PreParams { get; set; } = new List<PreTreatParam>();
|
||||||
|
|
||||||
|
[Category("尺寸测量集合")]
|
||||||
|
[DisplayName("输出参数列表")]
|
||||||
|
[Description("输出参数列表")]
|
||||||
|
[JsonPropertyName("outPreParams")]
|
||||||
|
// [TypeConverter(typeof(CollectionCountConvert))]
|
||||||
|
// [Editor(typeof(ComplexCollectionEditor<PreTreatParam>), typeof(UITypeEditor))]
|
||||||
|
public List<PreTreatParam> outPreParams { get; set; } = new List<PreTreatParam>();
|
||||||
|
|
||||||
|
[Category("尺寸测量集合")]
|
||||||
|
[DisplayName("预处理-名称")]
|
||||||
|
[Description("预处理名称")]
|
||||||
|
[JsonPropertyName("preName")]
|
||||||
|
public string PreName { get; set; }
|
||||||
|
|
||||||
|
[Category("尺寸测量集合")]
|
||||||
|
[DisplayName("预处理-启用")]
|
||||||
|
[Description("预处理启用")]
|
||||||
|
[JsonPropertyName("preIsEnable")]
|
||||||
|
public bool PreIsEnable { get; set; } = false;
|
||||||
|
|
||||||
|
|
||||||
|
[Category("尺寸测量集合")]
|
||||||
|
[DisplayName("类型")]
|
||||||
|
[Description("类型")]
|
||||||
|
[JsonPropertyName("preType")]
|
||||||
|
// [TypeConverter(typeof(EnumDescriptionConverter<SizeEnum>))]
|
||||||
|
public SizeEnum PreType { get; set; }
|
||||||
|
|
||||||
|
[Category("尺寸测量集合")]
|
||||||
|
[DisplayName("阈值")]
|
||||||
|
[Description("阈值")]
|
||||||
|
[JsonPropertyName("prePix")]
|
||||||
|
public int PrePix { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public class SizeTreatParam : NotifyProperty
|
public class SizeTreatParam : NotifyProperty
|
||||||
{
|
{
|
||||||
@ -1256,7 +1328,7 @@ namespace DH.Commons.Base
|
|||||||
[DisplayName("检测项标签")]
|
[DisplayName("检测项标签")]
|
||||||
[Description("检测标签Id")]
|
[Description("检测标签Id")]
|
||||||
//[TypeConverter(typeof(DetectionLabelConverter))]
|
//[TypeConverter(typeof(DetectionLabelConverter))]
|
||||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
|
||||||
public string LabelId { get; set; }
|
public string LabelId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
@ -682,31 +682,31 @@ namespace DH.Commons.Enums
|
|||||||
Warning = 8,
|
Warning = 8,
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum ResultState
|
//public enum ResultState
|
||||||
{
|
//{
|
||||||
[Description("NA")]
|
// [Description("NA")]
|
||||||
NA = -5,
|
// NA = -5,
|
||||||
[Description("尺寸NG")]
|
// [Description("尺寸NG")]
|
||||||
SizeNG = -4,
|
// SizeNG = -4,
|
||||||
[Description("检测NG")]
|
// [Description("检测NG")]
|
||||||
DetectNG = -3,
|
// DetectNG = -3,
|
||||||
|
|
||||||
//[Description("检测不足TBD")]
|
// //[Description("检测不足TBD")]
|
||||||
// ShortageTBD = -2,
|
// // ShortageTBD = -2,
|
||||||
[Description("检测结果TBD")]
|
// [Description("检测结果TBD")]
|
||||||
ResultTBD = -1,
|
// ResultTBD = -1,
|
||||||
[Description("OK")]
|
// [Description("OK")]
|
||||||
OK = 1,
|
// OK = 1,
|
||||||
// [Description("NG")]
|
// // [Description("NG")]
|
||||||
// NG = 2,
|
// // NG = 2,
|
||||||
//统计结果
|
// //统计结果
|
||||||
[Description("A类NG")]
|
// [Description("A类NG")]
|
||||||
A_NG = 25,
|
// A_NG = 25,
|
||||||
[Description("B类NG")]
|
// [Description("B类NG")]
|
||||||
B_NG = 26,
|
// B_NG = 26,
|
||||||
[Description("C类NG")]
|
// [Description("C类NG")]
|
||||||
C_NG = 27,
|
// C_NG = 27,
|
||||||
}
|
//}
|
||||||
public enum HikCameraType
|
public enum HikCameraType
|
||||||
{
|
{
|
||||||
[Description("HikCamera-Gige")]
|
[Description("HikCamera-Gige")]
|
||||||
|
@ -571,8 +571,8 @@ namespace DH.Commons.Enums
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//分别基于像素(GetPixel和SetPixel)、基于内存、基于指针这三种方法增强图片对比度。
|
//分别基于像素(GetPixel和SetPixel)、基于内存、基于指针这三种方法增强图片对比度
|
||||||
// 第一种方法:像素提取法。速度慢 基于像素:400-600ms
|
// 第一种方法:像素提取法 速度慢 基于像素:400-600ms
|
||||||
public static Bitmap MethodBaseOnPixel(Bitmap bitmap, int degree)
|
public static Bitmap MethodBaseOnPixel(Bitmap bitmap, int degree)
|
||||||
{
|
{
|
||||||
Color curColor;
|
Color curColor;
|
||||||
|
@ -108,7 +108,7 @@ namespace DH.Commons.Enums
|
|||||||
DataGridViewCheckboxHeaderEventArgs ex = new DataGridViewCheckboxHeaderEventArgs();
|
DataGridViewCheckboxHeaderEventArgs ex = new DataGridViewCheckboxHeaderEventArgs();
|
||||||
ex.CheckedState = _checked;
|
ex.CheckedState = _checked;
|
||||||
|
|
||||||
object sender = new object();//此处不代表选择的列头checkbox,只是作为参数传递。因为列头checkbox是绘制出来的,无法获得它的实例
|
object sender = new object();//此处不代表选择的列头checkbox,只是作为参数传递 因为列头checkbox是绘制出来的,无法获得它的实例
|
||||||
|
|
||||||
if (OnCheckBoxClicked != null)
|
if (OnCheckBoxClicked != null)
|
||||||
{
|
{
|
||||||
|
@ -409,7 +409,7 @@ namespace MCDLL_NET
|
|||||||
|
|
||||||
|
|
||||||
/********************************************************************************************************************************************************************
|
/********************************************************************************************************************************************************************
|
||||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>ϣ<EFBFBD><CFA3>ᱻ<EFBFBD>ж<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD>ݡ<EFBFBD>
|
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>ϣ<EFBFBD><CFA3>ᱻ<EFBFBD>ж<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>
|
||||||
********************************************************************************************************************************************************************/
|
********************************************************************************************************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
@ -1005,8 +1005,8 @@ namespace MCDLL_NET
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="Axis"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></param>
|
/// <param name="Axis"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></param>
|
||||||
/// <param name="Stop_Time"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͣʱ<CDA3>䣻 <20><>Χ 0 -1000ms<6D><73><EFBFBD><EFBFBD>Ĭ<EFBFBD>ϣ<EFBFBD><CFA3><EFBFBD>ͣ<EFBFBD><CDA3>
|
/// <param name="Stop_Time"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͣʱ<CDA3>䣻 <20><>Χ 0 -1000ms<6D><73><EFBFBD><EFBFBD>Ĭ<EFBFBD>ϣ<EFBFBD><CFA3><EFBFBD>ͣ<EFBFBD><CDA3>
|
||||||
/// ע<>⣺<EFBFBD><E2A3BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ײԭ<D7B2>㻺ͣʱ<CDA3>䣬<EFBFBD><E4A3AC>Ҫ<EFBFBD><D2AA><EFBFBD>ϻ<EFBFBD><CFBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õĸ<C3B5><C4B8>ٶ<EFBFBD><D9B6>ٶȣ<D9B6><C8A3>͵<EFBFBD><CDB5>ٶ<EFBFBD><D9B6>ٶȵĴ<C8B5><C4B4>䡣
|
/// ע<>⣺<EFBFBD><E2A3BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ײԭ<D7B2>㻺ͣʱ<CDA3>䣬<EFBFBD><E4A3AC>Ҫ<EFBFBD><D2AA><EFBFBD>ϻ<EFBFBD><CFBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õĸ<C3B5><C4B8>ٶ<EFBFBD><D9B6>ٶȣ<D9B6><C8A3>͵<EFBFBD><CDB5>ٶ<EFBFBD><D9B6>ٶȵĴ<C8B5><C4B4><EFBFBD>
|
||||||
/// <20><><EFBFBD>ô<EFBFBD><C3B4>˻<EFBFBD><CBBB><EFBFBD><EFBFBD>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><D0A1>ֹͣ<CDA3><D6B9>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>ʱ<EFBFBD>䣬<EFBFBD><E4A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD>ԭ<EFBFBD><D4AD>ʱ<EFBFBD><CAB1><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD><EFBFBD>м䡣</param>
|
/// <20><><EFBFBD>ô<EFBFBD><C3B4>˻<EFBFBD><CBBB><EFBFBD><EFBFBD>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><D0A1>ֹͣ<CDA3><D6B9>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>ʱ<EFBFBD>䣬<EFBFBD><E4A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD>ԭ<EFBFBD><D4AD>ʱ<EFBFBD><CAB1><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD><EFBFBD>м<EFBFBD> </param>
|
||||||
/// <param name="StationNumber">վ<><D5BE><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD>Ĭ<EFBFBD>ϲ<EFBFBD><CFB2><EFBFBD>Ϊ 0</param>
|
/// <param name="StationNumber">վ<><D5BE><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD>Ĭ<EFBFBD>ϲ<EFBFBD><CFB2><EFBFBD>Ϊ 0</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[DllImport("MCDLL_NET.DLL", EntryPoint = "MCF_Search_Home_Stop_Time_Net")]
|
[DllImport("MCDLL_NET.DLL", EntryPoint = "MCF_Search_Home_Stop_Time_Net")]
|
||||||
|
@ -444,17 +444,17 @@ namespace DH.Devices.Motion
|
|||||||
|
|
||||||
//[Category("回原点设置")]
|
//[Category("回原点设置")]
|
||||||
//[DisplayName("回原点模式")]
|
//[DisplayName("回原点模式")]
|
||||||
//[Description("HomeMode:回原点模式。0:一般模式 1:极限限位模式 2:外部触发模式")]
|
//[Description("HomeMode:回原点模式 0:一般模式 1:极限限位模式 2:外部触发模式")]
|
||||||
//public int HomeMode { get; set; } = 0;
|
//public int HomeMode { get; set; } = 0;
|
||||||
|
|
||||||
//[Category("回原点设置")]
|
//[Category("回原点设置")]
|
||||||
//[DisplayName("回原点方向")]
|
//[DisplayName("回原点方向")]
|
||||||
//[Description("IsHomePositive:回原点方向。 true:正方向开始 false:负方向开始")]
|
//[Description("IsHomePositive:回原点方向 true:正方向开始 false:负方向开始")]
|
||||||
//public bool IsHomePositive { get; set; } = true;
|
//public bool IsHomePositive { get; set; } = true;
|
||||||
|
|
||||||
//[Category("回原点设置")]
|
//[Category("回原点设置")]
|
||||||
//[DisplayName("是否自动回原点")]
|
//[DisplayName("是否自动回原点")]
|
||||||
//[Description("IsAutoGoHome:是否自动回原点。 true:是 false:否")]
|
//[Description("IsAutoGoHome:是否自动回原点 true:是 false:否")]
|
||||||
//public bool IsAutoGoHome { get; set; } = false;
|
//public bool IsAutoGoHome { get; set; } = false;
|
||||||
|
|
||||||
//[Category("超时设置")]
|
//[Category("超时设置")]
|
||||||
@ -601,7 +601,7 @@ namespace DH.Devices.Motion
|
|||||||
|
|
||||||
[Category("回原点参数")]
|
[Category("回原点参数")]
|
||||||
[DisplayName("碰撞原点缓停时间")]
|
[DisplayName("碰撞原点缓停时间")]
|
||||||
[Description("SearchHomeStopTime:触发缓停时间,范围 0-1000ms,(默认:急停)。注意:设置碰撞原点缓停时间,需要配合回零设置的高速段速度,和低速度速度的搭配。设置大了会出现过冲的现象,设置小了停止的时候会有抖动,需要调节时间,尽量设置找到原点时候在开关中间。")]
|
[Description("SearchHomeStopTime:触发缓停时间,范围 0-1000ms,(默认:急停) 注意:设置碰撞原点缓停时间,需要配合回零设置的高速段速度,和低速度速度的搭配 设置大了会出现过冲的现象,设置小了停止的时候会有抖动,需要调节时间,尽量设置找到原点时候在开关中间 ")]
|
||||||
public ushort SearchHomeStopTime { get; set; } = 0;
|
public ushort SearchHomeStopTime { get; set; } = 0;
|
||||||
|
|
||||||
|
|
||||||
|
@ -318,9 +318,9 @@ namespace DH.Devices.Motion
|
|||||||
// //设置物件检测有效电平 0是低电平 1是高电平
|
// //设置物件检测有效电平 0是低电平 1是高电平
|
||||||
// rtn = CMCDLL_NET_Sorting.MCF_Sorting_Set_Input_Logic_Net((ushort)SortingInputSetting.BitInputNumber, 0);
|
// rtn = CMCDLL_NET_Sorting.MCF_Sorting_Set_Input_Logic_Net((ushort)SortingInputSetting.BitInputNumber, 0);
|
||||||
// //设置来料检测编码器 双转盘要设置两个轴
|
// //设置来料检测编码器 双转盘要设置两个轴
|
||||||
// /*Bit_Input_Number:设置位号。
|
// /*Bit_Input_Number:设置位号
|
||||||
// 取值: Bit_Input_0, Bit_Input_1。
|
// 取值: Bit_Input_0, Bit_Input_1
|
||||||
// Axis: 轴号。
|
// Axis: 轴号
|
||||||
// Source:跟随方式
|
// Source:跟随方式
|
||||||
// 取值:0:命令
|
// 取值:0:命令
|
||||||
// 1:编码器(默认)
|
// 1:编码器(默认)
|
||||||
@ -1659,7 +1659,7 @@ namespace DH.Devices.Motion
|
|||||||
#region IMonitor
|
#region IMonitor
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 位置捕获监听,入料检测。
|
/// 位置捕获监听,入料检测
|
||||||
/// 入料检测对射开关接到了HOME口,每当有新料到达入料检测传感器时,程序把当前位置当作原点,并调用<see cref="SolidMotionCardBase.CapturePositionChanged(int, int)"/>函数
|
/// 入料检测对射开关接到了HOME口,每当有新料到达入料检测传感器时,程序把当前位置当作原点,并调用<see cref="SolidMotionCardBase.CapturePositionChanged(int, int)"/>函数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void MonitorPieces()
|
private void MonitorPieces()
|
||||||
@ -1800,7 +1800,7 @@ namespace DH.Devices.Motion
|
|||||||
// Picese_sizeStr += i.ToString()+":"+Piece_Size[i]+"\t";
|
// Picese_sizeStr += i.ToString()+":"+Piece_Size[i]+"\t";
|
||||||
// Picese_DistanceizeStr += i.ToString()+":"+ Piece_Distance_To_next[i]+"\t";
|
// Picese_DistanceizeStr += i.ToString()+":"+ Piece_Distance_To_next[i]+"\t";
|
||||||
//}
|
//}
|
||||||
// LogAsync(DateTime.Now, LogLevel.Information, $"转盘{station}产品入列 , {piecesCountDic[station]} size:{Piece_Size[Piece_Size.Length - 1]}。");
|
// LogAsync(DateTime.Now, LogLevel.Information, $"转盘{station}产品入列 , {piecesCountDic[station]} size:{Piece_Size[Piece_Size.Length - 1]} ");
|
||||||
// LogAsync(DateTime.Now, LogLevel.Information, $"转盘{station}产品入列 ,监听piece_find{tmpPieceNumber} 监听物件大小" + Picese_sizeStr+",物件间距"+ Picese_DistanceizeStr+"相机经过个数"+Piece_Cross_Camera);
|
// LogAsync(DateTime.Now, LogLevel.Information, $"转盘{station}产品入列 ,监听piece_find{tmpPieceNumber} 监听物件大小" + Picese_sizeStr+",物件间距"+ Picese_DistanceizeStr+"相机经过个数"+Piece_Cross_Camera);
|
||||||
if (tmpPieceNumber != piecesCountDic[station] + 1)
|
if (tmpPieceNumber != piecesCountDic[station] + 1)
|
||||||
{
|
{
|
||||||
|
@ -237,15 +237,15 @@ namespace DH.Devices.Vision
|
|||||||
{
|
{
|
||||||
|
|
||||||
originMat?.Dispose();
|
originMat?.Dispose();
|
||||||
#pragma warning disable CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
#pragma warning disable CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型
|
||||||
originMat = null;
|
originMat = null;
|
||||||
#pragma warning restore CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
#pragma warning restore CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型
|
||||||
//maskMat?.Dispose();
|
//maskMat?.Dispose();
|
||||||
// maskMat = null;
|
// maskMat = null;
|
||||||
detectMat?.Dispose();
|
detectMat?.Dispose();
|
||||||
#pragma warning disable CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
#pragma warning disable CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型
|
||||||
detectMat = null;
|
detectMat = null;
|
||||||
#pragma warning restore CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
#pragma warning restore CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型
|
||||||
// maskWeighted?.Dispose();
|
// maskWeighted?.Dispose();
|
||||||
// maskWeighted = null;
|
// maskWeighted = null;
|
||||||
// GC.Collect();
|
// GC.Collect();
|
||||||
|
@ -127,9 +127,9 @@ namespace DH.Devices.Vision
|
|||||||
// json = "{\"FastDetResult\":[{\"cls_id\":0,\"cls\":\"liewen\",\"fScore\":0.654843,\"rect\":[175,99,110,594]},{\"cls_id\":0,\"cls\":\"liewen\",\"fScore\":0.654589,\"rect\":[2608,19,104,661]},{\"cls_id\":0,\"cls\":\"liewen\",\"fScore\":0.654285,\"rect\":[1275,19,104,662]},{\"cls_id\":0,\"cls\":\"liewen\",\"fScore\":0.620762,\"rect\":[1510,95,107,600]},{\"cls_id\":0,\"cls\":\"liewen\",\"fScore\":0.617812,\"rect\":[2844,93,106,602]}]}";
|
// json = "{\"FastDetResult\":[{\"cls_id\":0,\"cls\":\"liewen\",\"fScore\":0.654843,\"rect\":[175,99,110,594]},{\"cls_id\":0,\"cls\":\"liewen\",\"fScore\":0.654589,\"rect\":[2608,19,104,661]},{\"cls_id\":0,\"cls\":\"liewen\",\"fScore\":0.654285,\"rect\":[1275,19,104,662]},{\"cls_id\":0,\"cls\":\"liewen\",\"fScore\":0.620762,\"rect\":[1510,95,107,600]},{\"cls_id\":0,\"cls\":\"liewen\",\"fScore\":0.617812,\"rect\":[2844,93,106,602]}]}";
|
||||||
//
|
//
|
||||||
Console.WriteLine("检测结果JSON:" + json);
|
Console.WriteLine("检测结果JSON:" + json);
|
||||||
#pragma warning disable CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
#pragma warning disable CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型
|
||||||
SegResult detResult = JsonConvert.DeserializeObject<SegResult>(json);
|
SegResult detResult = JsonConvert.DeserializeObject<SegResult>(json);
|
||||||
#pragma warning restore CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
#pragma warning restore CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型
|
||||||
if (detResult == null)
|
if (detResult == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -259,9 +259,9 @@ namespace DH.Devices.Vision
|
|||||||
{
|
{
|
||||||
|
|
||||||
originMat?.Dispose();
|
originMat?.Dispose();
|
||||||
#pragma warning disable CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
#pragma warning disable CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型
|
||||||
originMat = null;
|
originMat = null;
|
||||||
#pragma warning restore CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
#pragma warning restore CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型
|
||||||
|
|
||||||
|
|
||||||
// GC.Collect();
|
// GC.Collect();
|
||||||
|
@ -59,7 +59,7 @@ namespace DH.Devices.Vision
|
|||||||
// "rect": [421, 823, 6, 8]
|
// "rect": [421, 823, 6, 8]
|
||||||
// }]
|
// }]
|
||||||
//}
|
//}
|
||||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
|
||||||
public List<Result> HYolo;
|
public List<Result> HYolo;
|
||||||
|
|
||||||
public class Result
|
public class Result
|
||||||
@ -67,12 +67,12 @@ namespace DH.Devices.Vision
|
|||||||
|
|
||||||
public double fScore;
|
public double fScore;
|
||||||
public int classId;
|
public int classId;
|
||||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
|
||||||
public string classname;
|
public string classname;
|
||||||
|
|
||||||
|
|
||||||
//public double area;
|
//public double area;
|
||||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
|
||||||
public List<int> rect;
|
public List<int> rect;
|
||||||
|
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ namespace DH.Devices.Vision
|
|||||||
}
|
}
|
||||||
public class SegResult
|
public class SegResult
|
||||||
{
|
{
|
||||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
|
||||||
public List<Result> SegmentResult;
|
public List<Result> SegmentResult;
|
||||||
|
|
||||||
public class Result
|
public class Result
|
||||||
@ -90,12 +90,12 @@ namespace DH.Devices.Vision
|
|||||||
|
|
||||||
public double fScore;
|
public double fScore;
|
||||||
public int classId;
|
public int classId;
|
||||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
|
||||||
public string classname;
|
public string classname;
|
||||||
|
|
||||||
|
|
||||||
public double area;
|
public double area;
|
||||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
|
||||||
public List<int> rect;
|
public List<int> rect;
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,18 +22,18 @@ namespace DH.Devices.Vision
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 检测配置ID
|
/// 检测配置ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
|
||||||
public string DetectionId { get; set; }
|
public string DetectionId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
|
||||||
public string DetectionName { get; set; }
|
public string DetectionName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 深度学习模型
|
/// 深度学习模型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
|
||||||
public SimboVisionMLBase StationMLEngine { get; set; }
|
public SimboVisionMLBase StationMLEngine { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
19
DH.Process/DH.Process.csproj
Normal file
19
DH.Process/DH.Process.csproj
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0-windows</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<BaseOutputPath>..\</BaseOutputPath>
|
||||||
|
<AppendTargetFrameworkToOutputPath>output</AppendTargetFrameworkToOutputPath>
|
||||||
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\DH.Commons.Devies\DH.Commons.Devies.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
49
DH.Process/XKRS.Process.cs
Normal file
49
DH.Process/XKRS.Process.cs
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
using DH.Commons.Enums;
|
||||||
|
using DH.Devices.Devices;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing.Design;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace DH.Process
|
||||||
|
{
|
||||||
|
|
||||||
|
public class ProcessConfigBase
|
||||||
|
{
|
||||||
|
[JsonPropertyName("station_code")]
|
||||||
|
public string StationCode { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
#region 设备配置
|
||||||
|
[Category("设备配置")]
|
||||||
|
[Description("相机配置")]
|
||||||
|
[DisplayName("相机配置")]
|
||||||
|
[JsonPropertyName("camera_config_collection")]
|
||||||
|
//[TypeConverter(typeof(CollectionCountConvert))]
|
||||||
|
//[Editor(typeof(InitialConfigCollectionEditor<CameraInitialConfigBase>), typeof(UITypeEditor))]
|
||||||
|
public List<CameraBase> CameraConfigCollection { get; set; } = new List<CameraBase>();
|
||||||
|
|
||||||
|
|
||||||
|
[Category("设备配置")]
|
||||||
|
[Description("模型配置")]
|
||||||
|
[DisplayName("模型配置")]
|
||||||
|
[JsonPropertyName("detection_config_collection")]
|
||||||
|
//[TypeConverter(typeof(CollectionCountConvert))]
|
||||||
|
//[Editor(typeof(InitialConfigCollectionEditor<CameraInitialConfigBase>), typeof(UITypeEditor))]
|
||||||
|
public List<DetectionConfig> DetectionConfigCollection { get; set; } = new List<DetectionConfig>();
|
||||||
|
|
||||||
|
// [Category("设备配置")]
|
||||||
|
// [Description("PLC配置")]
|
||||||
|
// [DisplayName("PLC配置")]
|
||||||
|
// [TypeConverter(typeof(CollectionCountConvert))]
|
||||||
|
// [Editor(typeof(InitialConfigCollectionEditor<PLCInitialConfigBase>), typeof(UITypeEditor))]
|
||||||
|
// public List<IInitialConfig> PLCConfigCollection { get; set; } = new List<IInitialConfig>();
|
||||||
|
|
||||||
|
// [Category("设备配置")]
|
||||||
|
// [Description("其他设备配置")]
|
||||||
|
// [DisplayName("其他设备配置")]
|
||||||
|
// [TypeConverter(typeof(CollectionCountConvert))]
|
||||||
|
// [Editor(typeof(InitialConfigCollectionEditor<InitialConfigBase>), typeof(UITypeEditor))]
|
||||||
|
// public List<IInitialConfig> DeviceConfigs { get; set; } = new List<IInitialConfig>();
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
8
DH.UI.Model.Winform/Canvas.Designer.cs
generated
8
DH.UI.Model.Winform/Canvas.Designer.cs
generated
@ -3,14 +3,14 @@
|
|||||||
partial class Canvas
|
partial class Canvas
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
4
DH.UI.Model.Winform/CanvasImage.Designer.cs
generated
4
DH.UI.Model.Winform/CanvasImage.Designer.cs
generated
@ -3,7 +3,7 @@
|
|||||||
partial class CanvasImage
|
partial class CanvasImage
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
@ -923,9 +923,9 @@ namespace DH.UI.Model.Winform
|
|||||||
|
|
||||||
#region Dispose
|
#region Dispose
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
MAP?.Dispose();
|
MAP?.Dispose();
|
||||||
|
8
DH.UI.Model.Winform/Ctrl/GridCtrl.Designer.cs
generated
8
DH.UI.Model.Winform/Ctrl/GridCtrl.Designer.cs
generated
@ -3,14 +3,14 @@
|
|||||||
partial class GridCtrl
|
partial class GridCtrl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
partial class IOIndicatorCtrl
|
partial class IOIndicatorCtrl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
@ -864,30 +864,30 @@ namespace DH.UI.Model.Winform
|
|||||||
{
|
{
|
||||||
if (disposing)
|
if (disposing)
|
||||||
{
|
{
|
||||||
// 释放托管状态(托管对象)。
|
// 释放托管状态(托管对象)
|
||||||
Pen?.Dispose();
|
Pen?.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 释放未托管的资源(未托管的对象)并在以下内容中替代终结器。
|
// TODO: 释放未托管的资源(未托管的对象)并在以下内容中替代终结器
|
||||||
// TODO: 将大型字段设置为 null。
|
// TODO: 将大型字段设置为 null
|
||||||
|
|
||||||
disposedValue = true;
|
disposedValue = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 仅当以上 Dispose(bool disposing) 拥有用于释放未托管资源的代码时才替代终结器。
|
// TODO: 仅当以上 Dispose(bool disposing) 拥有用于释放未托管资源的代码时才替代终结器
|
||||||
// ~ElementBase()
|
// ~ElementBase()
|
||||||
// {
|
// {
|
||||||
// // 请勿更改此代码。将清理代码放入以上 Dispose(bool disposing) 中。
|
// // 请勿更改此代码 将清理代码放入以上 Dispose(bool disposing) 中
|
||||||
// Dispose(false);
|
// Dispose(false);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// 添加此代码以正确实现可处置模式。
|
// 添加此代码以正确实现可处置模式
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
// 请勿更改此代码。将清理代码放入以上 Dispose(bool disposing) 中。
|
// 请勿更改此代码 将清理代码放入以上 Dispose(bool disposing) 中
|
||||||
Dispose(true);
|
Dispose(true);
|
||||||
// TODO: 如果在以上内容中替代了终结器,则取消注释以下行。
|
// TODO: 如果在以上内容中替代了终结器,则取消注释以下行
|
||||||
// GC.SuppressFinalize(this);
|
// GC.SuppressFinalize(this);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
8
DH.UI.Model.Winform/GridCtrl.Designer.cs
generated
8
DH.UI.Model.Winform/GridCtrl.Designer.cs
generated
@ -3,14 +3,14 @@
|
|||||||
partial class GridCtrl
|
partial class GridCtrl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
8
DH.UI.Model.Winform/IOIndicatorCtrl.Designer.cs
generated
8
DH.UI.Model.Winform/IOIndicatorCtrl.Designer.cs
generated
@ -3,14 +3,14 @@
|
|||||||
partial class IOIndicatorCtrl
|
partial class IOIndicatorCtrl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
@ -30,6 +30,7 @@ using System.Linq;
|
|||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.Json;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
@ -44,6 +45,7 @@ using Point = System.Drawing.Point;
|
|||||||
using ResultState = DH.Commons.Base.ResultState;
|
using ResultState = DH.Commons.Base.ResultState;
|
||||||
using Timer = System.Threading.Timer;
|
using Timer = System.Threading.Timer;
|
||||||
|
|
||||||
|
|
||||||
namespace DHSoftware
|
namespace DHSoftware
|
||||||
{
|
{
|
||||||
public partial class MainWindow : AntdUI.Window
|
public partial class MainWindow : AntdUI.Window
|
||||||
|
28
DHSoftware/Properties/Resources.Designer.cs
generated
28
DHSoftware/Properties/Resources.Designer.cs
generated
@ -1,10 +1,10 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// 此代码由工具生成。
|
// 此代码由工具生成
|
||||||
// 运行时版本:4.0.30319.42000
|
// 运行时版本:4.0.30319.42000
|
||||||
//
|
//
|
||||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
// 重新生成代码,这些更改将会丢失。
|
// 重新生成代码,这些更改将会丢失
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -13,12 +13,12 @@ namespace DHSoftware.Properties {
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
/// 一个强类型的资源类,用于查找本地化的字符串等
|
||||||
/// </summary>
|
/// </summary>
|
||||||
// 此类是由 StronglyTypedResourceBuilder
|
// 此类是由 StronglyTypedResourceBuilder
|
||||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的
|
||||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
// (以 /str 作为命令选项),或重新生成 VS 项目
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
@ -33,7 +33,7 @@ namespace DHSoftware.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
/// 返回此类使用的缓存的 ResourceManager 实例
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
@ -48,7 +48,7 @@ namespace DHSoftware.Properties {
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
/// 使用此强类型资源类的所有资源查找执行重写
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Globalization.CultureInfo Culture {
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
@ -61,7 +61,7 @@ namespace DHSoftware.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
/// 查找 System.Drawing.Bitmap 类型的本地化资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap bg1 {
|
internal static System.Drawing.Bitmap bg1 {
|
||||||
get {
|
get {
|
||||||
@ -71,7 +71,7 @@ namespace DHSoftware.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
/// 查找 System.Drawing.Bitmap 类型的本地化资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap bg2 {
|
internal static System.Drawing.Bitmap bg2 {
|
||||||
get {
|
get {
|
||||||
@ -81,7 +81,7 @@ namespace DHSoftware.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
/// 查找 System.Drawing.Bitmap 类型的本地化资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap bg3 {
|
internal static System.Drawing.Bitmap bg3 {
|
||||||
get {
|
get {
|
||||||
@ -91,7 +91,7 @@ namespace DHSoftware.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
/// 查找 System.Drawing.Bitmap 类型的本地化资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap head {
|
internal static System.Drawing.Bitmap head {
|
||||||
get {
|
get {
|
||||||
@ -101,7 +101,7 @@ namespace DHSoftware.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
/// 查找 System.Drawing.Bitmap 类型的本地化资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap head2 {
|
internal static System.Drawing.Bitmap head2 {
|
||||||
get {
|
get {
|
||||||
@ -111,7 +111,7 @@ namespace DHSoftware.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
/// 查找 System.Drawing.Bitmap 类型的本地化资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap logo {
|
internal static System.Drawing.Bitmap logo {
|
||||||
get {
|
get {
|
||||||
@ -121,7 +121,7 @@ namespace DHSoftware.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
/// 查找 System.Drawing.Bitmap 类型的本地化资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap 关闭 {
|
internal static System.Drawing.Bitmap 关闭 {
|
||||||
get {
|
get {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
|
|
||||||
Version 2.0
|
Version 2.0
|
||||||
|
|
||||||
@ -48,7 +48,7 @@
|
|||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
8
DHSoftware/Views/CamConfigFrm.Designer.cs
generated
8
DHSoftware/Views/CamConfigFrm.Designer.cs
generated
@ -4,14 +4,14 @@
|
|||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
8
DHSoftware/Views/CameraConfigControl.Designer.cs
generated
8
DHSoftware/Views/CameraConfigControl.Designer.cs
generated
@ -3,14 +3,14 @@
|
|||||||
partial class CameraConfigControl
|
partial class CameraConfigControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
partial class CorrelatedCameraEdit
|
partial class CorrelatedCameraEdit
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
8
DHSoftware/Views/CtrlVisionDisplay.Designer.cs
generated
8
DHSoftware/Views/CtrlVisionDisplay.Designer.cs
generated
@ -3,14 +3,14 @@
|
|||||||
partial class CtrlVisionDisplay
|
partial class CtrlVisionDisplay
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
8
DHSoftware/Views/CtrlVisionRunBase.Designer.cs
generated
8
DHSoftware/Views/CtrlVisionRunBase.Designer.cs
generated
@ -4,14 +4,14 @@ namespace XKRS.UI.Device.Winform
|
|||||||
partial class CtrlVisionRunBase
|
partial class CtrlVisionRunBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -25,7 +25,7 @@ namespace XKRS.UI.Device.Winform
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
8
DHSoftware/Views/DefectRowEdit.Designer.cs
generated
8
DHSoftware/Views/DefectRowEdit.Designer.cs
generated
@ -3,14 +3,14 @@
|
|||||||
partial class DefectRowEdit
|
partial class DefectRowEdit
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
15
DHSoftware/Views/DetectControl.Designer.cs
generated
15
DHSoftware/Views/DetectControl.Designer.cs
generated
@ -3,14 +3,14 @@
|
|||||||
partial class DetectControl
|
partial class DetectControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
@ -116,7 +116,7 @@
|
|||||||
tabPage1.Controls.Add(label2);
|
tabPage1.Controls.Add(label2);
|
||||||
tabPage1.Controls.Add(iptPrePath);
|
tabPage1.Controls.Add(iptPrePath);
|
||||||
tabPage1.Controls.Add(label1);
|
tabPage1.Controls.Add(label1);
|
||||||
tabPage1.Location = new Point(-909, -575);
|
tabPage1.Location = new Point(3, 31);
|
||||||
tabPage1.Name = "tabPage1";
|
tabPage1.Name = "tabPage1";
|
||||||
tabPage1.Size = new Size(909, 575);
|
tabPage1.Size = new Size(909, 575);
|
||||||
tabPage1.TabIndex = 0;
|
tabPage1.TabIndex = 0;
|
||||||
@ -253,9 +253,9 @@
|
|||||||
//
|
//
|
||||||
label1.Location = new Point(110, 89);
|
label1.Location = new Point(110, 89);
|
||||||
label1.Name = "label1";
|
label1.Name = "label1";
|
||||||
label1.Size = new Size(75, 23);
|
label1.Size = new Size(86, 23);
|
||||||
label1.TabIndex = 0;
|
label1.TabIndex = 0;
|
||||||
label1.Text = "模型路径";
|
label1.Text = "预处理路径";
|
||||||
//
|
//
|
||||||
// tabPage2
|
// tabPage2
|
||||||
//
|
//
|
||||||
@ -609,6 +609,7 @@
|
|||||||
Controls.Add(tabs1);
|
Controls.Add(tabs1);
|
||||||
Name = "DetectControl";
|
Name = "DetectControl";
|
||||||
Size = new Size(915, 609);
|
Size = new Size(915, 609);
|
||||||
|
Load += DetectControl_Load;
|
||||||
tabs1.ResumeLayout(false);
|
tabs1.ResumeLayout(false);
|
||||||
tabPage1.ResumeLayout(false);
|
tabPage1.ResumeLayout(false);
|
||||||
tabPage2.ResumeLayout(false);
|
tabPage2.ResumeLayout(false);
|
||||||
|
@ -20,12 +20,115 @@ namespace DHSoftware.Views
|
|||||||
window = _window;
|
window = _window;
|
||||||
detectionConfig = _detection;
|
detectionConfig = _detection;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
//this.detectionConfig = detectionConfig;
|
||||||
//初始化表格列头
|
//初始化表格列头
|
||||||
InitTableColumns();
|
InitTableColumns();
|
||||||
InitData();
|
foreach (var item in MLModelTypes)
|
||||||
BindEventHandler();
|
{
|
||||||
}
|
stDetectType.Items.Add(item.Key);
|
||||||
|
}
|
||||||
|
|
||||||
|
BindEventHandler();
|
||||||
|
// 如果你的控件是通过设计器生成的,确保事件已经在设计器文件中绑定。
|
||||||
|
swtPre.CheckedChanged += swtPre_CheckedChanged; // 确保控件的事件处理器被注册
|
||||||
|
swIsAddStation.CheckedChanged += swIsAddStation_CheckedChanged; // 确保控件的事件处理器被注册
|
||||||
|
swIsEnabled.CheckedChanged += swIsEnabled_CheckedChanged; // 确保控件的事件处理器被注册
|
||||||
|
stDetectType.SelectedIndexChanged += stDetectType_SelectedIndexChanged; // 确保控件的事件处理器被注册
|
||||||
|
iptScore.TextChanged += IptScore_TextChanged;
|
||||||
|
iptModelPath.TextChanged += IptModelPath_TextChanged;
|
||||||
|
}
|
||||||
|
private void IptScore_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (_config != null && !string.IsNullOrEmpty(iptScore.Text))
|
||||||
|
{
|
||||||
|
if (float.TryParse(iptScore.Text, out float score) && _config.ModelconfThreshold != score)
|
||||||
|
{
|
||||||
|
_config.ModelconfThreshold = score;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iptScore.Text = _config.ModelconfThreshold.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void IptModelPath_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (_config != null && !string.IsNullOrEmpty(iptModelPath.Text))
|
||||||
|
{
|
||||||
|
if ( _config.ModelPath != iptModelPath.Text)
|
||||||
|
{
|
||||||
|
_config.ModelPath = iptModelPath.Text;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iptModelPath.Text = _config.ModelPath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void stDetectType_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// 下拉选项变更事件处理
|
||||||
|
|
||||||
|
if (_config != null && stDetectType.SelectedIndex != -1)
|
||||||
|
{
|
||||||
|
// 防止循环更新
|
||||||
|
if ((int)_config.ModelType != stDetectType.SelectedIndex + 1)
|
||||||
|
{
|
||||||
|
_config.ModelType = (MLModelType)(stDetectType.SelectedIndex + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
private void swtPre_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// 当用户改变控件的值时,更新数据模型的属性
|
||||||
|
if (_config != null)
|
||||||
|
{
|
||||||
|
_config.IsPreEnabled = swtPre.Checked;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void swIsAddStation_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// 当用户改变控件的值时,更新数据模型的属性
|
||||||
|
if (_config != null)
|
||||||
|
{
|
||||||
|
_config.IsAddStation = swIsAddStation.Checked;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void swIsEnabled_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// 当用户改变控件的值时,更新数据模型的属性
|
||||||
|
if (_config != null)
|
||||||
|
{
|
||||||
|
_config.IsEnabled = swIsEnabled.Checked;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 更新尺寸测量表格
|
||||||
|
/// </summary>
|
||||||
|
private void UpdatePreTreatCollectsFromSizeTable()
|
||||||
|
{
|
||||||
|
// 假设 SizeLableList 是 SizeTable 的数据源
|
||||||
|
List<SizeTreatParam> updatedPreTreatCollects = new List<SizeTreatParam>();
|
||||||
|
|
||||||
|
foreach (var sizeTreat in SizeLableList)
|
||||||
|
{
|
||||||
|
var preTreatCollect = new SizeTreatParam
|
||||||
|
{
|
||||||
|
IsEnable = sizeTreat.IsEnable,
|
||||||
|
PreName = sizeTreat.PreName,
|
||||||
|
PrePix = sizeTreat.PrePix,
|
||||||
|
PreType = sizeTreat.PreType,
|
||||||
|
ResultShow = sizeTreat.ResultShow,
|
||||||
|
OutResultShow = sizeTreat.OutResultShow
|
||||||
|
};
|
||||||
|
|
||||||
|
updatedPreTreatCollects.Add(preTreatCollect);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将更新后的数据设置到 PreTreatCollects
|
||||||
|
detectionConfig.PreTreatCollects = updatedPreTreatCollects;
|
||||||
|
}
|
||||||
private void BindEventHandler()
|
private void BindEventHandler()
|
||||||
{
|
{
|
||||||
//预处理
|
//预处理
|
||||||
@ -41,6 +144,9 @@ namespace DHSoftware.Views
|
|||||||
//中处理
|
//中处理
|
||||||
btnPath2.Click += BtnPath2_Click;
|
btnPath2.Click += BtnPath2_Click;
|
||||||
btnCorrelatedCamera.Click += BtnCorrelatedCamera_Click;
|
btnCorrelatedCamera.Click += BtnCorrelatedCamera_Click;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
btnPic.Click += BtnPic_Click;
|
btnPic.Click += BtnPic_Click;
|
||||||
btnLableAdd.Click += BtnLableAdd_Click;
|
btnLableAdd.Click += BtnLableAdd_Click;
|
||||||
btnLableDelete.Click += BtnLableDelete_Click;
|
btnLableDelete.Click += BtnLableDelete_Click;
|
||||||
@ -106,6 +212,8 @@ namespace DHSoftware.Views
|
|||||||
OnClose = () =>
|
OnClose = () =>
|
||||||
{
|
{
|
||||||
AntdUI.Message.info(window, "结束编辑", autoClose: 1);
|
AntdUI.Message.info(window, "结束编辑", autoClose: 1);
|
||||||
|
|
||||||
|
UpdatePreTreatCollectsFromSizeTable();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
@ -143,7 +251,7 @@ namespace DHSoftware.Views
|
|||||||
MessageBox.Show("未定义的测量类型!");
|
MessageBox.Show("未定义的测量类型!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
UpdatePreTreatCollectsFromSizeTable();
|
||||||
//使用clone可以防止table中的image被修改
|
//使用clone可以防止table中的image被修改
|
||||||
//Preview.open(new Preview.Config(window, (Image)SizeParamLable.CellImages[0].Image.Clone()));
|
//Preview.open(new Preview.Config(window, (Image)SizeParamLable.CellImages[0].Image.Clone()));
|
||||||
break;
|
break;
|
||||||
@ -488,6 +596,44 @@ namespace DHSoftware.Views
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//加载相机
|
||||||
|
private void InitRelatedCamera()
|
||||||
|
{
|
||||||
|
if (relatedCameras.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var item in relatedCameras)
|
||||||
|
{
|
||||||
|
var control = new AntdUI.Tag()
|
||||||
|
{
|
||||||
|
Font = new System.Drawing.Font("Microsoft YaHei UI", 9F),
|
||||||
|
Size = new Size(90, 42),
|
||||||
|
Text = item.CameraSourceId,
|
||||||
|
CloseIcon = true
|
||||||
|
};
|
||||||
|
control.CloseChanged += (sender, e) =>
|
||||||
|
{
|
||||||
|
var tag = sender as Tag;
|
||||||
|
foreach (var item in relatedCameras)
|
||||||
|
{
|
||||||
|
if (item.CameraSourceId.Equals(tag.Text))
|
||||||
|
{
|
||||||
|
relatedCameras.Remove(item);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
detectionConfig.CameraCollects = relatedCameras;
|
||||||
|
return true;
|
||||||
|
|
||||||
|
};
|
||||||
|
// 通过主窗口设置DPI控制添加控件保持缩放比例
|
||||||
|
window.AutoDpi(control);
|
||||||
|
flowPanel1.Controls.Add(control);
|
||||||
|
control.BringToFront();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void InitData()
|
private void InitData()
|
||||||
@ -613,14 +759,16 @@ namespace DHSoftware.Views
|
|||||||
|
|
||||||
SizeTable.Columns = new ColumnCollection() {
|
SizeTable.Columns = new ColumnCollection() {
|
||||||
new ColumnCheck("Selected"){Fixed = true},
|
new ColumnCheck("Selected"){Fixed = true},
|
||||||
new ColumnSwitch("IsEnable", "是否启用", ColumnAlign.Center),
|
new ColumnSwitch("IsEnable", "是否启用") {Width = "10%" },
|
||||||
new Column("PreName", "测量名称",ColumnAlign.Center),
|
new Column("PreName", "测量名称") { Width = "15%" },
|
||||||
new Column("PreType", "测量类型", ColumnAlign.Center),
|
new Column("PreType", "测量类型") { Width = "10%" },
|
||||||
new Column("PrePix", "阈值", ColumnAlign.Center),
|
new Column("PrePix", "阈值") { Width = "5%" },
|
||||||
new Column("ResultShow", "输入参数", ColumnAlign.Center),
|
new Column("ResultShow", "输入参数") { Width = "15%" },
|
||||||
new Column("OutResultShow", "输出参数", ColumnAlign.Center),
|
new Column("OutResultShow", "输出参数") { Width = "15%" },
|
||||||
new Column("CellLinks", "操作", ColumnAlign.Center)
|
new Column("CellLinks", "操作") { Width = "30%" }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnPath_Click(object? sender, EventArgs e)
|
private void btnPath_Click(object? sender, EventArgs e)
|
||||||
|
8
DHSoftware/Views/DetectionLableEdit.Designer.cs
generated
8
DHSoftware/Views/DetectionLableEdit.Designer.cs
generated
@ -3,14 +3,14 @@
|
|||||||
partial class DetectionLableEdit
|
partial class DetectionLableEdit
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
8
DHSoftware/Views/PreTreatEdit.Designer.cs
generated
8
DHSoftware/Views/PreTreatEdit.Designer.cs
generated
@ -3,14 +3,14 @@
|
|||||||
partial class PreTreatEdit
|
partial class PreTreatEdit
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
8
DHSoftware/Views/SizeLabelEdit.Designer.cs
generated
8
DHSoftware/Views/SizeLabelEdit.Designer.cs
generated
@ -3,14 +3,14 @@
|
|||||||
partial class SizeLabelEdit
|
partial class SizeLabelEdit
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理所有正在使用的资源。
|
/// 清理所有正在使用的资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设计器支持所需的方法 - 不要修改
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
/// 使用代码编辑器修改此方法的内容。
|
/// 使用代码编辑器修改此方法的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
@ -6,15 +6,15 @@
|
|||||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
<!-- UAC 清单选项
|
<!-- UAC 清单选项
|
||||||
如果想要更改 Windows 用户帐户控制级别,请使用
|
如果想要更改 Windows 用户帐户控制级别,请使用
|
||||||
以下节点之一替换 requestedExecutionLevel 节点。
|
以下节点之一替换 requestedExecutionLevel 节点
|
||||||
|
|
||||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||||
|
|
||||||
指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化。
|
指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化
|
||||||
如果你的应用程序需要此虚拟化来实现向后兼容性,则移除此
|
如果你的应用程序需要此虚拟化来实现向后兼容性,则移除此
|
||||||
元素。
|
元素
|
||||||
-->
|
-->
|
||||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
</requestedPrivileges>
|
</requestedPrivileges>
|
||||||
@ -24,8 +24,8 @@
|
|||||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
<application>
|
<application>
|
||||||
<!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
|
<!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
|
||||||
Windows 版本的列表。取消评论适当的元素,
|
Windows 版本的列表 取消评论适当的元素,
|
||||||
Windows 将自动选择最兼容的环境。 -->
|
Windows 将自动选择最兼容的环境 -->
|
||||||
|
|
||||||
<!-- Windows Vista -->
|
<!-- Windows Vista -->
|
||||||
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
|
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
|
||||||
@ -46,11 +46,11 @@
|
|||||||
</compatibility>
|
</compatibility>
|
||||||
|
|
||||||
<!-- 指示该应用程序可感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
|
<!-- 指示该应用程序可感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
|
||||||
自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
|
自动缩放 Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
|
||||||
选择加入。选择加入此设置的 Windows 窗体应用程序(面向 .NET Framework 4.6)还应
|
选择加入 选择加入此设置的 Windows 窗体应用程序(面向 .NET Framework 4.6)还应
|
||||||
在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。
|
在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"
|
||||||
|
|
||||||
将应用程序设为感知长路径。请参阅 https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
|
将应用程序设为感知长路径 请参阅 https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
|
||||||
|
|
||||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
<windowsSettings>
|
<windowsSettings>
|
||||||
|
Reference in New Issue
Block a user