Compare commits
26 Commits
6182dc2192
...
main
Author | SHA1 | Date | |
---|---|---|---|
efcf79ea0d | |||
bb943740da | |||
71bbea56a7 | |||
6c1d86619e | |||
1a84519874 | |||
4e75b0d4da | |||
95bc9ce3b3 | |||
bc0ed5d574 | |||
6a9e7e4343 | |||
f12c2f0cd9 | |||
8e2197f46e | |||
ed53c8e5db | |||
b749eb4266 | |||
ae5c1122ed | |||
6973d39cad | |||
77b75050b2 | |||
99226f4cb0 | |||
158557e046 | |||
33e94b92f9 | |||
74051a4287 | |||
43e7f3009d | |||
ec642b707e | |||
ae11376f5a | |||
73f8d2b968 | |||
7011e4f353 | |||
6696c4e106 |
@ -110,7 +110,7 @@ namespace CanFly.Canvas.Shape
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否填充多边形。使用:select_fill_color 或 fill_color 填充。
|
||||
/// 是否填充多边形 使用:select_fill_color 或 fill_color 填充
|
||||
/// </summary>
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
///// <summary>
|
||||
///// 清理所有正在使用的资源。
|
||||
///// 清理所有正在使用的资源
|
||||
///// </summary>
|
||||
///// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
///// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
//protected override void Dispose(bool disposing)
|
||||
//{
|
||||
// if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
|
@ -1704,9 +1704,9 @@ namespace CanFly.Canvas.UI
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
|
16
CanFly/Properties/Resources.Designer.cs
generated
16
CanFly/Properties/Resources.Designer.cs
generated
@ -1,10 +1,10 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 此代码由工具生成
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// 重新生成代码,这些更改将会丢失
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@ -13,12 +13,12 @@ namespace XKRS.CanFly.Properties {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
@ -33,7 +33,7 @@ namespace XKRS.CanFly.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
@ -48,7 +48,7 @@ namespace XKRS.CanFly.Properties {
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// 使用此强类型资源类的所有资源查找执行重写
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
@ -61,7 +61,7 @@ namespace XKRS.CanFly.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Close {
|
||||
get {
|
||||
|
8
CanFly/UI/GuidePanel/CtrlTitleBar.Designer.cs
generated
8
CanFly/UI/GuidePanel/CtrlTitleBar.Designer.cs
generated
@ -3,14 +3,14 @@
|
||||
partial class CtrlTitleBar
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
|
@ -142,4 +142,7 @@
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>25</value>
|
||||
</metadata>
|
||||
</root>
|
@ -3,14 +3,14 @@
|
||||
partial class GuideLineCircleCtrl
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
|
160
CanFly/UI/SizePanel/SizeBaseGuideControl.cs
Normal file
160
CanFly/UI/SizePanel/SizeBaseGuideControl.cs
Normal file
@ -0,0 +1,160 @@
|
||||
using CanFly.Canvas.Shape;
|
||||
using CanFly.Canvas.UI;
|
||||
using CanFly.Helper;
|
||||
using DH.Commons.Base;
|
||||
using HalconDotNet;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
|
||||
namespace CanFly.UI.SizePanel
|
||||
{
|
||||
|
||||
public class SizeBaseGuideControl : UserControl
|
||||
{
|
||||
public Action? OnControlCloseEvent;
|
||||
|
||||
public event Action<string,string> OnDataPassed;
|
||||
|
||||
|
||||
private string _currentImageFile;
|
||||
|
||||
public string CurrentImageFile;
|
||||
|
||||
public CameraBase cameraBase;
|
||||
|
||||
protected string _hScriptsDir = Path.Combine(Environment.CurrentDirectory, "hscripts");
|
||||
|
||||
protected HObject? hImage = null;
|
||||
|
||||
protected FlyCanvas _canvas;
|
||||
|
||||
private HDevEngineTool? tool = null;
|
||||
|
||||
|
||||
|
||||
public void DataToTriggerEvent(string input,string output)
|
||||
{
|
||||
|
||||
OnDataPassed?.Invoke(input, output);
|
||||
}
|
||||
|
||||
protected virtual void UpdateShape(FlyShape shape)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected virtual string GetScriptFileName()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 执行Halcon脚本
|
||||
/// </summary>
|
||||
/// <param name="inputImg">输入图像</param>
|
||||
/// <param name="inputDic">输入参数</param>
|
||||
/// <param name="outputParamKeys">输出参数</param>
|
||||
protected void ExecuteHScript(
|
||||
Dictionary<string, HObject> inputImg,
|
||||
Dictionary<string, HTuple> inputDic,
|
||||
List<string> outputParamKeys,
|
||||
Action<Exception>? exceptionHandler = null)
|
||||
{
|
||||
|
||||
string filePath = Path.Combine(_hScriptsDir, GetScriptFileName());
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
MessageBox.Show($"文件 {filePath} 不存在");
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (tool == null)
|
||||
{
|
||||
tool = new HDevEngineTool(_hScriptsDir);
|
||||
tool.LoadProcedure(Path.GetFileNameWithoutExtension(GetScriptFileName()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
//tool.InputImageDic["INPUT_Image"] = hImage;
|
||||
//tool.InputTupleDic["XCenter"] = _x;
|
||||
//tool.InputTupleDic["YCenter"] = _y;
|
||||
//tool.InputTupleDic["Radius"] = _r;
|
||||
|
||||
tool.InputImageDic = inputImg;
|
||||
tool.InputTupleDic = inputDic;
|
||||
|
||||
|
||||
Dictionary<string, HTuple> outputParams = new Dictionary<string, HTuple>();
|
||||
|
||||
|
||||
if (!tool.RunProcedure(out string error, out int timeElasped))
|
||||
{
|
||||
OnExecuteHScriptResult(false, outputParams, timeElasped);
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < outputParamKeys.Count; i++)
|
||||
{
|
||||
string k = outputParamKeys[i];
|
||||
outputParams[k] = tool.GetResultTuple(k);
|
||||
}
|
||||
|
||||
OnExecuteHScriptResult(true, outputParams, timeElasped);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
exceptionHandler?.Invoke(ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
hImage?.Dispose();
|
||||
hImage = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Halcon脚本执行结果回调函数,重写该方法以自行处理算法执行结果
|
||||
/// </summary>
|
||||
/// <param name="success">算法执行是否成功</param>
|
||||
/// <param name="resultDic">算法输出结果</param>
|
||||
/// <param name="timeElasped">算法耗时,单位:ms</param>
|
||||
protected virtual void OnExecuteHScriptResult(bool success, Dictionary<string, HTuple> resultDic, int timeElasped)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
protected void OpenImageFile(Action<Bitmap> callback)
|
||||
{
|
||||
OpenFileDialog ofd = new OpenFileDialog();
|
||||
ofd.Filter = "图像文件|*.jpg;*.jpeg;*.png";
|
||||
ofd.Multiselect = false;
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
CurrentImageFile = ofd.FileName;
|
||||
Bitmap bitmap = (Bitmap)Image.FromFile(CurrentImageFile);
|
||||
callback?.Invoke(bitmap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void OnControlClose()
|
||||
{
|
||||
OnControlCloseEvent?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
120
CanFly/UI/SizePanel/SizeBaseGuideControl.resx
Normal file
120
CanFly/UI/SizePanel/SizeBaseGuideControl.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
77
CanFly/UI/SizePanel/SizeCtrlTitleBar.Designer.cs
generated
Normal file
77
CanFly/UI/SizePanel/SizeCtrlTitleBar.Designer.cs
generated
Normal file
@ -0,0 +1,77 @@
|
||||
namespace CanFly.UI.SizePanel
|
||||
{
|
||||
partial class SizeCtrlTitleBar
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
btnClose = new PictureBox();
|
||||
j = new Label();
|
||||
((System.ComponentModel.ISupportInitialize)btnClose).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
btnClose.Dock = DockStyle.Right;
|
||||
btnClose.Image = XKRS.CanFly.Properties.Resources.Close;
|
||||
btnClose.Location = new Point(516, 3);
|
||||
btnClose.Name = "btnClose";
|
||||
btnClose.Size = new Size(30, 30);
|
||||
btnClose.SizeMode = PictureBoxSizeMode.StretchImage;
|
||||
btnClose.TabIndex = 1;
|
||||
btnClose.TabStop = false;
|
||||
btnClose.Click += btnClose_Click;
|
||||
//
|
||||
// j
|
||||
//
|
||||
j.Dock = DockStyle.Fill;
|
||||
j.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Bold);
|
||||
j.Location = new Point(3, 3);
|
||||
j.Name = "j";
|
||||
j.Size = new Size(513, 30);
|
||||
j.TabIndex = 2;
|
||||
j.Text = "标题";
|
||||
j.TextAlign = ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// SizeCtrlTitleBar
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 17F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
Controls.Add(j);
|
||||
Controls.Add(btnClose);
|
||||
MinimumSize = new Size(0, 36);
|
||||
Name = "SizeCtrlTitleBar";
|
||||
Padding = new Padding(3);
|
||||
Size = new Size(549, 36);
|
||||
((System.ComponentModel.ISupportInitialize)btnClose).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
private PictureBox btnClose;
|
||||
private Label j;
|
||||
}
|
||||
}
|
38
CanFly/UI/SizePanel/SizeCtrlTitleBar.cs
Normal file
38
CanFly/UI/SizePanel/SizeCtrlTitleBar.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace CanFly.UI.SizePanel
|
||||
{
|
||||
public partial class SizeCtrlTitleBar : UserControl
|
||||
{
|
||||
public event Action? OnCloseClicked;
|
||||
|
||||
|
||||
|
||||
[DisplayName("Title")]
|
||||
public string Title
|
||||
{
|
||||
get { return this.j.Text; }
|
||||
set { this.j.Text = value; }
|
||||
}
|
||||
|
||||
|
||||
public SizeCtrlTitleBar()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Dock = DockStyle.Top;
|
||||
}
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
OnCloseClicked?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
364
CanFly/UI/SizePanel/SizeGuideCircleCtrl.Designer.cs
generated
Normal file
364
CanFly/UI/SizePanel/SizeGuideCircleCtrl.Designer.cs
generated
Normal file
@ -0,0 +1,364 @@
|
||||
namespace CanFly.UI.SizePanel
|
||||
{
|
||||
partial class SizeGuideCircleCtrl
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SizeGuideCircleCtrl));
|
||||
splitContainer = new SplitContainer();
|
||||
panel1 = new Panel();
|
||||
canvas = new Canvas.UI.FlyCanvas();
|
||||
statusStrip1 = new StatusStrip();
|
||||
lblStatus = new ToolStripStatusLabel();
|
||||
btnClose = new PictureBox();
|
||||
label4 = new Label();
|
||||
btnExecute = new Button();
|
||||
lblElapsed = new Label();
|
||||
ctrlTitleBar = new SizeCtrlTitleBar();
|
||||
groupBox1 = new GroupBox();
|
||||
label1 = new Label();
|
||||
label2 = new Label();
|
||||
label3 = new Label();
|
||||
tbR = new TextBox();
|
||||
tbY = new TextBox();
|
||||
tbX = new TextBox();
|
||||
btnLoadImage = new Button();
|
||||
btnCreateCircle = new Button();
|
||||
btnSave = new Button();
|
||||
label6 = new Label();
|
||||
lblResult = new Label();
|
||||
panelGuide = new Panel();
|
||||
((System.ComponentModel.ISupportInitialize)splitContainer).BeginInit();
|
||||
splitContainer.Panel1.SuspendLayout();
|
||||
splitContainer.Panel2.SuspendLayout();
|
||||
splitContainer.SuspendLayout();
|
||||
panel1.SuspendLayout();
|
||||
statusStrip1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)btnClose).BeginInit();
|
||||
groupBox1.SuspendLayout();
|
||||
panelGuide.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// splitContainer
|
||||
//
|
||||
splitContainer.Dock = DockStyle.Fill;
|
||||
splitContainer.Location = new Point(0, 0);
|
||||
splitContainer.Name = "splitContainer";
|
||||
//
|
||||
// splitContainer.Panel1
|
||||
//
|
||||
splitContainer.Panel1.Controls.Add(panelGuide);
|
||||
splitContainer.Panel1MinSize = 150;
|
||||
//
|
||||
// splitContainer.Panel2
|
||||
//
|
||||
splitContainer.Panel2.Controls.Add(panel1);
|
||||
splitContainer.Size = new Size(1280, 640);
|
||||
splitContainer.SplitterDistance = 200;
|
||||
splitContainer.TabIndex = 12;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
panel1.BorderStyle = BorderStyle.FixedSingle;
|
||||
panel1.Controls.Add(canvas);
|
||||
panel1.Controls.Add(statusStrip1);
|
||||
panel1.Dock = DockStyle.Fill;
|
||||
panel1.Location = new Point(0, 0);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new Size(1076, 640);
|
||||
panel1.TabIndex = 1;
|
||||
//
|
||||
// canvas
|
||||
//
|
||||
canvas.AllowMultiSelect = false;
|
||||
canvas.CreateMode = Canvas.Shape.ShapeTypeEnum.Polygon;
|
||||
canvas.Dock = DockStyle.Fill;
|
||||
canvas.Enabled = false;
|
||||
canvas.FillDrawing = false;
|
||||
canvas.Location = new Point(0, 0);
|
||||
canvas.Margin = new Padding(2);
|
||||
canvas.Name = "canvas";
|
||||
canvas.OutsideShapes = (List<Canvas.Shape.FlyShape>)resources.GetObject("canvas.OutsideShapes");
|
||||
canvas.Scale = 1F;
|
||||
canvas.Shapes = (List<Canvas.Shape.FlyShape>)resources.GetObject("canvas.Shapes");
|
||||
canvas.Size = new Size(1074, 616);
|
||||
canvas.TabIndex = 2;
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
statusStrip1.Items.AddRange(new ToolStripItem[] { lblStatus });
|
||||
statusStrip1.Location = new Point(0, 616);
|
||||
statusStrip1.Name = "statusStrip1";
|
||||
statusStrip1.Size = new Size(1074, 22);
|
||||
statusStrip1.TabIndex = 1;
|
||||
statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// lblStatus
|
||||
//
|
||||
lblStatus.Name = "lblStatus";
|
||||
lblStatus.Size = new Size(44, 17);
|
||||
lblStatus.Text = " ";
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
btnClose.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
btnClose.Image = XKRS.CanFly.Properties.Resources.Close;
|
||||
btnClose.InitialImage = XKRS.CanFly.Properties.Resources.Close;
|
||||
btnClose.Location = new Point(1102, 3);
|
||||
btnClose.Name = "btnClose";
|
||||
btnClose.Size = new Size(33, 33);
|
||||
btnClose.SizeMode = PictureBoxSizeMode.StretchImage;
|
||||
btnClose.TabIndex = 5;
|
||||
btnClose.TabStop = false;
|
||||
btnClose.Click += btnClose_Click;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
label4.AutoSize = true;
|
||||
label4.Location = new Point(6, 307);
|
||||
label4.Name = "label4";
|
||||
label4.Size = new Size(44, 17);
|
||||
label4.TabIndex = 3;
|
||||
label4.Text = "耗时:";
|
||||
//
|
||||
// btnExecute
|
||||
//
|
||||
btnExecute.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnExecute.Location = new Point(6, 272);
|
||||
btnExecute.Name = "btnExecute";
|
||||
btnExecute.Size = new Size(186, 32);
|
||||
btnExecute.TabIndex = 2;
|
||||
btnExecute.Text = "执行";
|
||||
btnExecute.UseVisualStyleBackColor = true;
|
||||
btnExecute.Click += btnExecute_Click;
|
||||
//
|
||||
// lblElapsed
|
||||
//
|
||||
lblElapsed.AutoSize = true;
|
||||
lblElapsed.Location = new Point(56, 307);
|
||||
lblElapsed.Name = "lblElapsed";
|
||||
lblElapsed.Size = new Size(32, 17);
|
||||
lblElapsed.TabIndex = 4;
|
||||
lblElapsed.Text = "0ms";
|
||||
//
|
||||
// ctrlTitleBar
|
||||
//
|
||||
ctrlTitleBar.Dock = DockStyle.Top;
|
||||
ctrlTitleBar.Location = new Point(0, 0);
|
||||
ctrlTitleBar.MinimumSize = new Size(0, 36);
|
||||
ctrlTitleBar.Name = "ctrlTitleBar";
|
||||
ctrlTitleBar.Padding = new Padding(3);
|
||||
ctrlTitleBar.Size = new Size(198, 36);
|
||||
ctrlTitleBar.TabIndex = 11;
|
||||
ctrlTitleBar.Title = "圆形测量";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
groupBox1.Controls.Add(tbX);
|
||||
groupBox1.Controls.Add(tbY);
|
||||
groupBox1.Controls.Add(tbR);
|
||||
groupBox1.Controls.Add(label3);
|
||||
groupBox1.Controls.Add(label2);
|
||||
groupBox1.Controls.Add(label1);
|
||||
groupBox1.Dock = DockStyle.Top;
|
||||
groupBox1.Location = new Point(0, 36);
|
||||
groupBox1.Name = "groupBox1";
|
||||
groupBox1.Size = new Size(198, 116);
|
||||
groupBox1.TabIndex = 12;
|
||||
groupBox1.TabStop = false;
|
||||
groupBox1.Text = "圆参数";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.AutoSize = true;
|
||||
label1.Location = new Point(6, 25);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(19, 17);
|
||||
label1.TabIndex = 0;
|
||||
label1.Text = "X:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.AutoSize = true;
|
||||
label2.Location = new Point(6, 54);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new Size(18, 17);
|
||||
label2.TabIndex = 1;
|
||||
label2.Text = "Y:";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
label3.AutoSize = true;
|
||||
label3.Location = new Point(3, 83);
|
||||
label3.Name = "label3";
|
||||
label3.Size = new Size(44, 17);
|
||||
label3.TabIndex = 2;
|
||||
label3.Text = "半径:";
|
||||
//
|
||||
// tbR
|
||||
//
|
||||
tbR.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbR.Location = new Point(56, 80);
|
||||
tbR.Name = "tbR";
|
||||
tbR.Size = new Size(136, 23);
|
||||
tbR.TabIndex = 3;
|
||||
//
|
||||
// tbY
|
||||
//
|
||||
tbY.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbY.Location = new Point(56, 51);
|
||||
tbY.Name = "tbY";
|
||||
tbY.Size = new Size(136, 23);
|
||||
tbY.TabIndex = 4;
|
||||
//
|
||||
// tbX
|
||||
//
|
||||
tbX.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbX.Location = new Point(56, 22);
|
||||
tbX.Name = "tbX";
|
||||
tbX.Size = new Size(136, 23);
|
||||
tbX.TabIndex = 5;
|
||||
//
|
||||
// btnLoadImage
|
||||
//
|
||||
btnLoadImage.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnLoadImage.Location = new Point(6, 158);
|
||||
btnLoadImage.Name = "btnLoadImage";
|
||||
btnLoadImage.Size = new Size(186, 32);
|
||||
btnLoadImage.TabIndex = 13;
|
||||
btnLoadImage.Text = "打开图片";
|
||||
btnLoadImage.UseVisualStyleBackColor = true;
|
||||
btnLoadImage.Click += btnLoadImage_Click;
|
||||
//
|
||||
// btnCreateCircle
|
||||
//
|
||||
btnCreateCircle.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnCreateCircle.Location = new Point(6, 196);
|
||||
btnCreateCircle.Name = "btnCreateCircle";
|
||||
btnCreateCircle.Size = new Size(186, 32);
|
||||
btnCreateCircle.TabIndex = 14;
|
||||
btnCreateCircle.Text = "创建圆形";
|
||||
btnCreateCircle.UseVisualStyleBackColor = true;
|
||||
btnCreateCircle.Click += btnCreateCircle_Click;
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
btnSave.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnSave.Location = new Point(9, 397);
|
||||
btnSave.Name = "btnSave";
|
||||
btnSave.Size = new Size(186, 32);
|
||||
btnSave.TabIndex = 15;
|
||||
btnSave.Text = "保存数据";
|
||||
btnSave.UseVisualStyleBackColor = true;
|
||||
btnSave.Click += btnSave_Click;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
label6.AutoSize = true;
|
||||
label6.Location = new Point(6, 338);
|
||||
label6.Name = "label6";
|
||||
label6.Size = new Size(44, 17);
|
||||
label6.TabIndex = 16;
|
||||
label6.Text = "结果:";
|
||||
//
|
||||
// lblResult
|
||||
//
|
||||
lblResult.AutoSize = true;
|
||||
lblResult.Location = new Point(56, 338);
|
||||
lblResult.Name = "lblResult";
|
||||
lblResult.Size = new Size(20, 17);
|
||||
lblResult.TabIndex = 17;
|
||||
lblResult.Text = "无";
|
||||
//
|
||||
// panelGuide
|
||||
//
|
||||
panelGuide.BorderStyle = BorderStyle.FixedSingle;
|
||||
panelGuide.Controls.Add(lblResult);
|
||||
panelGuide.Controls.Add(label6);
|
||||
panelGuide.Controls.Add(btnSave);
|
||||
panelGuide.Controls.Add(btnCreateCircle);
|
||||
panelGuide.Controls.Add(btnLoadImage);
|
||||
panelGuide.Controls.Add(groupBox1);
|
||||
panelGuide.Controls.Add(ctrlTitleBar);
|
||||
panelGuide.Controls.Add(lblElapsed);
|
||||
panelGuide.Controls.Add(btnExecute);
|
||||
panelGuide.Controls.Add(label4);
|
||||
panelGuide.Dock = DockStyle.Fill;
|
||||
panelGuide.Location = new Point(0, 0);
|
||||
panelGuide.Name = "panelGuide";
|
||||
panelGuide.Size = new Size(200, 640);
|
||||
panelGuide.TabIndex = 0;
|
||||
//
|
||||
// GuideCircleCtrl
|
||||
//
|
||||
Controls.Add(splitContainer);
|
||||
Controls.Add(btnClose);
|
||||
Name = "GuideCircleCtrl";
|
||||
Size = new Size(1280, 640);
|
||||
splitContainer.Panel1.ResumeLayout(false);
|
||||
splitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)splitContainer).EndInit();
|
||||
splitContainer.ResumeLayout(false);
|
||||
panel1.ResumeLayout(false);
|
||||
panel1.PerformLayout();
|
||||
statusStrip1.ResumeLayout(false);
|
||||
statusStrip1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)btnClose).EndInit();
|
||||
groupBox1.ResumeLayout(false);
|
||||
groupBox1.PerformLayout();
|
||||
panelGuide.ResumeLayout(false);
|
||||
panelGuide.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private SplitContainer splitContainer;
|
||||
private Panel panel1;
|
||||
private Canvas.UI.FlyCanvas canvas;
|
||||
private StatusStrip statusStrip1;
|
||||
private ToolStripStatusLabel lblStatus;
|
||||
private PictureBox btnClose;
|
||||
private Panel panelGuide;
|
||||
private Label lblResult;
|
||||
private Label label6;
|
||||
private Button btnSave;
|
||||
private Button btnCreateCircle;
|
||||
private Button btnLoadImage;
|
||||
private GroupBox groupBox1;
|
||||
private TextBox tbX;
|
||||
private TextBox tbY;
|
||||
private TextBox tbR;
|
||||
private Label label3;
|
||||
private Label label2;
|
||||
private Label label1;
|
||||
private SizeCtrlTitleBar ctrlTitleBar;
|
||||
private Label lblElapsed;
|
||||
private Button btnExecute;
|
||||
private Label label4;
|
||||
}
|
||||
}
|
361
CanFly/UI/SizePanel/SizeGuideCircleCtrl.cs
Normal file
361
CanFly/UI/SizePanel/SizeGuideCircleCtrl.cs
Normal file
@ -0,0 +1,361 @@
|
||||
using CanFly.Canvas.Shape;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using CanFly.Canvas.Helper;
|
||||
using CanFly.Helper;
|
||||
using HalconDotNet;
|
||||
using System.Diagnostics;
|
||||
using CanFly.Canvas.UI;
|
||||
|
||||
|
||||
namespace CanFly.UI.SizePanel
|
||||
{
|
||||
public partial class SizeGuideCircleCtrl : SizeBaseGuideControl
|
||||
{
|
||||
|
||||
private float _x;
|
||||
private float _y;
|
||||
private float _r;
|
||||
private FlyShape? _circle;
|
||||
|
||||
|
||||
protected override string GetScriptFileName() => "CircleMeasure.hdvp";
|
||||
|
||||
|
||||
|
||||
|
||||
public SizeGuideCircleCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
this.canvas.mouseMoved += Canvas_mouseMoved;
|
||||
this.canvas.OnShapeUpdateEvent += UpdateShape;
|
||||
this.canvas.selectionChanged += Canvas_selectionChanged;
|
||||
|
||||
this.canvas.OnShapeMoving += Canvas_OnShapeMoving;
|
||||
this.canvas.newShape += Canvas_newShape;
|
||||
|
||||
this.ctrlTitleBar.OnCloseClicked += OnControlClose;
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected override void UpdateShape(FlyShape shape)
|
||||
{
|
||||
this._circle = shape;
|
||||
|
||||
_x = shape.Points[0].X;
|
||||
_y = shape.Points[0].Y;
|
||||
_r = PointHelper.Distance(shape.Points[0], shape.Points[1]);
|
||||
|
||||
this.tbX.Text = shape.Points[0].X.ToString("F3");
|
||||
this.tbY.Text = shape.Points[0].Y.ToString("F3");
|
||||
this.tbR.Text = _r.ToString("F3");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void btnExecute_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
if (this.canvas.pixmap == null)
|
||||
{
|
||||
MessageBox.Show("请先打开图片");
|
||||
return;
|
||||
}
|
||||
if(this.tbX.Text.Trim().Length == 0)
|
||||
{
|
||||
MessageBox.Show("请先创建圆形");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
this.canvas.OutsideShapes.Clear();
|
||||
this.canvas.Invalidate();
|
||||
|
||||
flag = new List<double>();
|
||||
x = new List<double>();
|
||||
y = new List<double>();
|
||||
r = new List<double>();
|
||||
Dictionary<string, HObject> inputImg = new Dictionary<string, HObject>();
|
||||
|
||||
if (hImage == null)
|
||||
{
|
||||
HOperatorSet.ReadImage(out hImage, CurrentImageFile);
|
||||
}
|
||||
inputImg["INPUT_Image"] = hImage;
|
||||
|
||||
Dictionary<string, HTuple> inputPara = new Dictionary<string, HTuple>();
|
||||
|
||||
|
||||
inputPara["XCenter"] = _x;
|
||||
inputPara["YCenter"] = _y;
|
||||
inputPara["Radius"] = _r;
|
||||
|
||||
|
||||
List<string> outputKeys = new List<string>()
|
||||
{
|
||||
"OUTPUT_PreTreatedImage",
|
||||
"OUTPUT_Flag",
|
||||
"RXCenter",
|
||||
"RYCenter",
|
||||
"RRadius"
|
||||
};
|
||||
|
||||
ExecuteHScript(
|
||||
inputImg,
|
||||
inputPara,
|
||||
outputKeys);
|
||||
|
||||
}
|
||||
List<double> flag = new List<double>(), x=new List<double>(),y=new List<double>(),r=new List<double>();
|
||||
|
||||
protected override void OnExecuteHScriptResult(
|
||||
bool success,
|
||||
Dictionary<string, HTuple> resultDic,
|
||||
int timeElasped)
|
||||
{
|
||||
if (!success)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
"OUTPUT_Flag",
|
||||
"RXCenter",
|
||||
"RYCenter",
|
||||
"RRadius"
|
||||
*/
|
||||
|
||||
//取图?????
|
||||
|
||||
|
||||
|
||||
flag = resultDic["OUTPUT_Flag"].HTupleToDouble();
|
||||
x = resultDic["RXCenter"].HTupleToDouble();
|
||||
y = resultDic["RYCenter"].HTupleToDouble();
|
||||
r = resultDic["RRadius"].HTupleToDouble();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (flag.Count > 0)
|
||||
{
|
||||
lblResult.Text = flag[0].ToString();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
lblResult.Text = "无";
|
||||
}
|
||||
if (flag.Count > 0 && x.Count > 0 && y.Count > 0 && r.Count > 0)
|
||||
{
|
||||
|
||||
//detectResult.VisionImageSet.MLImage = resultDic["RRadius"].GetResultObject("OUTPUT_PreTreatedImage");
|
||||
this.canvas.DrawCircle(new PointF((float)x[0], (float)y[0]), (float)r[0]);
|
||||
lblElapsed.Text = $"{timeElasped} ms";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void Test()
|
||||
{
|
||||
string filePath = Path.Combine(_hScriptsDir, GetScriptFileName());
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
MessageBox.Show($"文件 {filePath} 不存在");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
HDevEngineTool tool = new HDevEngineTool(_hScriptsDir);
|
||||
tool.LoadProcedure(Path.GetFileNameWithoutExtension(GetScriptFileName()));
|
||||
|
||||
|
||||
if (hImage == null)
|
||||
{
|
||||
HOperatorSet.ReadImage(out hImage, CurrentImageFile);
|
||||
}
|
||||
|
||||
tool.InputImageDic["INPUT_Image"] = hImage;
|
||||
tool.InputTupleDic["XCenter"] = _x;
|
||||
tool.InputTupleDic["YCenter"] = _y;
|
||||
tool.InputTupleDic["Radius"] = _r;
|
||||
|
||||
|
||||
|
||||
if (!tool.RunProcedure(out string error, out int timeElasped))
|
||||
{
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
HTuple hFlag = tool.GetResultTuple("OUTPUT_Flag");
|
||||
|
||||
var flag = tool.GetResultTuple("OUTPUT_Flag").HTupleToDouble();
|
||||
List<double> x = tool.GetResultTuple("RXCenter").HTupleToDouble();
|
||||
var y = tool.GetResultTuple("RYCenter").HTupleToDouble();
|
||||
var r = tool.GetResultTuple("RRadius").HTupleToDouble();
|
||||
if (flag.Count > 0)
|
||||
{
|
||||
lblResult.Text = flag[0].ToString();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
lblResult.Text = "无";
|
||||
}
|
||||
if (flag.Count > 0 && x.Count > 0 && y.Count > 0 && r.Count > 0)
|
||||
{
|
||||
this.canvas.DrawCircle(new PointF((float)x[0], (float)y[0]), (float)r[0]);
|
||||
lblElapsed.Text = $"{timeElasped} ms";
|
||||
}
|
||||
|
||||
//
|
||||
Debug.WriteLine("");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
hImage?.Dispose();
|
||||
hImage = null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
OnControlCloseEvent?.Invoke();
|
||||
}
|
||||
|
||||
private void btnLoadImage_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenImageFile(bitmap =>
|
||||
{
|
||||
this.canvas.LoadPixmap(bitmap);
|
||||
this.canvas.Enabled = true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void Canvas_mouseMoved(PointF pos)
|
||||
{
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke(Canvas_mouseMoved, pos);
|
||||
return;
|
||||
}
|
||||
|
||||
lblStatus.Text = $"X:{pos.X}, Y:{pos.Y}";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void Canvas_selectionChanged(List<FlyShape> shapes)
|
||||
{
|
||||
//if (shapes.Count != 1)
|
||||
//{
|
||||
// // panelGuide.Controls.Clear();
|
||||
// return;
|
||||
//}
|
||||
//SwitchGuideForm(shapes[0].ShapeType);
|
||||
// Canvas_OnShapeUpdateEvent(shapes[0]);
|
||||
|
||||
if (shapes.Count != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
UpdateShape(shapes[0]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void Canvas_OnShapeMoving(List<FlyShape> shapes)
|
||||
{
|
||||
if (shapes.Count != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
UpdateShape(shapes[0]);
|
||||
}
|
||||
|
||||
private void btnCreateCircle_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.canvas.pixmap == null)
|
||||
{
|
||||
MessageBox.Show("请先打开图片");
|
||||
return;
|
||||
}
|
||||
this.tbX.Text = string.Empty;
|
||||
this.tbY.Text = string.Empty;
|
||||
this.tbR.Text = string.Empty;
|
||||
this.canvas.Shapes.Clear();
|
||||
this.canvas.Invalidate();
|
||||
this.canvas.StartDraw(ShapeTypeEnum.Circle);
|
||||
this.canvas.Enabled = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void Canvas_newShape()
|
||||
{
|
||||
|
||||
this.canvas.StopDraw();
|
||||
}
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lblResult.Text.Equals("无"))
|
||||
{
|
||||
MessageBox.Show("请先进行绘制");
|
||||
return;
|
||||
}
|
||||
if(lblResult.Text != "0")
|
||||
{
|
||||
MessageBox.Show("测量计算错误,无法保存");
|
||||
return;
|
||||
}
|
||||
|
||||
//List<double> x = tool.GetResultTuple("RXCenter").HTupleToDouble();
|
||||
//var y = tool.GetResultTuple("RYCenter").HTupleToDouble();
|
||||
//var r = tool.GetResultTuple("RRadius").HTupleToDouble();
|
||||
//tool.InputTupleDic["XCenter"] = _x;
|
||||
//tool.InputTupleDic["YCenter"] = _y;
|
||||
//tool.InputTupleDic["Radius"] = _r;
|
||||
string inputput = $"XCenter:{string.Join(";", _x)};YCenter:{string.Join(";", _y)};RRadius:{string.Join(";", _r)}";
|
||||
string output = $"RXCenter:{string.Join(";", x[0])};RYCenter:{string.Join(";", y[0])};RRadius:{string.Join(";", r[0])}";
|
||||
|
||||
DataToTriggerEvent(inputput,output);
|
||||
}
|
||||
}
|
||||
}
|
145
CanFly/UI/SizePanel/SizeGuideCircleCtrl.resx
Normal file
145
CanFly/UI/SizePanel/SizeGuideCircleCtrl.resx
Normal file
@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="canvas.OutsideShapes" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAERDYW5GbHkuQ2FudmFzLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1
|
||||
cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAQBAAAAdlN5c3RlbS5Db2xsZWN0aW9ucy5HZW5l
|
||||
cmljLkxpc3RgMVtbQ2FuRmx5LkNhbnZhcy5TaGFwZS5GbHlTaGFwZSwgQ2FuRmx5LkNhbnZhcywgQ3Vs
|
||||
dHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsXV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lv
|
||||
bgQAAB5DYW5GbHkuQ2FudmFzLlNoYXBlLkZseVNoYXBlW10CAAAACAgJAwAAAAAAAAAAAAAADAQAAAAz
|
||||
Q2FuRmx5LkNhbnZhcywgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBwMAAAAAAQAA
|
||||
AAAAAAAEHENhbkZseS5DYW52YXMuU2hhcGUuRmx5U2hhcGUEAAAACw==
|
||||
</value>
|
||||
</data>
|
||||
<data name="canvas.Shapes" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAERDYW5GbHkuQ2FudmFzLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1
|
||||
cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAQBAAAAdlN5c3RlbS5Db2xsZWN0aW9ucy5HZW5l
|
||||
cmljLkxpc3RgMVtbQ2FuRmx5LkNhbnZhcy5TaGFwZS5GbHlTaGFwZSwgQ2FuRmx5LkNhbnZhcywgQ3Vs
|
||||
dHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsXV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lv
|
||||
bgQAAB5DYW5GbHkuQ2FudmFzLlNoYXBlLkZseVNoYXBlW10CAAAACAgJAwAAAAAAAAAAAAAADAQAAAAz
|
||||
Q2FuRmx5LkNhbnZhcywgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBwMAAAAAAQAA
|
||||
AAAAAAAEHENhbkZseS5DYW52YXMuU2hhcGUuRmx5U2hhcGUEAAAACw==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
471
CanFly/UI/SizePanel/SizeGuideHeightCtrl.Designer.cs
generated
Normal file
471
CanFly/UI/SizePanel/SizeGuideHeightCtrl.Designer.cs
generated
Normal file
@ -0,0 +1,471 @@
|
||||
namespace CanFly.UI.SizePanel
|
||||
{
|
||||
partial class SizeGuideHeightCtrl
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SizeGuideHeightCtrl));
|
||||
splitter1 = new AntdUI.Splitter();
|
||||
panel1 = new AntdUI.Panel();
|
||||
canvas = new Canvas.UI.FlyCanvas();
|
||||
panel2 = new AntdUI.Panel();
|
||||
ctrlTitleBar = new GuidePanel.CtrlTitleBar();
|
||||
statusStrip1 = new StatusStrip();
|
||||
lblStatus = new ToolStripStatusLabel();
|
||||
groupBox2 = new GroupBox();
|
||||
tbLineX1 = new AntdUI.Input();
|
||||
label1 = new AntdUI.Label();
|
||||
label4 = new AntdUI.Label();
|
||||
tbLineY1 = new AntdUI.Input();
|
||||
label3 = new AntdUI.Label();
|
||||
tbLineY2 = new AntdUI.Input();
|
||||
label5 = new AntdUI.Label();
|
||||
tbLineX2 = new AntdUI.Input();
|
||||
label6 = new AntdUI.Label();
|
||||
label7 = new AntdUI.Label();
|
||||
tbwidth = new AntdUI.Input();
|
||||
tbheight = new AntdUI.Input();
|
||||
label2 = new AntdUI.Label();
|
||||
CamName = new AntdUI.Input();
|
||||
groupBox1 = new GroupBox();
|
||||
switch1 = new AntdUI.Switch();
|
||||
label8 = new AntdUI.Label();
|
||||
button1 = new AntdUI.Button();
|
||||
button2 = new AntdUI.Button();
|
||||
button3 = new AntdUI.Button();
|
||||
label9 = new AntdUI.Label();
|
||||
lblElapsed = new AntdUI.Label();
|
||||
lblResult = new AntdUI.Label();
|
||||
label12 = new AntdUI.Label();
|
||||
btnSave = new AntdUI.Button();
|
||||
((System.ComponentModel.ISupportInitialize)splitter1).BeginInit();
|
||||
splitter1.Panel1.SuspendLayout();
|
||||
splitter1.Panel2.SuspendLayout();
|
||||
splitter1.SuspendLayout();
|
||||
panel1.SuspendLayout();
|
||||
panel2.SuspendLayout();
|
||||
statusStrip1.SuspendLayout();
|
||||
groupBox2.SuspendLayout();
|
||||
groupBox1.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// splitter1
|
||||
//
|
||||
splitter1.Dock = DockStyle.Fill;
|
||||
splitter1.Location = new Point(0, 0);
|
||||
splitter1.Name = "splitter1";
|
||||
//
|
||||
// splitter1.Panel1
|
||||
//
|
||||
splitter1.Panel1.Controls.Add(panel2);
|
||||
//
|
||||
// splitter1.Panel2
|
||||
//
|
||||
splitter1.Panel2.Controls.Add(panel1);
|
||||
splitter1.Size = new Size(1280, 640);
|
||||
splitter1.SplitterDistance = 286;
|
||||
splitter1.TabIndex = 0;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
panel1.Controls.Add(statusStrip1);
|
||||
panel1.Controls.Add(canvas);
|
||||
panel1.Dock = DockStyle.Fill;
|
||||
panel1.Location = new Point(0, 0);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new Size(990, 640);
|
||||
panel1.TabIndex = 0;
|
||||
panel1.Text = "panel1";
|
||||
//
|
||||
// canvas
|
||||
//
|
||||
canvas.AllowMultiSelect = false;
|
||||
canvas.CreateMode = Canvas.Shape.ShapeTypeEnum.Polygon;
|
||||
canvas.Dock = DockStyle.Fill;
|
||||
canvas.FillDrawing = false;
|
||||
canvas.Location = new Point(0, 0);
|
||||
canvas.Margin = new Padding(2);
|
||||
canvas.Name = "canvas";
|
||||
canvas.OutsideShapes = (List<Canvas.Shape.FlyShape>)resources.GetObject("canvas.OutsideShapes");
|
||||
canvas.Scale = 1F;
|
||||
canvas.Shapes = (List<Canvas.Shape.FlyShape>)resources.GetObject("canvas.Shapes");
|
||||
canvas.Size = new Size(990, 640);
|
||||
canvas.TabIndex = 0;
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
panel2.Controls.Add(btnSave);
|
||||
panel2.Controls.Add(lblResult);
|
||||
panel2.Controls.Add(label12);
|
||||
panel2.Controls.Add(lblElapsed);
|
||||
panel2.Controls.Add(label9);
|
||||
panel2.Controls.Add(button3);
|
||||
panel2.Controls.Add(button2);
|
||||
panel2.Controls.Add(groupBox1);
|
||||
panel2.Controls.Add(groupBox2);
|
||||
panel2.Controls.Add(ctrlTitleBar);
|
||||
panel2.Dock = DockStyle.Fill;
|
||||
panel2.Location = new Point(0, 0);
|
||||
panel2.Name = "panel2";
|
||||
panel2.Size = new Size(286, 640);
|
||||
panel2.TabIndex = 0;
|
||||
panel2.Text = "panel2";
|
||||
//
|
||||
// ctrlTitleBar
|
||||
//
|
||||
ctrlTitleBar.Dock = DockStyle.Top;
|
||||
ctrlTitleBar.Location = new Point(0, 0);
|
||||
ctrlTitleBar.MinimumSize = new Size(0, 36);
|
||||
ctrlTitleBar.Name = "ctrlTitleBar";
|
||||
ctrlTitleBar.Padding = new Padding(3);
|
||||
ctrlTitleBar.Size = new Size(286, 36);
|
||||
ctrlTitleBar.TabIndex = 12;
|
||||
ctrlTitleBar.Title = "高度测量";
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
statusStrip1.Items.AddRange(new ToolStripItem[] { lblStatus });
|
||||
statusStrip1.Location = new Point(0, 618);
|
||||
statusStrip1.Name = "statusStrip1";
|
||||
statusStrip1.Size = new Size(990, 22);
|
||||
statusStrip1.TabIndex = 2;
|
||||
statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// lblStatus
|
||||
//
|
||||
lblStatus.Name = "lblStatus";
|
||||
lblStatus.Size = new Size(44, 17);
|
||||
lblStatus.Text = " ";
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
groupBox2.Controls.Add(tbheight);
|
||||
groupBox2.Controls.Add(tbwidth);
|
||||
groupBox2.Controls.Add(label7);
|
||||
groupBox2.Controls.Add(label6);
|
||||
groupBox2.Controls.Add(label3);
|
||||
groupBox2.Controls.Add(tbLineY2);
|
||||
groupBox2.Controls.Add(label5);
|
||||
groupBox2.Controls.Add(tbLineX2);
|
||||
groupBox2.Controls.Add(label4);
|
||||
groupBox2.Controls.Add(tbLineY1);
|
||||
groupBox2.Controls.Add(label1);
|
||||
groupBox2.Controls.Add(tbLineX1);
|
||||
groupBox2.Dock = DockStyle.Top;
|
||||
groupBox2.Location = new Point(0, 36);
|
||||
groupBox2.Name = "groupBox2";
|
||||
groupBox2.Size = new Size(286, 229);
|
||||
groupBox2.TabIndex = 14;
|
||||
groupBox2.TabStop = false;
|
||||
groupBox2.Text = "线参数";
|
||||
//
|
||||
// tbLineX1
|
||||
//
|
||||
tbLineX1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLineX1.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
tbLineX1.Location = new Point(62, 22);
|
||||
tbLineX1.Name = "tbLineX1";
|
||||
tbLineX1.Radius = 3;
|
||||
tbLineX1.Size = new Size(214, 32);
|
||||
tbLineX1.TabIndex = 17;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.Location = new Point(6, 22);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(38, 32);
|
||||
label1.TabIndex = 19;
|
||||
label1.Text = " X1:";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
label4.Location = new Point(6, 60);
|
||||
label4.Name = "label4";
|
||||
label4.Size = new Size(38, 32);
|
||||
label4.TabIndex = 23;
|
||||
label4.Text = " Y1:";
|
||||
//
|
||||
// tbLineY1
|
||||
//
|
||||
tbLineY1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLineY1.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
tbLineY1.Location = new Point(62, 60);
|
||||
tbLineY1.Name = "tbLineY1";
|
||||
tbLineY1.Radius = 3;
|
||||
tbLineY1.Size = new Size(214, 32);
|
||||
tbLineY1.TabIndex = 22;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
label3.Location = new Point(6, 136);
|
||||
label3.Name = "label3";
|
||||
label3.Size = new Size(38, 32);
|
||||
label3.TabIndex = 27;
|
||||
label3.Text = " Y2:";
|
||||
//
|
||||
// tbLineY2
|
||||
//
|
||||
tbLineY2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLineY2.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
tbLineY2.Location = new Point(62, 136);
|
||||
tbLineY2.Name = "tbLineY2";
|
||||
tbLineY2.Radius = 3;
|
||||
tbLineY2.Size = new Size(214, 32);
|
||||
tbLineY2.TabIndex = 26;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
label5.Location = new Point(6, 98);
|
||||
label5.Name = "label5";
|
||||
label5.Size = new Size(38, 32);
|
||||
label5.TabIndex = 25;
|
||||
label5.Text = " X2:";
|
||||
//
|
||||
// tbLineX2
|
||||
//
|
||||
tbLineX2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLineX2.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
tbLineX2.Location = new Point(62, 98);
|
||||
tbLineX2.Name = "tbLineX2";
|
||||
tbLineX2.Radius = 3;
|
||||
tbLineX2.Size = new Size(214, 32);
|
||||
tbLineX2.TabIndex = 24;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
label6.Location = new Point(6, 174);
|
||||
label6.Name = "label6";
|
||||
label6.Size = new Size(50, 32);
|
||||
label6.TabIndex = 28;
|
||||
label6.Text = " 宽:";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
label7.Location = new Point(145, 177);
|
||||
label7.Name = "label7";
|
||||
label7.Size = new Size(29, 32);
|
||||
label7.TabIndex = 29;
|
||||
label7.Text = "高:";
|
||||
//
|
||||
// tbwidth
|
||||
//
|
||||
tbwidth.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbwidth.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
tbwidth.Location = new Point(62, 177);
|
||||
tbwidth.Name = "tbwidth";
|
||||
tbwidth.Radius = 3;
|
||||
tbwidth.Size = new Size(77, 32);
|
||||
tbwidth.TabIndex = 30;
|
||||
//
|
||||
// tbheight
|
||||
//
|
||||
tbheight.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbheight.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
tbheight.Location = new Point(180, 177);
|
||||
tbheight.Name = "tbheight";
|
||||
tbheight.Radius = 3;
|
||||
tbheight.Size = new Size(96, 32);
|
||||
tbheight.TabIndex = 31;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.Location = new Point(6, 22);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new Size(55, 32);
|
||||
label2.TabIndex = 1;
|
||||
label2.Text = "相机名:";
|
||||
//
|
||||
// CamName
|
||||
//
|
||||
CamName.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
CamName.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
CamName.Location = new Point(64, 22);
|
||||
CamName.Name = "CamName";
|
||||
CamName.Radius = 3;
|
||||
CamName.ReadOnly = true;
|
||||
CamName.Size = new Size(212, 32);
|
||||
CamName.TabIndex = 18;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
groupBox1.Controls.Add(button1);
|
||||
groupBox1.Controls.Add(label8);
|
||||
groupBox1.Controls.Add(switch1);
|
||||
groupBox1.Controls.Add(label2);
|
||||
groupBox1.Controls.Add(CamName);
|
||||
groupBox1.Dock = DockStyle.Top;
|
||||
groupBox1.Location = new Point(0, 265);
|
||||
groupBox1.Name = "groupBox1";
|
||||
groupBox1.Size = new Size(286, 105);
|
||||
groupBox1.TabIndex = 19;
|
||||
groupBox1.TabStop = false;
|
||||
groupBox1.Text = "相机控制";
|
||||
//
|
||||
// switch1
|
||||
//
|
||||
switch1.Location = new Point(67, 60);
|
||||
switch1.Name = "switch1";
|
||||
switch1.Size = new Size(72, 32);
|
||||
switch1.TabIndex = 19;
|
||||
switch1.Text = "switch1";
|
||||
//
|
||||
// label8
|
||||
//
|
||||
label8.Location = new Point(6, 60);
|
||||
label8.Name = "label8";
|
||||
label8.Size = new Size(55, 32);
|
||||
label8.TabIndex = 20;
|
||||
label8.Text = "硬触发:";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
button1.Location = new Point(145, 60);
|
||||
button1.Name = "button1";
|
||||
button1.Size = new Size(131, 32);
|
||||
button1.TabIndex = 21;
|
||||
button1.Text = "软触发一次";
|
||||
//
|
||||
// button2
|
||||
//
|
||||
button2.Location = new Point(0, 376);
|
||||
button2.Name = "button2";
|
||||
button2.Size = new Size(276, 37);
|
||||
button2.TabIndex = 22;
|
||||
button2.Text = "创建矩形";
|
||||
button2.Type = AntdUI.TTypeMini.Primary;
|
||||
//
|
||||
// button3
|
||||
//
|
||||
button3.Location = new Point(0, 419);
|
||||
button3.Name = "button3";
|
||||
button3.Size = new Size(276, 36);
|
||||
button3.TabIndex = 23;
|
||||
button3.Text = "执行";
|
||||
button3.Type = AntdUI.TTypeMini.Primary;
|
||||
//
|
||||
// label9
|
||||
//
|
||||
label9.Location = new Point(6, 461);
|
||||
label9.Name = "label9";
|
||||
label9.Size = new Size(50, 23);
|
||||
label9.TabIndex = 24;
|
||||
label9.Text = "耗时:";
|
||||
//
|
||||
// lblElapsed
|
||||
//
|
||||
lblElapsed.Location = new Point(67, 461);
|
||||
lblElapsed.Name = "lblElapsed";
|
||||
lblElapsed.Size = new Size(72, 23);
|
||||
lblElapsed.TabIndex = 25;
|
||||
lblElapsed.Text = "0 ms";
|
||||
//
|
||||
// lblResult
|
||||
//
|
||||
lblResult.Location = new Point(67, 490);
|
||||
lblResult.Name = "lblResult";
|
||||
lblResult.Size = new Size(72, 23);
|
||||
lblResult.TabIndex = 27;
|
||||
lblResult.Text = "无";
|
||||
//
|
||||
// label12
|
||||
//
|
||||
label12.Location = new Point(6, 490);
|
||||
label12.Name = "label12";
|
||||
label12.Size = new Size(50, 23);
|
||||
label12.TabIndex = 26;
|
||||
label12.Text = "结果:";
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
btnSave.Location = new Point(0, 519);
|
||||
btnSave.Name = "btnSave";
|
||||
btnSave.Size = new Size(276, 36);
|
||||
btnSave.TabIndex = 28;
|
||||
btnSave.Text = "保存数据";
|
||||
btnSave.Type = AntdUI.TTypeMini.Primary;
|
||||
//
|
||||
// SizeGuideHeightCtrl
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 17F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
Controls.Add(splitter1);
|
||||
Name = "SizeGuideHeightCtrl";
|
||||
Size = new Size(1280, 640);
|
||||
Load += GuideLineCircleCtrl_Load;
|
||||
splitter1.Panel1.ResumeLayout(false);
|
||||
splitter1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)splitter1).EndInit();
|
||||
splitter1.ResumeLayout(false);
|
||||
panel1.ResumeLayout(false);
|
||||
panel1.PerformLayout();
|
||||
panel2.ResumeLayout(false);
|
||||
statusStrip1.ResumeLayout(false);
|
||||
statusStrip1.PerformLayout();
|
||||
groupBox2.ResumeLayout(false);
|
||||
groupBox1.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
private TextBox tbRectWidth1;
|
||||
private AntdUI.Splitter splitter1;
|
||||
private AntdUI.Panel panel1;
|
||||
private Canvas.UI.FlyCanvas canvas;
|
||||
private AntdUI.Panel panel2;
|
||||
private GuidePanel.CtrlTitleBar ctrlTitleBar;
|
||||
private StatusStrip statusStrip1;
|
||||
private ToolStripStatusLabel lblStatus;
|
||||
private GroupBox groupBox2;
|
||||
|
||||
private Canvas.UI.FlyCanvas flyCanvas1;
|
||||
private AntdUI.Input tbLineX1;
|
||||
private AntdUI.Label label1;
|
||||
private AntdUI.Label label3;
|
||||
private AntdUI.Input tbLineY2;
|
||||
private AntdUI.Label label5;
|
||||
private AntdUI.Input tbLineX2;
|
||||
private AntdUI.Label label4;
|
||||
private AntdUI.Input tbLineY1;
|
||||
private AntdUI.Label label7;
|
||||
private AntdUI.Label label6;
|
||||
private AntdUI.Input tbwidth;
|
||||
private AntdUI.Input tbheight;
|
||||
private GroupBox groupBox1;
|
||||
private AntdUI.Label label2;
|
||||
private AntdUI.Input CamName;
|
||||
private AntdUI.Button button1;
|
||||
private AntdUI.Label label8;
|
||||
private AntdUI.Switch switch1;
|
||||
private AntdUI.Button button2;
|
||||
private AntdUI.Button button3;
|
||||
private AntdUI.Label lblElapsed;
|
||||
private AntdUI.Label label9;
|
||||
private AntdUI.Label lblResult;
|
||||
private AntdUI.Label label12;
|
||||
private AntdUI.Button btnSave;
|
||||
}
|
||||
}
|
346
CanFly/UI/SizePanel/SizeGuideHeightCtrl.cs
Normal file
346
CanFly/UI/SizePanel/SizeGuideHeightCtrl.cs
Normal file
@ -0,0 +1,346 @@
|
||||
using CanFly.Canvas.Helper;
|
||||
using CanFly.Canvas.Shape;
|
||||
using CanFly.Canvas.UI;
|
||||
using CanFly.Helper;
|
||||
using HalconDotNet;
|
||||
using OpenCvSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace CanFly.UI.SizePanel
|
||||
{
|
||||
public partial class SizeGuideHeightCtrl : SizeBaseGuideControl
|
||||
{
|
||||
|
||||
|
||||
|
||||
private FlyShape? _line;
|
||||
|
||||
|
||||
private float _lineX1;
|
||||
private float _lineY1;
|
||||
private float _lineX2;
|
||||
private float _lineY2;
|
||||
float width, height;
|
||||
private float _lineWidth;
|
||||
private PointF[] _rectPoints = new PointF[4];
|
||||
//private float _LineLX=new float();
|
||||
//private float _LineLY =new float();
|
||||
//private float _LineRX =new float();
|
||||
//private float _LineRY =new float();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected override string GetScriptFileName() => "HeightMeasure.hdvp";
|
||||
|
||||
|
||||
|
||||
public SizeGuideHeightCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.canvas.mouseMoved += Canvas_mouseMoved;
|
||||
this.canvas.OnShapeUpdateEvent += UpdateShape;
|
||||
this.canvas.selectionChanged += Canvas_selectionChanged;
|
||||
|
||||
this.canvas.OnShapeMoving += Canvas_OnShapeMoving;
|
||||
this.canvas.newShape += Canvas_newShape;
|
||||
|
||||
this.ctrlTitleBar.OnCloseClicked += OnControlClose;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected override void UpdateShape(FlyShape shape)
|
||||
{
|
||||
switch (shape.ShapeType)
|
||||
{
|
||||
case ShapeTypeEnum.Rectangle:
|
||||
this._line = shape;
|
||||
|
||||
var pts = this._line.Points;
|
||||
|
||||
_lineX1 = pts[0].X;
|
||||
_lineY1 = pts[0].Y;
|
||||
_lineX2 = pts[1].X;
|
||||
_lineY2 = pts[1].Y;
|
||||
_lineWidth = shape.LineVirtualRectWidth;
|
||||
_rectPoints = shape.LineVirtualRectPoints;
|
||||
//_LineLX = (shape.LineVirtualRectPoints[0].X + shape.LineVirtualRectPoints[3].X) / 2;
|
||||
//_LineLY = (shape.LineVirtualRectPoints[0].Y + shape.LineVirtualRectPoints[3].Y) / 2;
|
||||
//_LineRX = (shape.LineVirtualRectPoints[1].X + shape.LineVirtualRectPoints[2].X) / 2;
|
||||
//_LineRY = (shape.LineVirtualRectPoints[1].Y + shape.LineVirtualRectPoints[2].Y) / 2;
|
||||
|
||||
width = Math.Abs(_lineX2 - _lineX1);
|
||||
height = Math.Abs(_lineY2 - _lineY1);
|
||||
|
||||
|
||||
tbLineX1.Text = _lineX1.ToString("F3");
|
||||
tbLineY1.Text = _lineY1.ToString("F3");
|
||||
tbLineX2.Text = _lineX2.ToString("F3");
|
||||
tbLineY2.Text = _lineY2.ToString("F3");
|
||||
tbwidth.Text = width.ToString();
|
||||
tbheight.Text = height.ToString();
|
||||
// NumRectWidth1.Value = (decimal)_lineWidth;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void GuideLineCircleCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void Canvas_mouseMoved(PointF pos)
|
||||
{
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke(Canvas_mouseMoved, pos);
|
||||
return;
|
||||
}
|
||||
|
||||
lblStatus.Text = $"X:{pos.X}, Y:{pos.Y}";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void Canvas_selectionChanged(List<FlyShape> shapes)
|
||||
{
|
||||
//if (shapes.Count != 1)
|
||||
//{
|
||||
// // panelGuide.Controls.Clear();
|
||||
// return;
|
||||
//}
|
||||
//SwitchGuideForm(shapes[0].ShapeType);
|
||||
// Canvas_OnShapeUpdateEvent(shapes[0]);
|
||||
|
||||
if (shapes.Count != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
UpdateShape(shapes[0]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void Canvas_OnShapeMoving(List<FlyShape> shapes)
|
||||
{
|
||||
if (shapes.Count != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
UpdateShape(shapes[0]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void btnCreateLine_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.canvas.pixmap == null)
|
||||
{
|
||||
MessageBox.Show("请先打开图片");
|
||||
return;
|
||||
}
|
||||
tbLineX1.Text = string.Empty;
|
||||
tbLineY1.Text = string.Empty;
|
||||
tbLineX2.Text = string.Empty;
|
||||
tbLineY2.Text = string.Empty; ;
|
||||
tbwidth.Text = string.Empty; ;
|
||||
tbheight.Text = string.Empty; ;
|
||||
this.canvas.Shapes.RemoveAll(shp => shp.ShapeType == ShapeTypeEnum.Rectangle);
|
||||
this.canvas.Invalidate();
|
||||
this.canvas.StartDraw(ShapeTypeEnum.Rectangle);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void btnLoadImage_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenImageFile(bitmap =>
|
||||
{
|
||||
this.canvas.LoadPixmap(bitmap);
|
||||
this.canvas.Enabled = true;
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void Canvas_newShape()
|
||||
{
|
||||
this.canvas.StopDraw();
|
||||
}
|
||||
|
||||
private void btnExecute_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.canvas.pixmap == null)
|
||||
{
|
||||
MessageBox.Show("请先打开图片");
|
||||
return;
|
||||
}
|
||||
if (this.tbLineX1.Text.Trim().Length == 0)
|
||||
{
|
||||
MessageBox.Show("请先创建矩形");
|
||||
return;
|
||||
}
|
||||
this.canvas.OutsideShapes.Clear();
|
||||
this.canvas.Invalidate();
|
||||
|
||||
|
||||
flag = new List<double>();
|
||||
|
||||
Line1Para = new List<double>();
|
||||
Line2Para = new List<double>();
|
||||
iHeight = new List<double>();
|
||||
Dictionary<string, HObject> inputImg = new Dictionary<string, HObject>();
|
||||
|
||||
if (hImage == null)
|
||||
{
|
||||
HOperatorSet.ReadImage(out hImage, CurrentImageFile);
|
||||
}
|
||||
inputImg["INPUT_Image"] = hImage;
|
||||
|
||||
|
||||
Dictionary<string, HTuple> inputPara = new Dictionary<string, HTuple>();
|
||||
|
||||
|
||||
inputPara["row"] = _lineY1;
|
||||
inputPara["column"] = _lineX1;
|
||||
inputPara["Width"] = width;
|
||||
inputPara["Height"] = height;
|
||||
|
||||
|
||||
|
||||
List<string> outputKeys = new List<string>()
|
||||
{
|
||||
"OUTPUT_PreTreatedImage",
|
||||
"OUTPUT_Flag",
|
||||
|
||||
"Line1Para",
|
||||
"Line2Para",
|
||||
"iHeight"
|
||||
};
|
||||
|
||||
ExecuteHScript(
|
||||
inputImg,
|
||||
inputPara,
|
||||
outputKeys);
|
||||
|
||||
}
|
||||
|
||||
|
||||
List<double> flag = new List<double>();
|
||||
List<double> Line1Para = new List<double>();
|
||||
List<double> Line2Para = new List<double>();
|
||||
|
||||
List<double> iHeight = new List<double>();
|
||||
|
||||
|
||||
protected override void OnExecuteHScriptResult(
|
||||
bool success,
|
||||
Dictionary<string, HTuple> resultDic,
|
||||
int timeElasped)
|
||||
{
|
||||
if (!success)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
"OUTPUT_Flag",
|
||||
"RXCenter",
|
||||
"RYCenter",
|
||||
"RRadius"
|
||||
*/
|
||||
|
||||
flag = resultDic["OUTPUT_Flag"].HTupleToDouble();
|
||||
|
||||
Line1Para = resultDic["Line1Para"].HTupleToDouble();
|
||||
Line2Para = resultDic["Line2Para"].HTupleToDouble();
|
||||
// EndRow = resultDic["EndRow"].HTupleToDouble();
|
||||
//EndCloumn = resultDic["EndColumn"].HTupleToDouble();
|
||||
iHeight = resultDic["iHeight"].HTupleToDouble();
|
||||
|
||||
if (flag.Count > 0)
|
||||
{
|
||||
lblResult.Text = flag[0].ToString();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
lblResult.Text = "无";
|
||||
}
|
||||
if (flag.Count > 0 && Line1Para.Count == 4 && Line2Para.Count == 4 && iHeight.Count > 0)
|
||||
{
|
||||
float width = 0;
|
||||
this.canvas.DrawLine(new PointF((float)Line1Para[1], (float)Line1Para[0]), new PointF((float)Line1Para[3], (float)Line1Para[2]), 0);
|
||||
this.canvas.DrawLine(new PointF((float)Line2Para[1], (float)Line2Para[0]), new PointF((float)Line2Para[3], (float)Line2Para[2]), 0);
|
||||
this.canvas.Invalidate();
|
||||
lblElapsed.Text = $"{timeElasped} ms";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lblResult.Text.Equals("无"))
|
||||
{
|
||||
MessageBox.Show("请先进行绘制");
|
||||
return;
|
||||
}
|
||||
if (lblResult.Text != "0")
|
||||
{
|
||||
MessageBox.Show("测量计算错误,无法保存");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
string input = $"row:{string.Join(";", _lineY1)};column:{string.Join(";", _lineX1)};" +
|
||||
$"Width:{string.Join(";", width)};Height:{string.Join(";", height)}";
|
||||
|
||||
string output = $"iHeight:{string.Join(";", iHeight[0])}";
|
||||
DataToTriggerEvent(input, output);
|
||||
}
|
||||
|
||||
private void tbLineX1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
148
CanFly/UI/SizePanel/SizeGuideHeightCtrl.resx
Normal file
148
CanFly/UI/SizePanel/SizeGuideHeightCtrl.resx
Normal file
@ -0,0 +1,148 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="canvas.OutsideShapes" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAERDYW5GbHkuQ2FudmFzLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1
|
||||
cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAQBAAAAdlN5c3RlbS5Db2xsZWN0aW9ucy5HZW5l
|
||||
cmljLkxpc3RgMVtbQ2FuRmx5LkNhbnZhcy5TaGFwZS5GbHlTaGFwZSwgQ2FuRmx5LkNhbnZhcywgQ3Vs
|
||||
dHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsXV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lv
|
||||
bgQAAB5DYW5GbHkuQ2FudmFzLlNoYXBlLkZseVNoYXBlW10CAAAACAgJAwAAAAAAAAAAAAAADAQAAAAz
|
||||
Q2FuRmx5LkNhbnZhcywgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBwMAAAAAAQAA
|
||||
AAAAAAAEHENhbkZseS5DYW52YXMuU2hhcGUuRmx5U2hhcGUEAAAACw==
|
||||
</value>
|
||||
</data>
|
||||
<data name="canvas.Shapes" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAERDYW5GbHkuQ2FudmFzLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1
|
||||
cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAQBAAAAdlN5c3RlbS5Db2xsZWN0aW9ucy5HZW5l
|
||||
cmljLkxpc3RgMVtbQ2FuRmx5LkNhbnZhcy5TaGFwZS5GbHlTaGFwZSwgQ2FuRmx5LkNhbnZhcywgQ3Vs
|
||||
dHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsXV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lv
|
||||
bgQAAB5DYW5GbHkuQ2FudmFzLlNoYXBlLkZseVNoYXBlW10CAAAACAgJAwAAAAAAAAAAAAAADAQAAAAz
|
||||
Q2FuRmx5LkNhbnZhcywgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBwMAAAAAAQAA
|
||||
AAAAAAAEHENhbkZseS5DYW52YXMuU2hhcGUuRmx5U2hhcGUEAAAACw==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
550
CanFly/UI/SizePanel/SizeGuideLineCircleCtrl.Designer.cs
generated
Normal file
550
CanFly/UI/SizePanel/SizeGuideLineCircleCtrl.Designer.cs
generated
Normal file
@ -0,0 +1,550 @@
|
||||
namespace CanFly.UI.SizePanel
|
||||
{
|
||||
partial class SizeGuideLineCircleCtrl
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SizeGuideLineCircleCtrl));
|
||||
lblElapsed = new Label();
|
||||
label4 = new Label();
|
||||
splitContainer = new SplitContainer();
|
||||
panelGuide = new Panel();
|
||||
lblDistance = new Label();
|
||||
label17 = new Label();
|
||||
lblResult = new Label();
|
||||
label15 = new Label();
|
||||
btnCreateLine = new Button();
|
||||
btnCreateCircle = new Button();
|
||||
btnLoadImage = new Button();
|
||||
label9 = new Label();
|
||||
btnExecute = new Button();
|
||||
label10 = new Label();
|
||||
groupBox2 = new GroupBox();
|
||||
NumRectWidth1 = new NumericUpDown();
|
||||
label11 = new Label();
|
||||
tbLineX2 = new TextBox();
|
||||
label8 = new Label();
|
||||
tbLineY2 = new TextBox();
|
||||
label5 = new Label();
|
||||
tbLineX1 = new TextBox();
|
||||
tbLineY1 = new TextBox();
|
||||
label6 = new Label();
|
||||
label7 = new Label();
|
||||
groupBox1 = new GroupBox();
|
||||
tbCircleX = new TextBox();
|
||||
tbCircleY = new TextBox();
|
||||
tbCircleR = new TextBox();
|
||||
label3 = new Label();
|
||||
label2 = new Label();
|
||||
label1 = new Label();
|
||||
ctrlTitleBar = new SizeCtrlTitleBar();
|
||||
panel1 = new Panel();
|
||||
canvas = new Canvas.UI.FlyCanvas();
|
||||
statusStrip1 = new StatusStrip();
|
||||
lblStatus = new ToolStripStatusLabel();
|
||||
btnSave = new Button();
|
||||
((System.ComponentModel.ISupportInitialize)splitContainer).BeginInit();
|
||||
splitContainer.Panel1.SuspendLayout();
|
||||
splitContainer.Panel2.SuspendLayout();
|
||||
splitContainer.SuspendLayout();
|
||||
panelGuide.SuspendLayout();
|
||||
groupBox2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)NumRectWidth1).BeginInit();
|
||||
groupBox1.SuspendLayout();
|
||||
panel1.SuspendLayout();
|
||||
statusStrip1.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// lblElapsed
|
||||
//
|
||||
lblElapsed.AutoSize = true;
|
||||
lblElapsed.Location = new Point(50, 328);
|
||||
lblElapsed.Name = "lblElapsed";
|
||||
lblElapsed.Size = new Size(32, 17);
|
||||
lblElapsed.TabIndex = 9;
|
||||
lblElapsed.Text = "0ms";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
label4.AutoSize = true;
|
||||
label4.Location = new Point(0, 328);
|
||||
label4.Name = "label4";
|
||||
label4.Size = new Size(44, 17);
|
||||
label4.TabIndex = 8;
|
||||
label4.Text = "耗时:";
|
||||
//
|
||||
// splitContainer
|
||||
//
|
||||
splitContainer.Dock = DockStyle.Fill;
|
||||
splitContainer.Location = new Point(0, 0);
|
||||
splitContainer.Name = "splitContainer";
|
||||
//
|
||||
// splitContainer.Panel1
|
||||
//
|
||||
splitContainer.Panel1.Controls.Add(panelGuide);
|
||||
splitContainer.Panel1MinSize = 150;
|
||||
//
|
||||
// splitContainer.Panel2
|
||||
//
|
||||
splitContainer.Panel2.Controls.Add(panel1);
|
||||
splitContainer.Size = new Size(1280, 640);
|
||||
splitContainer.SplitterDistance = 200;
|
||||
splitContainer.TabIndex = 11;
|
||||
//
|
||||
// panelGuide
|
||||
//
|
||||
panelGuide.BorderStyle = BorderStyle.FixedSingle;
|
||||
panelGuide.Controls.Add(btnSave);
|
||||
panelGuide.Controls.Add(lblDistance);
|
||||
panelGuide.Controls.Add(label17);
|
||||
panelGuide.Controls.Add(lblResult);
|
||||
panelGuide.Controls.Add(label15);
|
||||
panelGuide.Controls.Add(btnCreateLine);
|
||||
panelGuide.Controls.Add(btnCreateCircle);
|
||||
panelGuide.Controls.Add(btnLoadImage);
|
||||
panelGuide.Controls.Add(label9);
|
||||
panelGuide.Controls.Add(btnExecute);
|
||||
panelGuide.Controls.Add(label10);
|
||||
panelGuide.Controls.Add(groupBox2);
|
||||
panelGuide.Controls.Add(groupBox1);
|
||||
panelGuide.Controls.Add(ctrlTitleBar);
|
||||
panelGuide.Dock = DockStyle.Fill;
|
||||
panelGuide.Location = new Point(0, 0);
|
||||
panelGuide.Name = "panelGuide";
|
||||
panelGuide.Size = new Size(200, 640);
|
||||
panelGuide.TabIndex = 0;
|
||||
//
|
||||
// lblDistance
|
||||
//
|
||||
lblDistance.AutoSize = true;
|
||||
lblDistance.Location = new Point(54, 505);
|
||||
lblDistance.Name = "lblDistance";
|
||||
lblDistance.Size = new Size(15, 17);
|
||||
lblDistance.TabIndex = 29;
|
||||
lblDistance.Text = "0";
|
||||
//
|
||||
// label17
|
||||
//
|
||||
label17.AutoSize = true;
|
||||
label17.Location = new Point(6, 505);
|
||||
label17.Name = "label17";
|
||||
label17.Size = new Size(44, 17);
|
||||
label17.TabIndex = 28;
|
||||
label17.Text = "距离:";
|
||||
//
|
||||
// lblResult
|
||||
//
|
||||
lblResult.AutoSize = true;
|
||||
lblResult.Location = new Point(54, 479);
|
||||
lblResult.Name = "lblResult";
|
||||
lblResult.Size = new Size(20, 17);
|
||||
lblResult.TabIndex = 27;
|
||||
lblResult.Text = "无";
|
||||
//
|
||||
// label15
|
||||
//
|
||||
label15.AutoSize = true;
|
||||
label15.Location = new Point(6, 479);
|
||||
label15.Name = "label15";
|
||||
label15.Size = new Size(44, 17);
|
||||
label15.TabIndex = 26;
|
||||
label15.Text = "结果:";
|
||||
//
|
||||
// btnCreateLine
|
||||
//
|
||||
btnCreateLine.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnCreateLine.Location = new Point(6, 406);
|
||||
btnCreateLine.Name = "btnCreateLine";
|
||||
btnCreateLine.Size = new Size(186, 32);
|
||||
btnCreateLine.TabIndex = 20;
|
||||
btnCreateLine.Text = "创建直线";
|
||||
btnCreateLine.UseVisualStyleBackColor = true;
|
||||
btnCreateLine.Click += btnCreateLine_Click;
|
||||
//
|
||||
// btnCreateCircle
|
||||
//
|
||||
btnCreateCircle.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnCreateCircle.Location = new Point(6, 368);
|
||||
btnCreateCircle.Name = "btnCreateCircle";
|
||||
btnCreateCircle.Size = new Size(186, 32);
|
||||
btnCreateCircle.TabIndex = 19;
|
||||
btnCreateCircle.Text = "创建圆形";
|
||||
btnCreateCircle.UseVisualStyleBackColor = true;
|
||||
btnCreateCircle.Click += btnCreateCircle_Click;
|
||||
//
|
||||
// btnLoadImage
|
||||
//
|
||||
btnLoadImage.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnLoadImage.Location = new Point(6, 330);
|
||||
btnLoadImage.Name = "btnLoadImage";
|
||||
btnLoadImage.Size = new Size(186, 32);
|
||||
btnLoadImage.TabIndex = 18;
|
||||
btnLoadImage.Text = "打开图片";
|
||||
btnLoadImage.UseVisualStyleBackColor = true;
|
||||
btnLoadImage.Click += btnLoadImage_Click;
|
||||
//
|
||||
// label9
|
||||
//
|
||||
label9.AutoSize = true;
|
||||
label9.Location = new Point(56, 525);
|
||||
label9.Name = "label9";
|
||||
label9.Size = new Size(32, 17);
|
||||
label9.TabIndex = 17;
|
||||
label9.Text = "0ms";
|
||||
//
|
||||
// btnExecute
|
||||
//
|
||||
btnExecute.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnExecute.Location = new Point(6, 444);
|
||||
btnExecute.Name = "btnExecute";
|
||||
btnExecute.Size = new Size(186, 32);
|
||||
btnExecute.TabIndex = 15;
|
||||
btnExecute.Text = "执行";
|
||||
btnExecute.UseVisualStyleBackColor = true;
|
||||
btnExecute.Click += btnExecute_Click;
|
||||
//
|
||||
// label10
|
||||
//
|
||||
label10.AutoSize = true;
|
||||
label10.Location = new Point(6, 525);
|
||||
label10.Name = "label10";
|
||||
label10.Size = new Size(44, 17);
|
||||
label10.TabIndex = 16;
|
||||
label10.Text = "耗时:";
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
groupBox2.Controls.Add(NumRectWidth1);
|
||||
groupBox2.Controls.Add(label11);
|
||||
groupBox2.Controls.Add(tbLineX2);
|
||||
groupBox2.Controls.Add(label8);
|
||||
groupBox2.Controls.Add(tbLineY2);
|
||||
groupBox2.Controls.Add(label5);
|
||||
groupBox2.Controls.Add(tbLineX1);
|
||||
groupBox2.Controls.Add(tbLineY1);
|
||||
groupBox2.Controls.Add(label6);
|
||||
groupBox2.Controls.Add(label7);
|
||||
groupBox2.Dock = DockStyle.Top;
|
||||
groupBox2.Location = new Point(0, 152);
|
||||
groupBox2.Name = "groupBox2";
|
||||
groupBox2.Size = new Size(198, 172);
|
||||
groupBox2.TabIndex = 13;
|
||||
groupBox2.TabStop = false;
|
||||
groupBox2.Text = "线参数";
|
||||
//
|
||||
// NumRectWidth1
|
||||
//
|
||||
NumRectWidth1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
NumRectWidth1.Location = new Point(56, 138);
|
||||
NumRectWidth1.Maximum = new decimal(new int[] { 9000, 0, 0, 0 });
|
||||
NumRectWidth1.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
|
||||
NumRectWidth1.Name = "NumRectWidth1";
|
||||
NumRectWidth1.Size = new Size(136, 23);
|
||||
NumRectWidth1.TabIndex = 13;
|
||||
NumRectWidth1.Value = new decimal(new int[] { 1, 0, 0, 0 });
|
||||
//
|
||||
// label11
|
||||
//
|
||||
label11.AutoSize = true;
|
||||
label11.Location = new Point(6, 140);
|
||||
label11.Name = "label11";
|
||||
label11.Size = new Size(35, 17);
|
||||
label11.TabIndex = 12;
|
||||
label11.Text = "宽度:";
|
||||
//
|
||||
// tbLineX2
|
||||
//
|
||||
tbLineX2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLineX2.Location = new Point(56, 80);
|
||||
tbLineX2.Name = "tbLineX2";
|
||||
tbLineX2.Size = new Size(136, 23);
|
||||
tbLineX2.TabIndex = 9;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
label8.AutoSize = true;
|
||||
label8.Location = new Point(6, 83);
|
||||
label8.Name = "label8";
|
||||
label8.Size = new Size(26, 17);
|
||||
label8.TabIndex = 8;
|
||||
label8.Text = "X2:";
|
||||
//
|
||||
// tbLineY2
|
||||
//
|
||||
tbLineY2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLineY2.Location = new Point(56, 109);
|
||||
tbLineY2.Name = "tbLineY2";
|
||||
tbLineY2.Size = new Size(136, 23);
|
||||
tbLineY2.TabIndex = 7;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
label5.AutoSize = true;
|
||||
label5.Location = new Point(6, 112);
|
||||
label5.Name = "label5";
|
||||
label5.Size = new Size(25, 17);
|
||||
label5.TabIndex = 6;
|
||||
label5.Text = "Y2:";
|
||||
//
|
||||
// tbLineX1
|
||||
//
|
||||
tbLineX1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLineX1.Location = new Point(56, 22);
|
||||
tbLineX1.Name = "tbLineX1";
|
||||
tbLineX1.Size = new Size(136, 23);
|
||||
tbLineX1.TabIndex = 5;
|
||||
//
|
||||
// tbLineY1
|
||||
//
|
||||
tbLineY1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLineY1.Location = new Point(56, 51);
|
||||
tbLineY1.Name = "tbLineY1";
|
||||
tbLineY1.Size = new Size(136, 23);
|
||||
tbLineY1.TabIndex = 4;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
label6.AutoSize = true;
|
||||
label6.Location = new Point(6, 54);
|
||||
label6.Name = "label6";
|
||||
label6.Size = new Size(25, 17);
|
||||
label6.TabIndex = 1;
|
||||
label6.Text = "Y1:";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
label7.AutoSize = true;
|
||||
label7.Location = new Point(6, 25);
|
||||
label7.Name = "label7";
|
||||
label7.Size = new Size(26, 17);
|
||||
label7.TabIndex = 0;
|
||||
label7.Text = "X1:";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
groupBox1.Controls.Add(tbCircleX);
|
||||
groupBox1.Controls.Add(tbCircleY);
|
||||
groupBox1.Controls.Add(tbCircleR);
|
||||
groupBox1.Controls.Add(label3);
|
||||
groupBox1.Controls.Add(label2);
|
||||
groupBox1.Controls.Add(label1);
|
||||
groupBox1.Dock = DockStyle.Top;
|
||||
groupBox1.Location = new Point(0, 36);
|
||||
groupBox1.Name = "groupBox1";
|
||||
groupBox1.Size = new Size(198, 116);
|
||||
groupBox1.TabIndex = 12;
|
||||
groupBox1.TabStop = false;
|
||||
groupBox1.Text = "圆参数";
|
||||
//
|
||||
// tbCircleX
|
||||
//
|
||||
tbCircleX.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbCircleX.Location = new Point(56, 22);
|
||||
tbCircleX.Name = "tbCircleX";
|
||||
tbCircleX.Size = new Size(136, 23);
|
||||
tbCircleX.TabIndex = 5;
|
||||
//
|
||||
// tbCircleY
|
||||
//
|
||||
tbCircleY.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbCircleY.Location = new Point(56, 51);
|
||||
tbCircleY.Name = "tbCircleY";
|
||||
tbCircleY.Size = new Size(136, 23);
|
||||
tbCircleY.TabIndex = 4;
|
||||
//
|
||||
// tbCircleR
|
||||
//
|
||||
tbCircleR.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbCircleR.Location = new Point(56, 80);
|
||||
tbCircleR.Name = "tbCircleR";
|
||||
tbCircleR.Size = new Size(136, 23);
|
||||
tbCircleR.TabIndex = 3;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
label3.AutoSize = true;
|
||||
label3.Location = new Point(3, 83);
|
||||
label3.Name = "label3";
|
||||
label3.Size = new Size(44, 17);
|
||||
label3.TabIndex = 2;
|
||||
label3.Text = "半径:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.AutoSize = true;
|
||||
label2.Location = new Point(6, 54);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new Size(18, 17);
|
||||
label2.TabIndex = 1;
|
||||
label2.Text = "Y:";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.AutoSize = true;
|
||||
label1.Location = new Point(6, 25);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(19, 17);
|
||||
label1.TabIndex = 0;
|
||||
label1.Text = "X:";
|
||||
//
|
||||
// ctrlTitleBar
|
||||
//
|
||||
ctrlTitleBar.Dock = DockStyle.Top;
|
||||
ctrlTitleBar.Location = new Point(0, 0);
|
||||
ctrlTitleBar.MinimumSize = new Size(0, 36);
|
||||
ctrlTitleBar.Name = "ctrlTitleBar";
|
||||
ctrlTitleBar.Padding = new Padding(3);
|
||||
ctrlTitleBar.Size = new Size(198, 36);
|
||||
ctrlTitleBar.TabIndex = 11;
|
||||
ctrlTitleBar.Title = "线圆测量";
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
panel1.BorderStyle = BorderStyle.FixedSingle;
|
||||
panel1.Controls.Add(canvas);
|
||||
panel1.Controls.Add(statusStrip1);
|
||||
panel1.Dock = DockStyle.Fill;
|
||||
panel1.Location = new Point(0, 0);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new Size(1076, 640);
|
||||
panel1.TabIndex = 1;
|
||||
//
|
||||
// canvas
|
||||
//
|
||||
canvas.AllowMultiSelect = false;
|
||||
canvas.CreateMode = Canvas.Shape.ShapeTypeEnum.Polygon;
|
||||
canvas.Dock = DockStyle.Fill;
|
||||
canvas.Enabled = false;
|
||||
canvas.FillDrawing = false;
|
||||
canvas.Location = new Point(0, 0);
|
||||
canvas.Margin = new Padding(2);
|
||||
canvas.Name = "canvas";
|
||||
canvas.OutsideShapes = (List<Canvas.Shape.FlyShape>)resources.GetObject("canvas.OutsideShapes");
|
||||
canvas.Scale = 1F;
|
||||
canvas.Shapes = (List<Canvas.Shape.FlyShape>)resources.GetObject("canvas.Shapes");
|
||||
canvas.Size = new Size(1074, 616);
|
||||
canvas.TabIndex = 2;
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
statusStrip1.Items.AddRange(new ToolStripItem[] { lblStatus });
|
||||
statusStrip1.Location = new Point(0, 616);
|
||||
statusStrip1.Name = "statusStrip1";
|
||||
statusStrip1.Size = new Size(1074, 22);
|
||||
statusStrip1.TabIndex = 1;
|
||||
statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// lblStatus
|
||||
//
|
||||
lblStatus.Name = "lblStatus";
|
||||
lblStatus.Size = new Size(44, 17);
|
||||
lblStatus.Text = " ";
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
btnSave.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnSave.Location = new Point(6, 545);
|
||||
btnSave.Name = "btnSave";
|
||||
btnSave.Size = new Size(186, 32);
|
||||
btnSave.TabIndex = 30;
|
||||
btnSave.Text = "保存数据";
|
||||
btnSave.UseVisualStyleBackColor = true;
|
||||
btnSave.Click += btnSave_Click;
|
||||
//
|
||||
// GuideLineCircleCtrl
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 17F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
Controls.Add(splitContainer);
|
||||
Controls.Add(lblElapsed);
|
||||
Controls.Add(label4);
|
||||
Name = "GuideLineCircleCtrl";
|
||||
Size = new Size(1280, 640);
|
||||
Load += GuideLineCircleCtrl_Load;
|
||||
splitContainer.Panel1.ResumeLayout(false);
|
||||
splitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)splitContainer).EndInit();
|
||||
splitContainer.ResumeLayout(false);
|
||||
panelGuide.ResumeLayout(false);
|
||||
panelGuide.PerformLayout();
|
||||
groupBox2.ResumeLayout(false);
|
||||
groupBox2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)NumRectWidth1).EndInit();
|
||||
groupBox1.ResumeLayout(false);
|
||||
groupBox1.PerformLayout();
|
||||
panel1.ResumeLayout(false);
|
||||
panel1.PerformLayout();
|
||||
statusStrip1.ResumeLayout(false);
|
||||
statusStrip1.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Label lblElapsed;
|
||||
private Label label4;
|
||||
|
||||
private SplitContainer splitContainer;
|
||||
private Panel panelGuide;
|
||||
private Panel panel1;
|
||||
private Canvas.UI.FlyCanvas canvas;
|
||||
private StatusStrip statusStrip1;
|
||||
private ToolStripStatusLabel lblStatus;
|
||||
private GroupBox groupBox2;
|
||||
private TextBox tbLineX2;
|
||||
private Label label8;
|
||||
private TextBox tbLineY2;
|
||||
private Label label5;
|
||||
private TextBox tbLineX1;
|
||||
private TextBox tbLineY1;
|
||||
private Label label6;
|
||||
private Label label7;
|
||||
private GroupBox groupBox1;
|
||||
private TextBox tbCircleX;
|
||||
private TextBox tbCircleY;
|
||||
private TextBox tbCircleR;
|
||||
private Label label3;
|
||||
private Label label2;
|
||||
private Label label1;
|
||||
private SizeCtrlTitleBar ctrlTitleBar;
|
||||
private Button btnCreateCircle;
|
||||
private Button btnLoadImage;
|
||||
private Label label9;
|
||||
private Button btnExecute;
|
||||
private Label label10;
|
||||
private Button btnCreateLine;
|
||||
private TextBox tbRectWidth1;
|
||||
private Label label11;
|
||||
private NumericUpDown NumRectWidth1;
|
||||
private Label lblDistance;
|
||||
private Label label17;
|
||||
private Label lblResult;
|
||||
private Label label15;
|
||||
private Button btnSave;
|
||||
}
|
||||
}
|
449
CanFly/UI/SizePanel/SizeGuideLineCircleCtrl.cs
Normal file
449
CanFly/UI/SizePanel/SizeGuideLineCircleCtrl.cs
Normal file
@ -0,0 +1,449 @@
|
||||
using CanFly.Canvas.Helper;
|
||||
using CanFly.Canvas.Shape;
|
||||
using CanFly.Canvas.UI;
|
||||
using CanFly.Helper;
|
||||
using HalconDotNet;
|
||||
using OpenCvSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
||||
namespace CanFly.UI.SizePanel
|
||||
{
|
||||
public partial class SizeGuideLineCircleCtrl : SizeBaseGuideControl
|
||||
{
|
||||
|
||||
|
||||
private FlyShape? _circle;
|
||||
private FlyShape? _line;
|
||||
|
||||
|
||||
private float _lineX1;
|
||||
private float _lineY1;
|
||||
private float _lineX2;
|
||||
private float _lineY2;
|
||||
private float _lineWidth;
|
||||
|
||||
|
||||
private float _circleX;
|
||||
private float _circleY;
|
||||
private float _circleR;
|
||||
|
||||
|
||||
|
||||
|
||||
protected override string GetScriptFileName() => "LineToCircle.hdvp";
|
||||
|
||||
|
||||
|
||||
public SizeGuideLineCircleCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.canvas.mouseMoved += Canvas_mouseMoved;
|
||||
this.canvas.OnShapeUpdateEvent += UpdateShape;
|
||||
this.canvas.selectionChanged += Canvas_selectionChanged;
|
||||
|
||||
this.canvas.OnShapeMoving += Canvas_OnShapeMoving;
|
||||
this.canvas.newShape += Canvas_newShape;
|
||||
|
||||
this.ctrlTitleBar.OnCloseClicked += OnControlClose;
|
||||
|
||||
NumRectWidth1.ValueChanged -= NumRectWidth1_ValueChanged;
|
||||
NumRectWidth1.Value = 40;
|
||||
NumRectWidth1.ValueChanged += NumRectWidth1_ValueChanged;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected override void UpdateShape(FlyShape shape)
|
||||
{
|
||||
switch (shape.ShapeType)
|
||||
{
|
||||
case ShapeTypeEnum.Line:
|
||||
this._line = shape;
|
||||
_line.IsDrawLineVirtualRect = true;
|
||||
var pts = this._line.Points;
|
||||
|
||||
_lineX1 = pts[0].X;
|
||||
_lineY1 = pts[0].Y;
|
||||
_lineX2 = pts[1].X;
|
||||
_lineY2 = pts[1].Y;
|
||||
_lineWidth = shape.LineVirtualRectWidth;
|
||||
|
||||
tbLineX1.Text = _lineX1.ToString("F3");
|
||||
tbLineY1.Text = _lineY1.ToString("F3");
|
||||
tbLineX2.Text = _lineX2.ToString("F3");
|
||||
tbLineY2.Text = _lineY2.ToString("F3");
|
||||
// NumRectWidth1.Value = (decimal)_lineWidth;
|
||||
break;
|
||||
case ShapeTypeEnum.Circle:
|
||||
this._circle = shape;
|
||||
|
||||
_circleX = shape.Points[0].X;
|
||||
_circleY = shape.Points[0].Y;
|
||||
_circleR = PointHelper.Distance(shape.Points[0], shape.Points[1]);
|
||||
|
||||
this.tbCircleX.Text = _circleX.ToString("F3");
|
||||
this.tbCircleY.Text = _circleY.ToString("F3");
|
||||
this.tbCircleR.Text = _circleR.ToString("F3");
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void GuideLineCircleCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void Canvas_mouseMoved(PointF pos)
|
||||
{
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke(Canvas_mouseMoved, pos);
|
||||
return;
|
||||
}
|
||||
|
||||
lblStatus.Text = $"X:{pos.X}, Y:{pos.Y}";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void Canvas_selectionChanged(List<FlyShape> shapes)
|
||||
{
|
||||
//if (shapes.Count != 1)
|
||||
//{
|
||||
// // panelGuide.Controls.Clear();
|
||||
// return;
|
||||
//}
|
||||
//SwitchGuideForm(shapes[0].ShapeType);
|
||||
// Canvas_OnShapeUpdateEvent(shapes[0]);
|
||||
|
||||
if (shapes.Count != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
UpdateShape(shapes[0]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void Canvas_OnShapeMoving(List<FlyShape> shapes)
|
||||
{
|
||||
if (shapes.Count != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
UpdateShape(shapes[0]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void btnCreateCircle_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.canvas.pixmap == null)
|
||||
{
|
||||
MessageBox.Show("请先打开图片");
|
||||
return;
|
||||
}
|
||||
this.tbCircleX.Text = string.Empty;
|
||||
this.tbCircleY.Text = string.Empty;
|
||||
this.tbCircleR.Text = string.Empty;
|
||||
this.canvas.Shapes.RemoveAll(shp => shp.ShapeType == ShapeTypeEnum.Circle);
|
||||
|
||||
this.canvas.Invalidate();
|
||||
this.canvas.StartDraw(ShapeTypeEnum.Circle);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void btnCreateLine_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.canvas.pixmap == null)
|
||||
{
|
||||
MessageBox.Show("请先打开图片");
|
||||
return;
|
||||
}
|
||||
tbLineX1.Text = string.Empty;
|
||||
tbLineY1.Text = string.Empty;
|
||||
tbLineX2.Text = string.Empty;
|
||||
tbLineY2.Text = string.Empty;
|
||||
|
||||
this.canvas.Shapes.RemoveAll(shp => shp.ShapeType == ShapeTypeEnum.Line);
|
||||
this.canvas.Invalidate();
|
||||
this.canvas.StartDraw(ShapeTypeEnum.Line);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void btnLoadImage_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenImageFile(bitmap =>
|
||||
{
|
||||
this.canvas.LoadPixmap(bitmap);
|
||||
this.canvas.Enabled = true;
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void Canvas_newShape()
|
||||
{
|
||||
this.canvas.StopDraw();
|
||||
}
|
||||
|
||||
|
||||
|
||||
string strarrayX=string.Empty;
|
||||
string strarrayY=string.Empty;
|
||||
private void btnExecute_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (this.canvas.pixmap == null)
|
||||
{
|
||||
MessageBox.Show("请先打开图片");
|
||||
return;
|
||||
}
|
||||
if (this.tbLineX1.Text.Trim().Length == 0)
|
||||
{
|
||||
MessageBox.Show("请先创建直线");
|
||||
return;
|
||||
}
|
||||
if (this.tbLineX1.Text.Trim().Length == 0)
|
||||
{
|
||||
MessageBox.Show("请先创建圆形");
|
||||
return;
|
||||
}
|
||||
|
||||
this.canvas.OutsideShapes.Clear();
|
||||
this.canvas.Invalidate();
|
||||
|
||||
flag = new List<double>();
|
||||
Distance = new List<double>();
|
||||
fRowCenter = new List<double>();
|
||||
fColCenter = new List<double>();
|
||||
fRadius = new List<double>();
|
||||
RowBegin = new List<double>();
|
||||
ColBegin = new List<double>();
|
||||
RowEnd = new List<double>();
|
||||
ColEnd = new List<double>();
|
||||
Dictionary<string, HObject> inputImg = new Dictionary<string, HObject>();
|
||||
|
||||
if (hImage == null)
|
||||
{
|
||||
HOperatorSet.ReadImage(out hImage, CurrentImageFile);
|
||||
}
|
||||
inputImg["INPUT_Image"] = hImage;
|
||||
|
||||
Dictionary<string, HTuple> inputPara = new Dictionary<string, HTuple>();
|
||||
|
||||
PointF[] Points = this._line.LineVirtualRectPoints;
|
||||
PointF Point1 = Points[0];
|
||||
PointF Point2 = Points[1];
|
||||
PointF Point3 = Points[2];
|
||||
PointF Point4 = Points[3];
|
||||
PointF Point5 = Points[0];
|
||||
|
||||
float x1 = Point1.X;
|
||||
float y1 = Point1.Y;
|
||||
|
||||
float x2 = Point2.X;
|
||||
float y2 = Point2.Y;
|
||||
|
||||
float x3 = Point3.X;
|
||||
float y3 = Point3.Y;
|
||||
|
||||
float x4 = Point4.X;
|
||||
float y4 = Point4.Y;
|
||||
|
||||
float x5 = Point5.X;
|
||||
float y5 = Point5.Y;
|
||||
|
||||
|
||||
float[] arrayX = new float[] { x1, x2, x3, x4, x5 };
|
||||
HTuple hTupleArrayX = new HTuple(arrayX);
|
||||
|
||||
float[] arrayY = new float[] { y1, y2, y3, y4, y5 };
|
||||
HTuple hTupleArrayY = new HTuple(arrayY);
|
||||
|
||||
strarrayX=string.Join(",", arrayX);
|
||||
strarrayY=string.Join(",", arrayY);
|
||||
|
||||
inputPara["LX"] = _lineX1;
|
||||
inputPara["LY"] = _lineY1;
|
||||
inputPara["RX"] = _lineX2;
|
||||
inputPara["RY"] = _lineY2;
|
||||
inputPara["XCenter"] = _circleX;
|
||||
inputPara["YCenter"] = _circleY;
|
||||
inputPara["Radius"] = _circleR;
|
||||
inputPara["Line_XRect"] = hTupleArrayX;
|
||||
inputPara["Line_YRect"] = hTupleArrayY;
|
||||
|
||||
|
||||
|
||||
List<string> outputKeys = new List<string>()
|
||||
{
|
||||
"OUTPUT_Flag",
|
||||
"distance",
|
||||
"fRowCenter",
|
||||
"fColCenter",
|
||||
"fRadius",
|
||||
"RowBegin",
|
||||
"ColBegin",
|
||||
"RowEnd",
|
||||
"ColEnd"
|
||||
};
|
||||
|
||||
ExecuteHScript(
|
||||
inputImg,
|
||||
inputPara,
|
||||
outputKeys);
|
||||
|
||||
}
|
||||
List<double> flag = new List<double>();
|
||||
List<double> Distance = new List<double>();
|
||||
List<double> fRowCenter = new List<double>();
|
||||
List<double> fColCenter = new List<double>();
|
||||
List<double> fRadius = new List<double>();
|
||||
List<double> RowBegin = new List<double>();
|
||||
List<double> ColBegin = new List<double>();
|
||||
List<double> RowEnd = new List<double>();
|
||||
List<double> ColEnd = new List<double>();
|
||||
protected override void OnExecuteHScriptResult(
|
||||
bool success,
|
||||
Dictionary<string, HTuple> resultDic,
|
||||
int timeElasped)
|
||||
{
|
||||
if (!success)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//"OUTPUT_Flag",
|
||||
// "distance",
|
||||
// "fRowCenter",
|
||||
// "fColCenter",
|
||||
// "fRadius",
|
||||
// "RowBegin",
|
||||
// "ColBegin",
|
||||
// "RowEnd",
|
||||
// "ColEnd"
|
||||
|
||||
flag = resultDic["OUTPUT_Flag"].HTupleToDouble();
|
||||
Distance = resultDic["distance"].HTupleToDouble();
|
||||
fRowCenter = resultDic["fRowCenter"].HTupleToDouble();
|
||||
fColCenter = resultDic["fColCenter"].HTupleToDouble();
|
||||
fRadius = resultDic["fRadius"].HTupleToDouble();
|
||||
RowBegin = resultDic["RowBegin"].HTupleToDouble();
|
||||
ColBegin = resultDic["ColBegin"].HTupleToDouble();
|
||||
RowEnd = resultDic["RowEnd"].HTupleToDouble();
|
||||
ColEnd = resultDic["ColEnd"].HTupleToDouble();
|
||||
|
||||
|
||||
if (flag.Count > 0)
|
||||
{
|
||||
lblResult.Text = flag[0].ToString();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
lblResult.Text = "无";
|
||||
}
|
||||
if (Distance.Count > 0)
|
||||
{
|
||||
lblDistance.Text = Distance[0].ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
lblDistance.Text = "0";
|
||||
}
|
||||
|
||||
if (flag.Count > 0 && Distance.Count > 0 && fRowCenter.Count > 0 && fColCenter.Count > 0 && fRadius.Count > 0 && RowBegin.Count > 0 && ColBegin.Count > 0 && RowEnd.Count > 0 && ColEnd.Count > 0)
|
||||
{
|
||||
float width = 0;
|
||||
this.canvas.DrawLine(new PointF((float)ColBegin[0], (float)RowBegin[0]), new PointF((float)ColEnd[0], (float)RowEnd[0]), width);
|
||||
this.canvas.DrawCircle(new PointF((float)fColCenter[0], (float)fRowCenter[0]), (float)fRadius[0]);
|
||||
|
||||
this.canvas.Invalidate();
|
||||
lblElapsed.Text = $"{timeElasped} ms";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void NumRectWidth1_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (_line != null)
|
||||
{
|
||||
//_line1.IsDrawLineVirtualRect = true;
|
||||
_line.LineVirtualRectWidth = (float)NumRectWidth1.Value;
|
||||
UpdateShape(_line);
|
||||
this.canvas.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lblResult.Text.Equals("无"))
|
||||
{
|
||||
MessageBox.Show("请先进行绘制");
|
||||
return;
|
||||
}
|
||||
if (lblResult.Text != "0")
|
||||
{
|
||||
MessageBox.Show("测量计算错误,无法保存");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
string input = $"LX:{_lineX1};" +
|
||||
$"LY:{_lineY1};" +
|
||||
$"RX:{_lineX2};" +
|
||||
$"RY:{_lineY2};" +
|
||||
$"XCenter:{_circleX};" +
|
||||
$"YCenter:{_circleY};" +
|
||||
$"Radius:{_circleR};" +
|
||||
$"Line_XRect:{strarrayX};"+
|
||||
$"Line_YRect:{strarrayY}";
|
||||
|
||||
|
||||
|
||||
|
||||
string result = $"distance:{Distance[0]};";
|
||||
DataToTriggerEvent(input, result);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
145
CanFly/UI/SizePanel/SizeGuideLineCircleCtrl.resx
Normal file
145
CanFly/UI/SizePanel/SizeGuideLineCircleCtrl.resx
Normal file
@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="canvas.OutsideShapes" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAERDYW5GbHkuQ2FudmFzLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1
|
||||
cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAQBAAAAdlN5c3RlbS5Db2xsZWN0aW9ucy5HZW5l
|
||||
cmljLkxpc3RgMVtbQ2FuRmx5LkNhbnZhcy5TaGFwZS5GbHlTaGFwZSwgQ2FuRmx5LkNhbnZhcywgQ3Vs
|
||||
dHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsXV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lv
|
||||
bgQAAB5DYW5GbHkuQ2FudmFzLlNoYXBlLkZseVNoYXBlW10CAAAACAgJAwAAAAAAAAAAAAAADAQAAAAz
|
||||
Q2FuRmx5LkNhbnZhcywgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBwMAAAAAAQAA
|
||||
AAAAAAAEHENhbkZseS5DYW52YXMuU2hhcGUuRmx5U2hhcGUEAAAACw==
|
||||
</value>
|
||||
</data>
|
||||
<data name="canvas.Shapes" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAERDYW5GbHkuQ2FudmFzLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1
|
||||
cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAQBAAAAdlN5c3RlbS5Db2xsZWN0aW9ucy5HZW5l
|
||||
cmljLkxpc3RgMVtbQ2FuRmx5LkNhbnZhcy5TaGFwZS5GbHlTaGFwZSwgQ2FuRmx5LkNhbnZhcywgQ3Vs
|
||||
dHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsXV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lv
|
||||
bgQAAB5DYW5GbHkuQ2FudmFzLlNoYXBlLkZseVNoYXBlW10CAAAACAgJAwAAAAAAAAAAAAAADAQAAAAz
|
||||
Q2FuRmx5LkNhbnZhcywgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBwMAAAAAAQAA
|
||||
AAAAAAAEHENhbkZseS5DYW52YXMuU2hhcGUuRmx5U2hhcGUEAAAACw==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
427
CanFly/UI/SizePanel/SizeGuideLineCtrl.Designer.cs
generated
Normal file
427
CanFly/UI/SizePanel/SizeGuideLineCtrl.Designer.cs
generated
Normal file
@ -0,0 +1,427 @@
|
||||
namespace CanFly.UI.SizePanel
|
||||
{
|
||||
partial class SizeGuideLineCtrl
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SizeGuideLineCtrl));
|
||||
lblElapsed = new Label();
|
||||
label4 = new Label();
|
||||
splitContainer = new SplitContainer();
|
||||
panelGuide = new Panel();
|
||||
btnSave = new Button();
|
||||
lblResult = new Label();
|
||||
label1 = new Label();
|
||||
btnCreateLine = new Button();
|
||||
btnLoadImage = new Button();
|
||||
label9 = new Label();
|
||||
btnExecute = new Button();
|
||||
label10 = new Label();
|
||||
groupBox2 = new GroupBox();
|
||||
NumRectWidth1 = new NumericUpDown();
|
||||
label11 = new Label();
|
||||
tbLineX2 = new TextBox();
|
||||
label8 = new Label();
|
||||
tbLineY2 = new TextBox();
|
||||
label5 = new Label();
|
||||
tbLineX1 = new TextBox();
|
||||
tbLineY1 = new TextBox();
|
||||
label6 = new Label();
|
||||
label7 = new Label();
|
||||
ctrlTitleBar = new SizeCtrlTitleBar();
|
||||
panel1 = new Panel();
|
||||
canvas = new Canvas.UI.FlyCanvas();
|
||||
statusStrip1 = new StatusStrip();
|
||||
lblStatus = new ToolStripStatusLabel();
|
||||
((System.ComponentModel.ISupportInitialize)splitContainer).BeginInit();
|
||||
splitContainer.Panel1.SuspendLayout();
|
||||
splitContainer.Panel2.SuspendLayout();
|
||||
splitContainer.SuspendLayout();
|
||||
panelGuide.SuspendLayout();
|
||||
groupBox2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)NumRectWidth1).BeginInit();
|
||||
panel1.SuspendLayout();
|
||||
statusStrip1.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// lblElapsed
|
||||
//
|
||||
lblElapsed.AutoSize = true;
|
||||
lblElapsed.Location = new Point(50, 328);
|
||||
lblElapsed.Name = "lblElapsed";
|
||||
lblElapsed.Size = new Size(32, 17);
|
||||
lblElapsed.TabIndex = 9;
|
||||
lblElapsed.Text = "0ms";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
label4.AutoSize = true;
|
||||
label4.Location = new Point(0, 328);
|
||||
label4.Name = "label4";
|
||||
label4.Size = new Size(44, 17);
|
||||
label4.TabIndex = 8;
|
||||
label4.Text = "耗时:";
|
||||
//
|
||||
// splitContainer
|
||||
//
|
||||
splitContainer.Dock = DockStyle.Fill;
|
||||
splitContainer.Location = new Point(0, 0);
|
||||
splitContainer.Name = "splitContainer";
|
||||
//
|
||||
// splitContainer.Panel1
|
||||
//
|
||||
splitContainer.Panel1.Controls.Add(panelGuide);
|
||||
splitContainer.Panel1MinSize = 150;
|
||||
//
|
||||
// splitContainer.Panel2
|
||||
//
|
||||
splitContainer.Panel2.Controls.Add(panel1);
|
||||
splitContainer.Size = new Size(1280, 640);
|
||||
splitContainer.SplitterDistance = 200;
|
||||
splitContainer.TabIndex = 11;
|
||||
//
|
||||
// panelGuide
|
||||
//
|
||||
panelGuide.BorderStyle = BorderStyle.FixedSingle;
|
||||
panelGuide.Controls.Add(btnSave);
|
||||
panelGuide.Controls.Add(lblResult);
|
||||
panelGuide.Controls.Add(label1);
|
||||
panelGuide.Controls.Add(btnCreateLine);
|
||||
panelGuide.Controls.Add(btnLoadImage);
|
||||
panelGuide.Controls.Add(label9);
|
||||
panelGuide.Controls.Add(btnExecute);
|
||||
panelGuide.Controls.Add(label10);
|
||||
panelGuide.Controls.Add(groupBox2);
|
||||
panelGuide.Controls.Add(ctrlTitleBar);
|
||||
panelGuide.Dock = DockStyle.Fill;
|
||||
panelGuide.Location = new Point(0, 0);
|
||||
panelGuide.Name = "panelGuide";
|
||||
panelGuide.Size = new Size(200, 640);
|
||||
panelGuide.TabIndex = 0;
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
btnSave.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnSave.Location = new Point(6, 390);
|
||||
btnSave.Name = "btnSave";
|
||||
btnSave.Size = new Size(186, 32);
|
||||
btnSave.TabIndex = 23;
|
||||
btnSave.Text = "保存数据";
|
||||
btnSave.UseVisualStyleBackColor = true;
|
||||
btnSave.Click += btnSave_Click;
|
||||
//
|
||||
// lblResult
|
||||
//
|
||||
lblResult.AutoSize = true;
|
||||
lblResult.Location = new Point(59, 354);
|
||||
lblResult.Name = "lblResult";
|
||||
lblResult.Size = new Size(20, 17);
|
||||
lblResult.TabIndex = 22;
|
||||
lblResult.Text = "无";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.AutoSize = true;
|
||||
label1.Location = new Point(9, 354);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(44, 17);
|
||||
label1.TabIndex = 21;
|
||||
label1.Text = "结果:";
|
||||
//
|
||||
// btnCreateLine
|
||||
//
|
||||
btnCreateLine.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnCreateLine.Location = new Point(9, 252);
|
||||
btnCreateLine.Name = "btnCreateLine";
|
||||
btnCreateLine.Size = new Size(186, 32);
|
||||
btnCreateLine.TabIndex = 20;
|
||||
btnCreateLine.Text = "创建直线";
|
||||
btnCreateLine.UseVisualStyleBackColor = true;
|
||||
btnCreateLine.Click += btnCreateLine_Click;
|
||||
//
|
||||
// btnLoadImage
|
||||
//
|
||||
btnLoadImage.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnLoadImage.Location = new Point(6, 214);
|
||||
btnLoadImage.Name = "btnLoadImage";
|
||||
btnLoadImage.Size = new Size(186, 32);
|
||||
btnLoadImage.TabIndex = 18;
|
||||
btnLoadImage.Text = "打开图片";
|
||||
btnLoadImage.UseVisualStyleBackColor = true;
|
||||
btnLoadImage.Click += btnLoadImage_Click;
|
||||
//
|
||||
// label9
|
||||
//
|
||||
label9.AutoSize = true;
|
||||
label9.Location = new Point(59, 325);
|
||||
label9.Name = "label9";
|
||||
label9.Size = new Size(32, 17);
|
||||
label9.TabIndex = 17;
|
||||
label9.Text = "0ms";
|
||||
//
|
||||
// btnExecute
|
||||
//
|
||||
btnExecute.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnExecute.Location = new Point(9, 290);
|
||||
btnExecute.Name = "btnExecute";
|
||||
btnExecute.Size = new Size(186, 32);
|
||||
btnExecute.TabIndex = 15;
|
||||
btnExecute.Text = "执行";
|
||||
btnExecute.UseVisualStyleBackColor = true;
|
||||
btnExecute.Click += btnExecute_Click;
|
||||
//
|
||||
// label10
|
||||
//
|
||||
label10.AutoSize = true;
|
||||
label10.Location = new Point(9, 325);
|
||||
label10.Name = "label10";
|
||||
label10.Size = new Size(44, 17);
|
||||
label10.TabIndex = 16;
|
||||
label10.Text = "耗时:";
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
groupBox2.Controls.Add(NumRectWidth1);
|
||||
groupBox2.Controls.Add(label11);
|
||||
groupBox2.Controls.Add(tbLineX2);
|
||||
groupBox2.Controls.Add(label8);
|
||||
groupBox2.Controls.Add(tbLineY2);
|
||||
groupBox2.Controls.Add(label5);
|
||||
groupBox2.Controls.Add(tbLineX1);
|
||||
groupBox2.Controls.Add(tbLineY1);
|
||||
groupBox2.Controls.Add(label6);
|
||||
groupBox2.Controls.Add(label7);
|
||||
groupBox2.Dock = DockStyle.Top;
|
||||
groupBox2.Location = new Point(0, 36);
|
||||
groupBox2.Name = "groupBox2";
|
||||
groupBox2.Size = new Size(198, 172);
|
||||
groupBox2.TabIndex = 13;
|
||||
groupBox2.TabStop = false;
|
||||
groupBox2.Text = "线参数";
|
||||
//
|
||||
// NumRectWidth1
|
||||
//
|
||||
NumRectWidth1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
NumRectWidth1.Location = new Point(56, 138);
|
||||
NumRectWidth1.Maximum = new decimal(new int[] { 9000, 0, 0, 0 });
|
||||
NumRectWidth1.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
|
||||
NumRectWidth1.Name = "NumRectWidth1";
|
||||
NumRectWidth1.Size = new Size(136, 23);
|
||||
NumRectWidth1.TabIndex = 13;
|
||||
NumRectWidth1.Value = new decimal(new int[] { 1, 0, 0, 0 });
|
||||
//
|
||||
// label11
|
||||
//
|
||||
label11.AutoSize = true;
|
||||
label11.Location = new Point(6, 140);
|
||||
label11.Name = "label11";
|
||||
label11.Size = new Size(35, 17);
|
||||
label11.TabIndex = 12;
|
||||
label11.Text = "宽度:";
|
||||
//
|
||||
// tbLineX2
|
||||
//
|
||||
tbLineX2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLineX2.Location = new Point(56, 80);
|
||||
tbLineX2.Name = "tbLineX2";
|
||||
tbLineX2.Size = new Size(136, 23);
|
||||
tbLineX2.TabIndex = 9;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
label8.AutoSize = true;
|
||||
label8.Location = new Point(6, 83);
|
||||
label8.Name = "label8";
|
||||
label8.Size = new Size(26, 17);
|
||||
label8.TabIndex = 8;
|
||||
label8.Text = "X2:";
|
||||
//
|
||||
// tbLineY2
|
||||
//
|
||||
tbLineY2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLineY2.Location = new Point(56, 109);
|
||||
tbLineY2.Name = "tbLineY2";
|
||||
tbLineY2.Size = new Size(136, 23);
|
||||
tbLineY2.TabIndex = 7;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
label5.AutoSize = true;
|
||||
label5.Location = new Point(6, 112);
|
||||
label5.Name = "label5";
|
||||
label5.Size = new Size(25, 17);
|
||||
label5.TabIndex = 6;
|
||||
label5.Text = "Y2:";
|
||||
//
|
||||
// tbLineX1
|
||||
//
|
||||
tbLineX1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLineX1.Location = new Point(56, 22);
|
||||
tbLineX1.Name = "tbLineX1";
|
||||
tbLineX1.Size = new Size(136, 23);
|
||||
tbLineX1.TabIndex = 5;
|
||||
//
|
||||
// tbLineY1
|
||||
//
|
||||
tbLineY1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLineY1.Location = new Point(56, 51);
|
||||
tbLineY1.Name = "tbLineY1";
|
||||
tbLineY1.Size = new Size(136, 23);
|
||||
tbLineY1.TabIndex = 4;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
label6.AutoSize = true;
|
||||
label6.Location = new Point(6, 54);
|
||||
label6.Name = "label6";
|
||||
label6.Size = new Size(25, 17);
|
||||
label6.TabIndex = 1;
|
||||
label6.Text = "Y1:";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
label7.AutoSize = true;
|
||||
label7.Location = new Point(6, 25);
|
||||
label7.Name = "label7";
|
||||
label7.Size = new Size(26, 17);
|
||||
label7.TabIndex = 0;
|
||||
label7.Text = "X1:";
|
||||
//
|
||||
// ctrlTitleBar
|
||||
//
|
||||
ctrlTitleBar.Dock = DockStyle.Top;
|
||||
ctrlTitleBar.Location = new Point(0, 0);
|
||||
ctrlTitleBar.MinimumSize = new Size(0, 36);
|
||||
ctrlTitleBar.Name = "ctrlTitleBar";
|
||||
ctrlTitleBar.Padding = new Padding(3);
|
||||
ctrlTitleBar.Size = new Size(198, 36);
|
||||
ctrlTitleBar.TabIndex = 11;
|
||||
ctrlTitleBar.Title = "直线测量";
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
panel1.BorderStyle = BorderStyle.FixedSingle;
|
||||
panel1.Controls.Add(canvas);
|
||||
panel1.Controls.Add(statusStrip1);
|
||||
panel1.Dock = DockStyle.Fill;
|
||||
panel1.Location = new Point(0, 0);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new Size(1076, 640);
|
||||
panel1.TabIndex = 1;
|
||||
//
|
||||
// canvas
|
||||
//
|
||||
canvas.AllowMultiSelect = false;
|
||||
canvas.CreateMode = Canvas.Shape.ShapeTypeEnum.Polygon;
|
||||
canvas.Dock = DockStyle.Fill;
|
||||
canvas.Enabled = false;
|
||||
canvas.FillDrawing = false;
|
||||
canvas.Location = new Point(0, 0);
|
||||
canvas.Margin = new Padding(2);
|
||||
canvas.Name = "canvas";
|
||||
canvas.OutsideShapes = (List<Canvas.Shape.FlyShape>)resources.GetObject("canvas.OutsideShapes");
|
||||
canvas.Scale = 1F;
|
||||
canvas.Shapes = (List<Canvas.Shape.FlyShape>)resources.GetObject("canvas.Shapes");
|
||||
canvas.Size = new Size(1074, 616);
|
||||
canvas.TabIndex = 2;
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
statusStrip1.Items.AddRange(new ToolStripItem[] { lblStatus });
|
||||
statusStrip1.Location = new Point(0, 616);
|
||||
statusStrip1.Name = "statusStrip1";
|
||||
statusStrip1.Size = new Size(1074, 22);
|
||||
statusStrip1.TabIndex = 1;
|
||||
statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// lblStatus
|
||||
//
|
||||
lblStatus.Name = "lblStatus";
|
||||
lblStatus.Size = new Size(44, 17);
|
||||
lblStatus.Text = " ";
|
||||
//
|
||||
// GuideLineCtrl
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 17F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
Controls.Add(splitContainer);
|
||||
Controls.Add(lblElapsed);
|
||||
Controls.Add(label4);
|
||||
Name = "GuideLineCtrl";
|
||||
Size = new Size(1280, 640);
|
||||
Load += GuideLineCircleCtrl_Load;
|
||||
splitContainer.Panel1.ResumeLayout(false);
|
||||
splitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)splitContainer).EndInit();
|
||||
splitContainer.ResumeLayout(false);
|
||||
panelGuide.ResumeLayout(false);
|
||||
panelGuide.PerformLayout();
|
||||
groupBox2.ResumeLayout(false);
|
||||
groupBox2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)NumRectWidth1).EndInit();
|
||||
panel1.ResumeLayout(false);
|
||||
panel1.PerformLayout();
|
||||
statusStrip1.ResumeLayout(false);
|
||||
statusStrip1.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Label lblElapsed;
|
||||
private Label label4;
|
||||
|
||||
private SplitContainer splitContainer;
|
||||
private Panel panelGuide;
|
||||
private Panel panel1;
|
||||
private Canvas.UI.FlyCanvas canvas;
|
||||
private StatusStrip statusStrip1;
|
||||
private ToolStripStatusLabel lblStatus;
|
||||
private GroupBox groupBox2;
|
||||
private TextBox tbLineX2;
|
||||
private Label label8;
|
||||
private TextBox tbLineY2;
|
||||
private Label label5;
|
||||
private TextBox tbLineX1;
|
||||
private TextBox tbLineY1;
|
||||
private Label label6;
|
||||
private Label label7;
|
||||
private SizeCtrlTitleBar ctrlTitleBar;
|
||||
private Button btnLoadImage;
|
||||
private Label label9;
|
||||
private Button btnExecute;
|
||||
private Label label10;
|
||||
private Button btnCreateLine;
|
||||
private TextBox tbRectWidth1;
|
||||
private Label label11;
|
||||
private NumericUpDown NumRectWidth1;
|
||||
private Label lblResult;
|
||||
private Label label1;
|
||||
private Button btnSave;
|
||||
}
|
||||
}
|
387
CanFly/UI/SizePanel/SizeGuideLineCtrl.cs
Normal file
387
CanFly/UI/SizePanel/SizeGuideLineCtrl.cs
Normal file
@ -0,0 +1,387 @@
|
||||
using CanFly.Canvas.Helper;
|
||||
using CanFly.Canvas.Shape;
|
||||
using CanFly.Canvas.UI;
|
||||
using CanFly.Helper;
|
||||
using HalconDotNet;
|
||||
using OpenCvSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace CanFly.UI.SizePanel
|
||||
{
|
||||
public partial class SizeGuideLineCtrl : SizeBaseGuideControl
|
||||
{
|
||||
|
||||
|
||||
|
||||
private FlyShape? _line;
|
||||
|
||||
|
||||
private float _lineX1;
|
||||
private float _lineY1;
|
||||
private float _lineX2;
|
||||
private float _lineY2;
|
||||
private float _lineWidth;
|
||||
private PointF[] _rectPoints = new PointF[4];
|
||||
//private float _LineLX=new float();
|
||||
//private float _LineLY =new float();
|
||||
//private float _LineRX =new float();
|
||||
//private float _LineRY =new float();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected override string GetScriptFileName() => "Line_detect.hdvp";
|
||||
|
||||
|
||||
|
||||
public SizeGuideLineCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.canvas.mouseMoved += Canvas_mouseMoved;
|
||||
this.canvas.OnShapeUpdateEvent += UpdateShape;
|
||||
this.canvas.selectionChanged += Canvas_selectionChanged;
|
||||
|
||||
this.canvas.OnShapeMoving += Canvas_OnShapeMoving;
|
||||
this.canvas.newShape += Canvas_newShape;
|
||||
|
||||
this.ctrlTitleBar.OnCloseClicked += OnControlClose;
|
||||
|
||||
NumRectWidth1.ValueChanged -= NumRectWidth1_ValueChanged;
|
||||
NumRectWidth1.Value = 40;
|
||||
NumRectWidth1.ValueChanged += NumRectWidth1_ValueChanged;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected override void UpdateShape(FlyShape shape)
|
||||
{
|
||||
switch (shape.ShapeType)
|
||||
{
|
||||
case ShapeTypeEnum.Line:
|
||||
this._line = shape;
|
||||
_line.IsDrawLineVirtualRect = true;
|
||||
var pts = this._line.Points;
|
||||
|
||||
_lineX1 = pts[0].X;
|
||||
_lineY1 = pts[0].Y;
|
||||
_lineX2 = pts[1].X;
|
||||
_lineY2 = pts[1].Y;
|
||||
_lineWidth = shape.LineVirtualRectWidth;
|
||||
_rectPoints = shape.LineVirtualRectPoints;
|
||||
//_LineLX = (shape.LineVirtualRectPoints[0].X + shape.LineVirtualRectPoints[3].X) / 2;
|
||||
//_LineLY = (shape.LineVirtualRectPoints[0].Y + shape.LineVirtualRectPoints[3].Y) / 2;
|
||||
//_LineRX = (shape.LineVirtualRectPoints[1].X + shape.LineVirtualRectPoints[2].X) / 2;
|
||||
//_LineRY = (shape.LineVirtualRectPoints[1].Y + shape.LineVirtualRectPoints[2].Y) / 2;
|
||||
|
||||
tbLineX1.Text = _lineX1.ToString("F3");
|
||||
tbLineY1.Text = _lineY1.ToString("F3");
|
||||
tbLineX2.Text = _lineX2.ToString("F3");
|
||||
tbLineY2.Text = _lineY2.ToString("F3");
|
||||
// NumRectWidth1.Value = (decimal)_lineWidth;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void GuideLineCircleCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void Canvas_mouseMoved(PointF pos)
|
||||
{
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke(Canvas_mouseMoved, pos);
|
||||
return;
|
||||
}
|
||||
|
||||
lblStatus.Text = $"X:{pos.X}, Y:{pos.Y}";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void Canvas_selectionChanged(List<FlyShape> shapes)
|
||||
{
|
||||
//if (shapes.Count != 1)
|
||||
//{
|
||||
// // panelGuide.Controls.Clear();
|
||||
// return;
|
||||
//}
|
||||
//SwitchGuideForm(shapes[0].ShapeType);
|
||||
// Canvas_OnShapeUpdateEvent(shapes[0]);
|
||||
|
||||
if (shapes.Count != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
UpdateShape(shapes[0]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void Canvas_OnShapeMoving(List<FlyShape> shapes)
|
||||
{
|
||||
if (shapes.Count != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
UpdateShape(shapes[0]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void btnCreateLine_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.canvas.pixmap == null)
|
||||
{
|
||||
MessageBox.Show("请先打开图片");
|
||||
return;
|
||||
}
|
||||
|
||||
tbLineX1.Text = string.Empty;
|
||||
tbLineY1.Text = string.Empty;
|
||||
tbLineX2.Text = string.Empty;
|
||||
tbLineY2.Text = string.Empty;
|
||||
|
||||
|
||||
this.canvas.Shapes.RemoveAll(shp => shp.ShapeType == ShapeTypeEnum.Line);
|
||||
this.canvas.Invalidate();
|
||||
this.canvas.StartDraw(ShapeTypeEnum.Line);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void btnLoadImage_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenImageFile(bitmap =>
|
||||
{
|
||||
this.canvas.LoadPixmap(bitmap);
|
||||
this.canvas.Enabled = true;
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void Canvas_newShape()
|
||||
{
|
||||
this.canvas.StopDraw();
|
||||
}
|
||||
string strarrayX = string.Empty;
|
||||
string strarrayY = string.Empty;
|
||||
private void btnExecute_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.canvas.pixmap == null)
|
||||
{
|
||||
MessageBox.Show("请先打开图片");
|
||||
return;
|
||||
}
|
||||
if (this.tbLineX1.Text.Trim().Length == 0)
|
||||
{
|
||||
MessageBox.Show("请先创建直线");
|
||||
return;
|
||||
}
|
||||
this.canvas.OutsideShapes.Clear();
|
||||
this.canvas.Invalidate();
|
||||
|
||||
|
||||
flag = new List<double>();
|
||||
RowBegin = new List<double>();
|
||||
ColBegin = new List<double>();
|
||||
RowEnd = new List<double>();
|
||||
ColEnd = new List<double>();
|
||||
Dictionary<string, HObject> inputImg = new Dictionary<string, HObject>();
|
||||
|
||||
if (hImage == null)
|
||||
{
|
||||
HOperatorSet.ReadImage(out hImage, CurrentImageFile);
|
||||
}
|
||||
inputImg["INPUT_Image"] = hImage;
|
||||
// 创建一维数组
|
||||
|
||||
Dictionary<string, HTuple> inputPara = new Dictionary<string, HTuple>();
|
||||
|
||||
// 获取矩形的 4 个点
|
||||
PointF[] Points = this._line.LineVirtualRectPoints;
|
||||
PointF Point1 = Points[0];
|
||||
PointF Point2 = Points[1];
|
||||
PointF Point3 = Points[2];
|
||||
PointF Point4 = Points[3];
|
||||
PointF Point5 = Points[0];
|
||||
|
||||
float x1 = Point1.X;
|
||||
float y1 = Point1.Y;
|
||||
|
||||
float x2 = Point2.X;
|
||||
float y2 = Point2.Y;
|
||||
|
||||
float x3 = Point3.X;
|
||||
float y3 = Point3.Y;
|
||||
|
||||
float x4 = Point4.X;
|
||||
float y4 = Point4.Y;
|
||||
|
||||
float x5 = Point5.X;
|
||||
float y5 = Point5.Y;
|
||||
|
||||
|
||||
float[] arrayX = new float[] { x1, x2, x3, x4, x5 };
|
||||
HTuple hTupleArrayX = new HTuple(arrayX);
|
||||
|
||||
float[] arrayY = new float[] { y1, y2, y3, y4, y5 };
|
||||
HTuple hTupleArrayY = new HTuple(arrayY);
|
||||
|
||||
strarrayX = string.Join(",", arrayX);
|
||||
strarrayY = string.Join(",", arrayY);
|
||||
|
||||
inputPara["LX"] = _lineX1;
|
||||
inputPara["LY"] = _lineY1;
|
||||
inputPara["RX"] = _lineX2;
|
||||
inputPara["RY"] = _lineY2;
|
||||
inputPara["XRect"] = hTupleArrayX;
|
||||
inputPara["YRect"] = hTupleArrayY;
|
||||
|
||||
|
||||
|
||||
List<string> outputKeys = new List<string>()
|
||||
{
|
||||
"OUTPUT_Flag",
|
||||
"RowBegin",
|
||||
"ColBegin",
|
||||
"RowEnd",
|
||||
"ColEnd"
|
||||
};
|
||||
|
||||
ExecuteHScript(
|
||||
inputImg,
|
||||
inputPara,
|
||||
outputKeys);
|
||||
|
||||
}
|
||||
|
||||
|
||||
List<double> flag = new List<double>();
|
||||
List<double> RowBegin = new List<double>();
|
||||
List<double> ColBegin = new List<double>();
|
||||
List<double> RowEnd = new List<double>();
|
||||
List<double> ColEnd = new List<double>();
|
||||
|
||||
|
||||
protected override void OnExecuteHScriptResult(
|
||||
bool success,
|
||||
Dictionary<string, HTuple> resultDic,
|
||||
int timeElasped)
|
||||
{
|
||||
if (!success)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
"OUTPUT_Flag",
|
||||
"RXCenter",
|
||||
"RYCenter",
|
||||
"RRadius"
|
||||
*/
|
||||
|
||||
flag = resultDic["OUTPUT_Flag"].HTupleToDouble();
|
||||
RowBegin = resultDic["RowBegin"].HTupleToDouble();
|
||||
ColBegin = resultDic["ColBegin"].HTupleToDouble();
|
||||
RowEnd = resultDic["RowEnd"].HTupleToDouble();
|
||||
ColEnd = resultDic["ColEnd"].HTupleToDouble();
|
||||
if (flag.Count > 0)
|
||||
{
|
||||
lblResult.Text = flag[0].ToString();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
lblResult.Text = "无";
|
||||
}
|
||||
if (flag.Count > 0 && RowBegin.Count > 0 && ColBegin.Count > 0 && RowEnd.Count > 0 && ColEnd.Count > 0)
|
||||
{
|
||||
float width = 0;
|
||||
this.canvas.DrawLine(new PointF((float)ColBegin[0], (float)RowBegin[0]), new PointF((float)ColEnd[0], (float)RowEnd[0]), width);
|
||||
this.canvas.Invalidate();
|
||||
lblElapsed.Text = $"{timeElasped} ms";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void NumRectWidth1_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (_line != null)
|
||||
{
|
||||
//_line1.IsDrawLineVirtualRect = true;
|
||||
_line.LineVirtualRectWidth = (float)NumRectWidth1.Value;
|
||||
UpdateShape(_line);
|
||||
this.canvas.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lblResult.Text.Equals("无"))
|
||||
{
|
||||
MessageBox.Show("请先进行绘制");
|
||||
return;
|
||||
}
|
||||
if (lblResult.Text != "0")
|
||||
{
|
||||
MessageBox.Show("测量计算错误,无法保存");
|
||||
return;
|
||||
}
|
||||
//flag = resultDic["OUTPUT_Flag"].HTupleToDouble();
|
||||
//RowBegin = resultDic["RowBegin"].HTupleToDouble();
|
||||
//ColBegin = resultDic["ColBegin"].HTupleToDouble();
|
||||
//RowEnd = resultDic["RowEnd"].HTupleToDouble();
|
||||
//ColEnd = resultDic["ColEnd"].HTupleToDouble();
|
||||
|
||||
|
||||
string input = $"LX:{_lineX1};" +
|
||||
$"LY:{_lineY1};" +
|
||||
$"RX:{_lineX2};" +
|
||||
$"RY:{_lineY2};" +
|
||||
$"Line_XRect:{strarrayX};" +
|
||||
$"Line_YRect:{strarrayY}";
|
||||
|
||||
|
||||
string result = $"RowBegin:{string.Join(";", RowBegin[0])};ColBegin:{string.Join(";", ColBegin[0])};RowEnd:{string.Join(";", RowEnd[0])};ColEnd:{string.Join(";", ColEnd[0])}";
|
||||
|
||||
DataToTriggerEvent(input, result);
|
||||
}
|
||||
}
|
||||
}
|
145
CanFly/UI/SizePanel/SizeGuideLineCtrl.resx
Normal file
145
CanFly/UI/SizePanel/SizeGuideLineCtrl.resx
Normal file
@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="canvas.OutsideShapes" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAERDYW5GbHkuQ2FudmFzLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1
|
||||
cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAQBAAAAdlN5c3RlbS5Db2xsZWN0aW9ucy5HZW5l
|
||||
cmljLkxpc3RgMVtbQ2FuRmx5LkNhbnZhcy5TaGFwZS5GbHlTaGFwZSwgQ2FuRmx5LkNhbnZhcywgQ3Vs
|
||||
dHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsXV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lv
|
||||
bgQAAB5DYW5GbHkuQ2FudmFzLlNoYXBlLkZseVNoYXBlW10CAAAACAgJAwAAAAAAAAAAAAAADAQAAAAz
|
||||
Q2FuRmx5LkNhbnZhcywgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBwMAAAAAAQAA
|
||||
AAAAAAAEHENhbkZseS5DYW52YXMuU2hhcGUuRmx5U2hhcGUEAAAACw==
|
||||
</value>
|
||||
</data>
|
||||
<data name="canvas.Shapes" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAERDYW5GbHkuQ2FudmFzLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1
|
||||
cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAQBAAAAdlN5c3RlbS5Db2xsZWN0aW9ucy5HZW5l
|
||||
cmljLkxpc3RgMVtbQ2FuRmx5LkNhbnZhcy5TaGFwZS5GbHlTaGFwZSwgQ2FuRmx5LkNhbnZhcywgQ3Vs
|
||||
dHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsXV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lv
|
||||
bgQAAB5DYW5GbHkuQ2FudmFzLlNoYXBlLkZseVNoYXBlW10CAAAACAgJAwAAAAAAAAAAAAAADAQAAAAz
|
||||
Q2FuRmx5LkNhbnZhcywgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBwMAAAAAAQAA
|
||||
AAAAAAAEHENhbkZseS5DYW52YXMuU2hhcGUuRmx5U2hhcGUEAAAACw==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
570
CanFly/UI/SizePanel/SizeGuideLineLineCtrl.Designer.cs
generated
Normal file
570
CanFly/UI/SizePanel/SizeGuideLineLineCtrl.Designer.cs
generated
Normal file
@ -0,0 +1,570 @@
|
||||
namespace CanFly.UI.SizePanel
|
||||
{
|
||||
partial class SizeGuideLineLineCtrl
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SizeGuideLineLineCtrl));
|
||||
lblStatus = new ToolStripStatusLabel();
|
||||
panel1 = new Panel();
|
||||
canvas = new Canvas.UI.FlyCanvas();
|
||||
statusStrip1 = new StatusStrip();
|
||||
ctrlTitleBar = new SizeCtrlTitleBar();
|
||||
tbLine1X2 = new TextBox();
|
||||
label8 = new Label();
|
||||
tbLine1Y2 = new TextBox();
|
||||
label5 = new Label();
|
||||
label10 = new Label();
|
||||
tbLine1X1 = new TextBox();
|
||||
tbLine1Y1 = new TextBox();
|
||||
label6 = new Label();
|
||||
label7 = new Label();
|
||||
btnLoadImage = new Button();
|
||||
label9 = new Label();
|
||||
btnExecute = new Button();
|
||||
panelGuide = new Panel();
|
||||
lblDistance = new Label();
|
||||
label17 = new Label();
|
||||
lblResult = new Label();
|
||||
label15 = new Label();
|
||||
groupBox3 = new GroupBox();
|
||||
NumRectWidth2 = new NumericUpDown();
|
||||
label2 = new Label();
|
||||
tbLine2X2 = new TextBox();
|
||||
label11 = new Label();
|
||||
tbLine2Y2 = new TextBox();
|
||||
label12 = new Label();
|
||||
tbLine2X1 = new TextBox();
|
||||
tbLine2Y1 = new TextBox();
|
||||
label13 = new Label();
|
||||
label14 = new Label();
|
||||
groupBox2 = new GroupBox();
|
||||
NumRectWidth1 = new NumericUpDown();
|
||||
label1 = new Label();
|
||||
splitContainer = new SplitContainer();
|
||||
lblElapsed = new Label();
|
||||
label4 = new Label();
|
||||
btnSave = new Button();
|
||||
panel1.SuspendLayout();
|
||||
statusStrip1.SuspendLayout();
|
||||
panelGuide.SuspendLayout();
|
||||
groupBox3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)NumRectWidth2).BeginInit();
|
||||
groupBox2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)NumRectWidth1).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)splitContainer).BeginInit();
|
||||
splitContainer.Panel1.SuspendLayout();
|
||||
splitContainer.Panel2.SuspendLayout();
|
||||
splitContainer.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// lblStatus
|
||||
//
|
||||
lblStatus.Name = "lblStatus";
|
||||
lblStatus.Size = new Size(44, 17);
|
||||
lblStatus.Text = " ";
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
panel1.BorderStyle = BorderStyle.FixedSingle;
|
||||
panel1.Controls.Add(canvas);
|
||||
panel1.Controls.Add(statusStrip1);
|
||||
panel1.Dock = DockStyle.Fill;
|
||||
panel1.Location = new Point(0, 0);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new Size(1076, 640);
|
||||
panel1.TabIndex = 1;
|
||||
//
|
||||
// canvas
|
||||
//
|
||||
canvas.AllowMultiSelect = false;
|
||||
canvas.CreateMode = Canvas.Shape.ShapeTypeEnum.Polygon;
|
||||
canvas.Dock = DockStyle.Fill;
|
||||
canvas.Enabled = false;
|
||||
canvas.FillDrawing = false;
|
||||
canvas.Location = new Point(0, 0);
|
||||
canvas.Margin = new Padding(2);
|
||||
canvas.Name = "canvas";
|
||||
canvas.OutsideShapes = (List<Canvas.Shape.FlyShape>)resources.GetObject("canvas.OutsideShapes");
|
||||
canvas.Scale = 1F;
|
||||
canvas.Shapes = (List<Canvas.Shape.FlyShape>)resources.GetObject("canvas.Shapes");
|
||||
canvas.Size = new Size(1074, 616);
|
||||
canvas.TabIndex = 2;
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
statusStrip1.Items.AddRange(new ToolStripItem[] { lblStatus });
|
||||
statusStrip1.Location = new Point(0, 616);
|
||||
statusStrip1.Name = "statusStrip1";
|
||||
statusStrip1.Size = new Size(1074, 22);
|
||||
statusStrip1.TabIndex = 1;
|
||||
statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// ctrlTitleBar
|
||||
//
|
||||
ctrlTitleBar.Dock = DockStyle.Top;
|
||||
ctrlTitleBar.Location = new Point(0, 0);
|
||||
ctrlTitleBar.MinimumSize = new Size(0, 36);
|
||||
ctrlTitleBar.Name = "ctrlTitleBar";
|
||||
ctrlTitleBar.Padding = new Padding(3);
|
||||
ctrlTitleBar.Size = new Size(198, 36);
|
||||
ctrlTitleBar.TabIndex = 11;
|
||||
ctrlTitleBar.Title = "线线测量";
|
||||
//
|
||||
// tbLine1X2
|
||||
//
|
||||
tbLine1X2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLine1X2.Location = new Point(56, 80);
|
||||
tbLine1X2.Name = "tbLine1X2";
|
||||
tbLine1X2.Size = new Size(134, 23);
|
||||
tbLine1X2.TabIndex = 9;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
label8.AutoSize = true;
|
||||
label8.Location = new Point(6, 83);
|
||||
label8.Name = "label8";
|
||||
label8.Size = new Size(26, 17);
|
||||
label8.TabIndex = 8;
|
||||
label8.Text = "X2:";
|
||||
//
|
||||
// tbLine1Y2
|
||||
//
|
||||
tbLine1Y2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLine1Y2.Location = new Point(56, 109);
|
||||
tbLine1Y2.Name = "tbLine1Y2";
|
||||
tbLine1Y2.Size = new Size(134, 23);
|
||||
tbLine1Y2.TabIndex = 7;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
label5.AutoSize = true;
|
||||
label5.Location = new Point(6, 112);
|
||||
label5.Name = "label5";
|
||||
label5.Size = new Size(25, 17);
|
||||
label5.TabIndex = 6;
|
||||
label5.Text = "Y2:";
|
||||
//
|
||||
// label10
|
||||
//
|
||||
label10.AutoSize = true;
|
||||
label10.Location = new Point(6, 521);
|
||||
label10.Name = "label10";
|
||||
label10.Size = new Size(44, 17);
|
||||
label10.TabIndex = 16;
|
||||
label10.Text = "耗时:";
|
||||
//
|
||||
// tbLine1X1
|
||||
//
|
||||
tbLine1X1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLine1X1.Location = new Point(56, 22);
|
||||
tbLine1X1.Name = "tbLine1X1";
|
||||
tbLine1X1.Size = new Size(134, 23);
|
||||
tbLine1X1.TabIndex = 5;
|
||||
//
|
||||
// tbLine1Y1
|
||||
//
|
||||
tbLine1Y1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLine1Y1.Location = new Point(56, 51);
|
||||
tbLine1Y1.Name = "tbLine1Y1";
|
||||
tbLine1Y1.Size = new Size(134, 23);
|
||||
tbLine1Y1.TabIndex = 4;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
label6.AutoSize = true;
|
||||
label6.Location = new Point(6, 54);
|
||||
label6.Name = "label6";
|
||||
label6.Size = new Size(25, 17);
|
||||
label6.TabIndex = 1;
|
||||
label6.Text = "Y1:";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
label7.AutoSize = true;
|
||||
label7.Location = new Point(6, 25);
|
||||
label7.Name = "label7";
|
||||
label7.Size = new Size(26, 17);
|
||||
label7.TabIndex = 0;
|
||||
label7.Text = "X1:";
|
||||
//
|
||||
// btnLoadImage
|
||||
//
|
||||
btnLoadImage.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnLoadImage.Location = new Point(6, 394);
|
||||
btnLoadImage.Name = "btnLoadImage";
|
||||
btnLoadImage.Size = new Size(184, 32);
|
||||
btnLoadImage.TabIndex = 18;
|
||||
btnLoadImage.Text = "打开图片";
|
||||
btnLoadImage.UseVisualStyleBackColor = true;
|
||||
btnLoadImage.Click += btnLoadImage_Click;
|
||||
//
|
||||
// label9
|
||||
//
|
||||
label9.AutoSize = true;
|
||||
label9.Location = new Point(54, 521);
|
||||
label9.Name = "label9";
|
||||
label9.Size = new Size(32, 17);
|
||||
label9.TabIndex = 17;
|
||||
label9.Text = "0ms";
|
||||
//
|
||||
// btnExecute
|
||||
//
|
||||
btnExecute.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnExecute.Location = new Point(5, 432);
|
||||
btnExecute.Name = "btnExecute";
|
||||
btnExecute.Size = new Size(184, 32);
|
||||
btnExecute.TabIndex = 15;
|
||||
btnExecute.Text = "执行";
|
||||
btnExecute.UseVisualStyleBackColor = true;
|
||||
btnExecute.Click += btnExecute_Click;
|
||||
//
|
||||
// panelGuide
|
||||
//
|
||||
panelGuide.BorderStyle = BorderStyle.FixedSingle;
|
||||
panelGuide.Controls.Add(btnSave);
|
||||
panelGuide.Controls.Add(lblDistance);
|
||||
panelGuide.Controls.Add(label17);
|
||||
panelGuide.Controls.Add(lblResult);
|
||||
panelGuide.Controls.Add(label15);
|
||||
panelGuide.Controls.Add(groupBox3);
|
||||
panelGuide.Controls.Add(btnLoadImage);
|
||||
panelGuide.Controls.Add(label9);
|
||||
panelGuide.Controls.Add(btnExecute);
|
||||
panelGuide.Controls.Add(label10);
|
||||
panelGuide.Controls.Add(groupBox2);
|
||||
panelGuide.Controls.Add(ctrlTitleBar);
|
||||
panelGuide.Dock = DockStyle.Fill;
|
||||
panelGuide.Location = new Point(0, 0);
|
||||
panelGuide.Name = "panelGuide";
|
||||
panelGuide.Size = new Size(200, 640);
|
||||
panelGuide.TabIndex = 0;
|
||||
//
|
||||
// lblDistance
|
||||
//
|
||||
lblDistance.AutoSize = true;
|
||||
lblDistance.Location = new Point(54, 493);
|
||||
lblDistance.Name = "lblDistance";
|
||||
lblDistance.Size = new Size(15, 17);
|
||||
lblDistance.TabIndex = 25;
|
||||
lblDistance.Text = "0";
|
||||
//
|
||||
// label17
|
||||
//
|
||||
label17.AutoSize = true;
|
||||
label17.Location = new Point(6, 493);
|
||||
label17.Name = "label17";
|
||||
label17.Size = new Size(44, 17);
|
||||
label17.TabIndex = 24;
|
||||
label17.Text = "距离:";
|
||||
//
|
||||
// lblResult
|
||||
//
|
||||
lblResult.AutoSize = true;
|
||||
lblResult.Location = new Point(54, 467);
|
||||
lblResult.Name = "lblResult";
|
||||
lblResult.Size = new Size(20, 17);
|
||||
lblResult.TabIndex = 23;
|
||||
lblResult.Text = "无";
|
||||
//
|
||||
// label15
|
||||
//
|
||||
label15.AutoSize = true;
|
||||
label15.Location = new Point(6, 467);
|
||||
label15.Name = "label15";
|
||||
label15.Size = new Size(44, 17);
|
||||
label15.TabIndex = 22;
|
||||
label15.Text = "结果:";
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
groupBox3.Controls.Add(NumRectWidth2);
|
||||
groupBox3.Controls.Add(label2);
|
||||
groupBox3.Controls.Add(tbLine2X2);
|
||||
groupBox3.Controls.Add(label11);
|
||||
groupBox3.Controls.Add(tbLine2Y2);
|
||||
groupBox3.Controls.Add(label12);
|
||||
groupBox3.Controls.Add(tbLine2X1);
|
||||
groupBox3.Controls.Add(tbLine2Y1);
|
||||
groupBox3.Controls.Add(label13);
|
||||
groupBox3.Controls.Add(label14);
|
||||
groupBox3.Dock = DockStyle.Top;
|
||||
groupBox3.Location = new Point(0, 216);
|
||||
groupBox3.Name = "groupBox3";
|
||||
groupBox3.Size = new Size(198, 172);
|
||||
groupBox3.TabIndex = 21;
|
||||
groupBox3.TabStop = false;
|
||||
groupBox3.Text = "线2参数";
|
||||
//
|
||||
// NumRectWidth2
|
||||
//
|
||||
NumRectWidth2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
NumRectWidth2.Location = new Point(53, 138);
|
||||
NumRectWidth2.Maximum = new decimal(new int[] { 9000, 0, 0, 0 });
|
||||
NumRectWidth2.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
|
||||
NumRectWidth2.Name = "NumRectWidth2";
|
||||
NumRectWidth2.Size = new Size(136, 23);
|
||||
NumRectWidth2.TabIndex = 13;
|
||||
NumRectWidth2.Value = new decimal(new int[] { 1, 0, 0, 0 });
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.AutoSize = true;
|
||||
label2.Location = new Point(6, 140);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new Size(35, 17);
|
||||
label2.TabIndex = 12;
|
||||
label2.Text = "宽度:";
|
||||
//
|
||||
// tbLine2X2
|
||||
//
|
||||
tbLine2X2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLine2X2.Location = new Point(56, 80);
|
||||
tbLine2X2.Name = "tbLine2X2";
|
||||
tbLine2X2.Size = new Size(134, 23);
|
||||
tbLine2X2.TabIndex = 9;
|
||||
//
|
||||
// label11
|
||||
//
|
||||
label11.AutoSize = true;
|
||||
label11.Location = new Point(6, 83);
|
||||
label11.Name = "label11";
|
||||
label11.Size = new Size(26, 17);
|
||||
label11.TabIndex = 8;
|
||||
label11.Text = "X2:";
|
||||
//
|
||||
// tbLine2Y2
|
||||
//
|
||||
tbLine2Y2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLine2Y2.Location = new Point(56, 109);
|
||||
tbLine2Y2.Name = "tbLine2Y2";
|
||||
tbLine2Y2.Size = new Size(136, 23);
|
||||
tbLine2Y2.TabIndex = 7;
|
||||
//
|
||||
// label12
|
||||
//
|
||||
label12.AutoSize = true;
|
||||
label12.Location = new Point(6, 112);
|
||||
label12.Name = "label12";
|
||||
label12.Size = new Size(25, 17);
|
||||
label12.TabIndex = 6;
|
||||
label12.Text = "Y2:";
|
||||
//
|
||||
// tbLine2X1
|
||||
//
|
||||
tbLine2X1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLine2X1.Location = new Point(56, 22);
|
||||
tbLine2X1.Name = "tbLine2X1";
|
||||
tbLine2X1.Size = new Size(134, 23);
|
||||
tbLine2X1.TabIndex = 5;
|
||||
//
|
||||
// tbLine2Y1
|
||||
//
|
||||
tbLine2Y1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbLine2Y1.Location = new Point(56, 51);
|
||||
tbLine2Y1.Name = "tbLine2Y1";
|
||||
tbLine2Y1.Size = new Size(134, 23);
|
||||
tbLine2Y1.TabIndex = 4;
|
||||
//
|
||||
// label13
|
||||
//
|
||||
label13.AutoSize = true;
|
||||
label13.Location = new Point(6, 54);
|
||||
label13.Name = "label13";
|
||||
label13.Size = new Size(25, 17);
|
||||
label13.TabIndex = 1;
|
||||
label13.Text = "Y1:";
|
||||
//
|
||||
// label14
|
||||
//
|
||||
label14.AutoSize = true;
|
||||
label14.Location = new Point(6, 25);
|
||||
label14.Name = "label14";
|
||||
label14.Size = new Size(26, 17);
|
||||
label14.TabIndex = 0;
|
||||
label14.Text = "X1:";
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
groupBox2.Controls.Add(NumRectWidth1);
|
||||
groupBox2.Controls.Add(label1);
|
||||
groupBox2.Controls.Add(tbLine1X2);
|
||||
groupBox2.Controls.Add(label8);
|
||||
groupBox2.Controls.Add(tbLine1Y2);
|
||||
groupBox2.Controls.Add(label5);
|
||||
groupBox2.Controls.Add(tbLine1X1);
|
||||
groupBox2.Controls.Add(tbLine1Y1);
|
||||
groupBox2.Controls.Add(label6);
|
||||
groupBox2.Controls.Add(label7);
|
||||
groupBox2.Dock = DockStyle.Top;
|
||||
groupBox2.Location = new Point(0, 36);
|
||||
groupBox2.Name = "groupBox2";
|
||||
groupBox2.Size = new Size(198, 180);
|
||||
groupBox2.TabIndex = 13;
|
||||
groupBox2.TabStop = false;
|
||||
groupBox2.Text = "线1参数";
|
||||
//
|
||||
// NumRectWidth1
|
||||
//
|
||||
NumRectWidth1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
NumRectWidth1.Location = new Point(54, 138);
|
||||
NumRectWidth1.Maximum = new decimal(new int[] { 9000, 0, 0, 0 });
|
||||
NumRectWidth1.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
|
||||
NumRectWidth1.Name = "NumRectWidth1";
|
||||
NumRectWidth1.Size = new Size(135, 23);
|
||||
NumRectWidth1.TabIndex = 11;
|
||||
NumRectWidth1.Value = new decimal(new int[] { 1, 0, 0, 0 });
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.AutoSize = true;
|
||||
label1.Location = new Point(6, 140);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(35, 17);
|
||||
label1.TabIndex = 10;
|
||||
label1.Text = "宽度:";
|
||||
//
|
||||
// splitContainer
|
||||
//
|
||||
splitContainer.Dock = DockStyle.Fill;
|
||||
splitContainer.Location = new Point(0, 0);
|
||||
splitContainer.Name = "splitContainer";
|
||||
//
|
||||
// splitContainer.Panel1
|
||||
//
|
||||
splitContainer.Panel1.Controls.Add(panelGuide);
|
||||
splitContainer.Panel1MinSize = 150;
|
||||
//
|
||||
// splitContainer.Panel2
|
||||
//
|
||||
splitContainer.Panel2.Controls.Add(panel1);
|
||||
splitContainer.Size = new Size(1280, 640);
|
||||
splitContainer.SplitterDistance = 200;
|
||||
splitContainer.TabIndex = 11;
|
||||
//
|
||||
// lblElapsed
|
||||
//
|
||||
lblElapsed.AutoSize = true;
|
||||
lblElapsed.Location = new Point(50, 328);
|
||||
lblElapsed.Name = "lblElapsed";
|
||||
lblElapsed.Size = new Size(32, 17);
|
||||
lblElapsed.TabIndex = 13;
|
||||
lblElapsed.Text = "0ms";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
label4.AutoSize = true;
|
||||
label4.Location = new Point(0, 328);
|
||||
label4.Name = "label4";
|
||||
label4.Size = new Size(44, 17);
|
||||
label4.TabIndex = 12;
|
||||
label4.Text = "耗时:";
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
btnSave.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnSave.Location = new Point(3, 541);
|
||||
btnSave.Name = "btnSave";
|
||||
btnSave.Size = new Size(186, 32);
|
||||
btnSave.TabIndex = 26;
|
||||
btnSave.Text = "保存数据";
|
||||
btnSave.UseVisualStyleBackColor = true;
|
||||
btnSave.Click += btnSave_Click;
|
||||
//
|
||||
// GuideLineLineCtrl
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 17F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
Controls.Add(splitContainer);
|
||||
Controls.Add(lblElapsed);
|
||||
Controls.Add(label4);
|
||||
Name = "GuideLineLineCtrl";
|
||||
Size = new Size(1280, 640);
|
||||
panel1.ResumeLayout(false);
|
||||
panel1.PerformLayout();
|
||||
statusStrip1.ResumeLayout(false);
|
||||
statusStrip1.PerformLayout();
|
||||
panelGuide.ResumeLayout(false);
|
||||
panelGuide.PerformLayout();
|
||||
groupBox3.ResumeLayout(false);
|
||||
groupBox3.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)NumRectWidth2).EndInit();
|
||||
groupBox2.ResumeLayout(false);
|
||||
groupBox2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)NumRectWidth1).EndInit();
|
||||
splitContainer.Panel1.ResumeLayout(false);
|
||||
splitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)splitContainer).EndInit();
|
||||
splitContainer.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private ToolStripStatusLabel lblStatus;
|
||||
private Panel panel1;
|
||||
private Canvas.UI.FlyCanvas canvas;
|
||||
private StatusStrip statusStrip1;
|
||||
private SizeCtrlTitleBar ctrlTitleBar;
|
||||
private TextBox tbLine1X2;
|
||||
private Label label8;
|
||||
private TextBox tbLine1Y2;
|
||||
private Label label5;
|
||||
private Label label10;
|
||||
private TextBox tbLine1X1;
|
||||
private TextBox tbLine1Y1;
|
||||
private Label label6;
|
||||
private Label label7;
|
||||
private Button btnLoadImage;
|
||||
private Label label9;
|
||||
private Button btnExecute;
|
||||
private Panel panelGuide;
|
||||
private GroupBox groupBox2;
|
||||
private SplitContainer splitContainer;
|
||||
private Label lblElapsed;
|
||||
private Label label4;
|
||||
private GroupBox groupBox3;
|
||||
private TextBox tbLine2X2;
|
||||
private Label label11;
|
||||
private TextBox tbLine2Y2;
|
||||
private Label label12;
|
||||
private TextBox tbLine2X1;
|
||||
private TextBox tbLine2Y1;
|
||||
private Label label13;
|
||||
private Label label14;
|
||||
private Label label1;
|
||||
private Label label2;
|
||||
private NumericUpDown NumRectWidth2;
|
||||
private NumericUpDown NumRectWidth1;
|
||||
private Label lblDistance;
|
||||
private Label label17;
|
||||
private Label lblResult;
|
||||
private Label label15;
|
||||
private Button btnSave;
|
||||
}
|
||||
}
|
526
CanFly/UI/SizePanel/SizeGuideLineLineCtrl.cs
Normal file
526
CanFly/UI/SizePanel/SizeGuideLineLineCtrl.cs
Normal file
@ -0,0 +1,526 @@
|
||||
using CanFly.Canvas.Helper;
|
||||
using CanFly.Canvas.Shape;
|
||||
using CanFly.Helper;
|
||||
using HalconDotNet;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace CanFly.UI.SizePanel
|
||||
{
|
||||
public partial class SizeGuideLineLineCtrl : SizeBaseGuideControl
|
||||
{
|
||||
private FlyShape? _line1;
|
||||
private FlyShape? _line2;
|
||||
|
||||
private float _line1X1;
|
||||
private float _line1Y1;
|
||||
private float _line1X2;
|
||||
private float _line1Y2;
|
||||
private float _lineWidth;
|
||||
|
||||
private float _line2X1;
|
||||
private float _line2Y1;
|
||||
private float _line2X2;
|
||||
private float _line2Y2;
|
||||
private float _line2Width;
|
||||
|
||||
protected override string GetScriptFileName() => "LineToLine.hdvp";
|
||||
|
||||
|
||||
public SizeGuideLineLineCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.canvas.mouseMoved += Canvas_mouseMoved;
|
||||
this.canvas.OnShapeUpdateEvent += UpdateShape;
|
||||
this.canvas.selectionChanged += Canvas_selectionChanged;
|
||||
|
||||
this.canvas.OnShapeMoving += Canvas_OnShapeMoving;
|
||||
this.canvas.newShape += Canvas_newShape;
|
||||
|
||||
this.ctrlTitleBar.OnCloseClicked += OnControlClose;
|
||||
NumRectWidth1.ValueChanged -= NumRectWidth1_ValueChanged;
|
||||
NumRectWidth1.Value = 40;
|
||||
NumRectWidth1.ValueChanged += NumRectWidth1_ValueChanged;
|
||||
|
||||
NumRectWidth2.ValueChanged -= NumericUpDown2_ValueChanged;
|
||||
NumRectWidth2.Value = 40;
|
||||
NumRectWidth2.ValueChanged += NumericUpDown2_ValueChanged;
|
||||
|
||||
}
|
||||
protected override void UpdateShape(FlyShape shape)
|
||||
{
|
||||
switch (shape.ShapeType)
|
||||
{
|
||||
case ShapeTypeEnum.Line:
|
||||
// 判断是否为第一条直线或第二条直线
|
||||
if (_line1 == shape)
|
||||
{
|
||||
//_line1 = shape;
|
||||
var pts1 = _line1.Points;
|
||||
_line1X1 = pts1[0].X;
|
||||
_line1Y1 = pts1[0].Y;
|
||||
_line1X2 = pts1[1].X;
|
||||
_line1Y2 = pts1[1].Y;
|
||||
_lineWidth = _line1.LineVirtualRectWidth;
|
||||
|
||||
tbLine1X1.Text = _line1X1.ToString("F3");
|
||||
tbLine1Y1.Text = _line1Y1.ToString("F3");
|
||||
tbLine1X2.Text = _line1X2.ToString("F3");
|
||||
tbLine1Y2.Text = _line1Y2.ToString("F3");
|
||||
//NumRectWidth1.Value = (decimal)_lineWidth;
|
||||
}
|
||||
else
|
||||
{
|
||||
//_line2 = shape;
|
||||
var pts2 = _line2.Points;
|
||||
_line2X1 = pts2[0].X;
|
||||
_line2Y1 = pts2[0].Y;
|
||||
_line2X2 = pts2[1].X;
|
||||
_line2Y2 = pts2[1].Y;
|
||||
_line2Width = _line2.LineVirtualRectWidth;
|
||||
|
||||
tbLine2X1.Text = _line2X1.ToString("F3");
|
||||
tbLine2Y1.Text = _line2Y1.ToString("F3");
|
||||
tbLine2X2.Text = _line2X2.ToString("F3");
|
||||
tbLine2Y2.Text = _line2Y2.ToString("F3");
|
||||
// NumRectWidth2.Value = (decimal)_line2Width;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void GuideLineCircleCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void Canvas_mouseMoved(PointF pos)
|
||||
{
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke(Canvas_mouseMoved, pos);
|
||||
return;
|
||||
}
|
||||
|
||||
lblStatus.Text = $"X:{pos.X}, Y:{pos.Y}";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void Canvas_selectionChanged(List<FlyShape> shapes)
|
||||
{
|
||||
//if (shapes.Count != 1)
|
||||
//{
|
||||
// // panelGuide.Controls.Clear();
|
||||
// return;
|
||||
//}
|
||||
//SwitchGuideForm(shapes[0].ShapeType);
|
||||
// Canvas_OnShapeUpdateEvent(shapes[0]);
|
||||
|
||||
if (shapes.Count != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
UpdateShape(shapes[0]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void Canvas_OnShapeMoving(List<FlyShape> shapes)
|
||||
{
|
||||
if (shapes.Count != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
UpdateShape(shapes[0]);
|
||||
}
|
||||
private void Canvas_newShape()
|
||||
{
|
||||
// 自动切换到下一条直线绘制
|
||||
if (_line1 == null)
|
||||
{
|
||||
_line1 = this.canvas.Shapes.LastOrDefault(shp => shp.ShapeType == ShapeTypeEnum.Line);
|
||||
}
|
||||
else if (_line2 == null)
|
||||
{
|
||||
_line2 = this.canvas.Shapes.LastOrDefault(shp => shp.ShapeType == ShapeTypeEnum.Line);
|
||||
}
|
||||
|
||||
// 停止绘制模式,用户可以根据需要重新启用
|
||||
this.canvas.StopDraw();
|
||||
//this.canvas.StopDraw();
|
||||
}
|
||||
|
||||
private void btnCreateLineOne_Click(object sender, EventArgs e)
|
||||
{
|
||||
// this.canvas.Shapes.RemoveAll(shp => shp == _line1); // 移除第一条直线
|
||||
this._line1 = null;
|
||||
this.canvas.Invalidate();
|
||||
this.canvas.StartDraw(ShapeTypeEnum.Line); // 启动绘制模式
|
||||
this.canvas.Enabled = true;
|
||||
}
|
||||
|
||||
private void btnCreateLineTwo_Click(object sender, EventArgs e)
|
||||
{
|
||||
// this.canvas.Shapes.RemoveAll(shp => shp == _line2); // 移除第二条直线
|
||||
this._line2 = null;
|
||||
this.canvas.Invalidate();
|
||||
this.canvas.StartDraw(ShapeTypeEnum.Line); // 启动绘制模式
|
||||
this.canvas.Enabled = true;
|
||||
}
|
||||
|
||||
private void btnExecute_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.canvas.pixmap == null)
|
||||
{
|
||||
MessageBox.Show("请先打开图片");
|
||||
return;
|
||||
}
|
||||
|
||||
this.canvas.OutsideShapes.Clear();
|
||||
this.canvas.Invalidate();
|
||||
|
||||
flag = new List<double>();
|
||||
Distance = new List<double>();
|
||||
Line1_RowBegin = new List<double>();
|
||||
Line1_ColBegin = new List<double>();
|
||||
Line1_RowEnd = new List<double>();
|
||||
Line1_ColEnd = new List<double>();
|
||||
Line2_RowBegin = new List<double>();
|
||||
Line2_ColBegin = new List<double>();
|
||||
Line2_RowEnd = new List<double>();
|
||||
Line2_ColEnd = new List<double>();
|
||||
Dictionary<string, HObject> inputImg = new Dictionary<string, HObject>();
|
||||
|
||||
if (hImage == null)
|
||||
{
|
||||
HOperatorSet.ReadImage(out hImage, CurrentImageFile);
|
||||
}
|
||||
inputImg["INPUT_Image"] = hImage;
|
||||
|
||||
Dictionary<string, HTuple> inputPara = new Dictionary<string, HTuple>();
|
||||
|
||||
|
||||
// 获取矩形的 4 个点
|
||||
PointF[] Points = this._line1.LineVirtualRectPoints;
|
||||
if (Points.Count() < 4)
|
||||
{
|
||||
return;
|
||||
}
|
||||
PointF Point1 = Points[0];
|
||||
PointF Point2 = Points[1];
|
||||
PointF Point3 = Points[2];
|
||||
PointF Point4 = Points[3];
|
||||
PointF Point5 = Points[0];
|
||||
|
||||
float x1 = Point1.X;
|
||||
float y1 = Point1.Y;
|
||||
|
||||
float x2 = Point2.X;
|
||||
float y2 = Point2.Y;
|
||||
|
||||
float x3 = Point3.X;
|
||||
float y3 = Point3.Y;
|
||||
|
||||
float x4 = Point4.X;
|
||||
float y4 = Point4.Y;
|
||||
|
||||
float x5 = Point5.X;
|
||||
float y5 = Point5.Y;
|
||||
|
||||
|
||||
float[] array1X = new float[] { x1, x2, x3, x4, x5 };
|
||||
HTuple hTupleArray1X = new HTuple(array1X);
|
||||
|
||||
float[] array1Y = new float[] { y1, y2, y3, y4, y5 };
|
||||
HTuple hTupleArray1Y = new HTuple(array1Y);
|
||||
|
||||
|
||||
strarray1X = string.Join(",", array1X);
|
||||
strarray1Y = string.Join(",", array1Y);
|
||||
|
||||
|
||||
// 获取矩形的 4 个点
|
||||
PointF[] Points2 = this._line2.LineVirtualRectPoints;
|
||||
if (Points2.Count() < 4)
|
||||
{
|
||||
return;
|
||||
}
|
||||
PointF Point21 = Points2[0];
|
||||
PointF Point22 = Points2[1];
|
||||
PointF Point23 = Points2[2];
|
||||
PointF Point24 = Points2[3];
|
||||
PointF Point25 = Points2[0];
|
||||
|
||||
float x21 = Point21.X;
|
||||
float y21 = Point21.Y;
|
||||
|
||||
float x22 = Point22.X;
|
||||
float y22 = Point22.Y;
|
||||
|
||||
float x23 = Point23.X;
|
||||
float y23 = Point23.Y;
|
||||
|
||||
float x24 = Point24.X;
|
||||
float y24 = Point24.Y;
|
||||
|
||||
float x25 = Point25.X;
|
||||
float y25 = Point25.Y;
|
||||
|
||||
|
||||
float[] array2X = new float[] { x21, x22, x23, x24, x25 };
|
||||
HTuple hTupleArray2X = new HTuple(array2X);
|
||||
|
||||
float[] array2Y = new float[] { y21, y22, y23, y24, y25 };
|
||||
HTuple hTupleArray2Y = new HTuple(array2Y);
|
||||
|
||||
|
||||
strarray2X = string.Join(",", array2X);
|
||||
strarray2Y = string.Join(",", array2Y);
|
||||
|
||||
inputPara["Line1_LX"] = _line1X1;
|
||||
inputPara["Line1_LY"] = _line1Y1;
|
||||
inputPara["Line1_RX"] = _line1X2;
|
||||
inputPara["Line1_RY"] = _line1Y2;
|
||||
|
||||
inputPara["Line2_LX"] = _line2X1;
|
||||
inputPara["Line2_LY"] = _line2Y1;
|
||||
inputPara["Line2_RX"] = _line2X2;
|
||||
inputPara["Line2_RY"] = _line2Y2;
|
||||
|
||||
|
||||
|
||||
inputPara["Line1_XRect"] = hTupleArray1X;
|
||||
inputPara["Line1_YRect"] = hTupleArray1Y;
|
||||
|
||||
inputPara["Line2_XRect"] = hTupleArray2X;
|
||||
inputPara["Line2_YRect"] = hTupleArray2Y;
|
||||
|
||||
List<string> outputKeys = new List<string>()
|
||||
{
|
||||
"OUTPUT_Flag",
|
||||
"Distance",
|
||||
"Line1_RowBegin",
|
||||
"Line1_ColBegin",
|
||||
"Line1_RowEnd",
|
||||
"Line1_ColEnd",
|
||||
"Line2_RowBegin",
|
||||
"Line2_ColBegin",
|
||||
"Line2_RowEnd",
|
||||
"Line2_ColEnd"
|
||||
|
||||
};
|
||||
|
||||
ExecuteHScript(
|
||||
inputImg,
|
||||
inputPara,
|
||||
outputKeys);
|
||||
}
|
||||
|
||||
|
||||
private void btnLoadImage_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenImageFile(bitmap =>
|
||||
{
|
||||
this.canvas.LoadPixmap(bitmap);
|
||||
this.canvas.Enabled = true;
|
||||
_line1 = new FlyShape();
|
||||
_line2 = new FlyShape();
|
||||
_line1.AddPoint(new Point(10, 10));
|
||||
_line1.AddPoint(new Point(50, 10));
|
||||
_line2.AddPoint(new Point(10, 20));
|
||||
_line2.AddPoint(new Point(60, 20));
|
||||
_line1.ShapeType = ShapeTypeEnum.Line;
|
||||
_line2.ShapeType = ShapeTypeEnum.Line;
|
||||
|
||||
_line1.IsDrawLineVirtualRect = true;
|
||||
_line1.LineVirtualRectWidth = 40;
|
||||
_line2.IsDrawLineVirtualRect = true;
|
||||
_line2.LineVirtualRectWidth = 40;
|
||||
|
||||
canvas.Shapes.Add(_line1);
|
||||
canvas.Shapes.Add(_line2);
|
||||
canvas.Invalidate();
|
||||
|
||||
UpdateShape(_line1);
|
||||
UpdateShape(_line2);
|
||||
});
|
||||
}
|
||||
string strarray1X = string.Empty;
|
||||
string strarray1Y = string.Empty;
|
||||
string strarray2X = string.Empty;
|
||||
string strarray2Y = string.Empty;
|
||||
List<double> flag =new List<double>();
|
||||
List<double> Distance = new List<double>();
|
||||
List<double> Line1_RowBegin = new List<double>();
|
||||
List<double> Line1_ColBegin = new List<double>();
|
||||
List<double> Line1_RowEnd = new List<double>();
|
||||
List<double> Line1_ColEnd = new List<double>();
|
||||
List<double> Line2_RowBegin = new List<double>();
|
||||
List<double> Line2_ColBegin = new List<double>();
|
||||
List<double> Line2_RowEnd = new List<double>();
|
||||
List<double> Line2_ColEnd = new List<double>();
|
||||
protected override void OnExecuteHScriptResult(
|
||||
bool success,
|
||||
Dictionary<string, HTuple> resultDic,
|
||||
int timeElasped)
|
||||
{
|
||||
if (!success)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//"OUTPUT_Flag",
|
||||
// "Distance",
|
||||
// "Line1_RowBegin",
|
||||
// "Line1_ColBegin",
|
||||
// "Line1_RowEnd",
|
||||
// "Line1_ColEnd",
|
||||
// "Line2_RowBegin",
|
||||
// "Line2_ColBegin",
|
||||
// "Line2_RowEnd",
|
||||
// "Line2_ColEnd"
|
||||
|
||||
|
||||
flag = resultDic["OUTPUT_Flag"].HTupleToDouble();
|
||||
Distance = resultDic["Distance"].HTupleToDouble();
|
||||
Line1_RowBegin = resultDic["Line1_RowBegin"].HTupleToDouble();
|
||||
Line1_ColBegin = resultDic["Line1_ColBegin"].HTupleToDouble();
|
||||
Line1_RowEnd = resultDic["Line1_RowEnd"].HTupleToDouble();
|
||||
Line1_ColEnd = resultDic["Line1_ColEnd"].HTupleToDouble();
|
||||
Line2_RowBegin = resultDic["Line2_RowBegin"].HTupleToDouble();
|
||||
Line2_ColBegin = resultDic["Line2_ColBegin"].HTupleToDouble();
|
||||
Line2_RowEnd = resultDic["Line2_RowEnd"].HTupleToDouble();
|
||||
Line2_ColEnd = resultDic["Line2_ColEnd"].HTupleToDouble();
|
||||
|
||||
if (flag.Count > 0)
|
||||
{
|
||||
lblResult.Text = flag[0].ToString();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
lblResult.Text = "无";
|
||||
}
|
||||
if (Distance.Count > 0)
|
||||
{
|
||||
lblDistance.Text = Distance[0].ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
lblDistance.Text = "0";
|
||||
}
|
||||
|
||||
if (flag.Count > 0 && Distance.Count > 0 && Line1_RowBegin.Count > 0 && Line1_ColBegin.Count > 0 && Line1_RowEnd.Count > 0 && Line1_ColEnd.Count > 0 && Line2_RowBegin.Count > 0 && Line2_ColBegin.Count > 0 && Line2_RowEnd.Count > 0 && Line2_ColEnd.Count > 0)
|
||||
{
|
||||
float width = 0;
|
||||
this.canvas.DrawLine(new PointF((float)Line1_ColBegin[0], (float)Line1_RowBegin[0]), new PointF((float)Line1_ColEnd[0], (float)Line1_RowEnd[0]), width);
|
||||
this.canvas.DrawLine(new PointF((float)Line2_ColBegin[0], (float)Line2_RowBegin[0]), new PointF((float)Line2_ColEnd[0], (float)Line2_RowEnd[0]), width);
|
||||
this.canvas.Invalidate();
|
||||
lblElapsed.Text = $"{timeElasped} ms";
|
||||
}
|
||||
}
|
||||
|
||||
private void NumRectWidth1_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (_line1 != null)
|
||||
{
|
||||
//_line1.IsDrawLineVirtualRect = true;
|
||||
_line1.LineVirtualRectWidth = (float)NumRectWidth1.Value;
|
||||
UpdateShape(_line1);
|
||||
this.canvas.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private void NumericUpDown2_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (_line2 != null)
|
||||
{
|
||||
// _line2.IsDrawLineVirtualRect = true;
|
||||
_line2.LineVirtualRectWidth = (float)NumRectWidth2.Value;
|
||||
UpdateShape(_line2);
|
||||
this.canvas.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lblResult.Text.Equals("无"))
|
||||
{
|
||||
MessageBox.Show("请先进行绘制");
|
||||
return;
|
||||
}
|
||||
if (lblResult.Text != "0")
|
||||
{
|
||||
MessageBox.Show("测量计算错误,无法保存");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//inputPara["Line1_LX"] = _line1X1;
|
||||
//inputPara["Line1_LY"] = _line1Y1;
|
||||
//inputPara["Line1_RX"] = _line1X2;
|
||||
//inputPara["Line1_RY"] = _line1Y2;
|
||||
|
||||
//inputPara["Line2_LX"] = _line2X1;
|
||||
//inputPara["Line2_LY"] = _line2Y1;
|
||||
//inputPara["Line2_RX"] = _line2X2;
|
||||
//inputPara["Line2_RY"] = _line2Y2;
|
||||
|
||||
|
||||
|
||||
//inputPara["Line1_XRect"] = hTupleArray1X;
|
||||
//inputPara["Line1_YRect"] = hTupleArray1Y;
|
||||
|
||||
//inputPara["Line2_XRect"] = hTupleArray2X;
|
||||
//inputPara["Line2_YRect"] = hTupleArray2Y;
|
||||
|
||||
|
||||
string input = $"Line1_LX:{_line1X1};" +
|
||||
$"Line1_LY:{_line1Y1};" +
|
||||
$"Line1_RX:{_line1X2};" +
|
||||
$"Line1_RY:{_line1Y2};" +
|
||||
$"Line2_LX:{_line2X1};" +
|
||||
$"Line2_LY:{_line2Y1};" +
|
||||
$"Line2_RX:{_line2X2};" +
|
||||
$"Line2_RY:{_line2Y2};" +
|
||||
$"Line1_XRect:{strarray1X};" +
|
||||
$"Line1_YRect:{strarray1Y};" +
|
||||
$"Line2_XRect:{strarray2X};" +
|
||||
$"Line2_YRect:{strarray2Y}"
|
||||
;
|
||||
|
||||
|
||||
string result = $"Distance:{Distance[0]}";
|
||||
|
||||
|
||||
DataToTriggerEvent(input, result);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
145
CanFly/UI/SizePanel/SizeGuideLineLineCtrl.resx
Normal file
145
CanFly/UI/SizePanel/SizeGuideLineLineCtrl.resx
Normal file
@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="canvas.OutsideShapes" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAERDYW5GbHkuQ2FudmFzLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1
|
||||
cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAQBAAAAdlN5c3RlbS5Db2xsZWN0aW9ucy5HZW5l
|
||||
cmljLkxpc3RgMVtbQ2FuRmx5LkNhbnZhcy5TaGFwZS5GbHlTaGFwZSwgQ2FuRmx5LkNhbnZhcywgQ3Vs
|
||||
dHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsXV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lv
|
||||
bgQAAB5DYW5GbHkuQ2FudmFzLlNoYXBlLkZseVNoYXBlW10CAAAACAgJAwAAAAAAAAAAAAAADAQAAAAz
|
||||
Q2FuRmx5LkNhbnZhcywgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBwMAAAAAAQAA
|
||||
AAAAAAAEHENhbkZseS5DYW52YXMuU2hhcGUuRmx5U2hhcGUEAAAACw==
|
||||
</value>
|
||||
</data>
|
||||
<data name="canvas.Shapes" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAERDYW5GbHkuQ2FudmFzLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1
|
||||
cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAQBAAAAdlN5c3RlbS5Db2xsZWN0aW9ucy5HZW5l
|
||||
cmljLkxpc3RgMVtbQ2FuRmx5LkNhbnZhcy5TaGFwZS5GbHlTaGFwZSwgQ2FuRmx5LkNhbnZhcywgQ3Vs
|
||||
dHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsXV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lv
|
||||
bgQAAB5DYW5GbHkuQ2FudmFzLlNoYXBlLkZseVNoYXBlW10CAAAACAgJAwAAAAAAAAAAAAAADAQAAAAz
|
||||
Q2FuRmx5LkNhbnZhcywgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBwMAAAAAAQAA
|
||||
AAAAAAAEHENhbkZseS5DYW52YXMuU2hhcGUuRmx5U2hhcGUEAAAACw==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
93
CanFly/UI/UIMain/FrmMainSize.Designer.cs
generated
Normal file
93
CanFly/UI/UIMain/FrmMainSize.Designer.cs
generated
Normal file
@ -0,0 +1,93 @@
|
||||
|
||||
|
||||
namespace XKRS.CanFly
|
||||
{
|
||||
partial class FrmMainSize
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
statusStrip1 = new StatusStrip();
|
||||
panelContent = new Panel();
|
||||
pageHeader1 = new AntdUI.PageHeader();
|
||||
panelContent.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
statusStrip1.Location = new Point(0, 808);
|
||||
statusStrip1.Name = "statusStrip1";
|
||||
statusStrip1.Size = new Size(1185, 22);
|
||||
statusStrip1.TabIndex = 4;
|
||||
statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// panelContent
|
||||
//
|
||||
panelContent.Controls.Add(pageHeader1);
|
||||
panelContent.Dock = DockStyle.Fill;
|
||||
panelContent.Location = new Point(0, 0);
|
||||
panelContent.Margin = new Padding(4, 3, 4, 3);
|
||||
panelContent.Name = "panelContent";
|
||||
panelContent.Size = new Size(1185, 808);
|
||||
panelContent.TabIndex = 5;
|
||||
//
|
||||
// pageHeader1
|
||||
//
|
||||
pageHeader1.BackColor = Color.FromArgb(46, 108, 227);
|
||||
pageHeader1.Dock = DockStyle.Top;
|
||||
pageHeader1.Location = new Point(0, 0);
|
||||
pageHeader1.Mode = AntdUI.TAMode.Dark;
|
||||
pageHeader1.Name = "pageHeader1";
|
||||
pageHeader1.ShowButton = true;
|
||||
pageHeader1.ShowIcon = true;
|
||||
pageHeader1.Size = new Size(1185, 33);
|
||||
pageHeader1.TabIndex = 2;
|
||||
pageHeader1.Text = "尺寸测量";
|
||||
//
|
||||
// FrmMainSize
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 17F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(1185, 830);
|
||||
Controls.Add(panelContent);
|
||||
Controls.Add(statusStrip1);
|
||||
FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
Margin = new Padding(2, 3, 2, 3);
|
||||
Name = "FrmMainSize";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "尺寸测量";
|
||||
Load += FrmMain_Load;
|
||||
panelContent.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
private StatusStrip statusStrip1;
|
||||
private Panel panelContent;
|
||||
private AntdUI.PageHeader pageHeader1;
|
||||
}
|
||||
}
|
440
CanFly/UI/UIMain/FrmMainSize.cs
Normal file
440
CanFly/UI/UIMain/FrmMainSize.cs
Normal file
@ -0,0 +1,440 @@
|
||||
using AntdUI;
|
||||
using CanFly.Canvas.Shape;
|
||||
using CanFly.Helper;
|
||||
using CanFly.UI;
|
||||
using CanFly.UI.GuidePanel;
|
||||
using CanFly.UI.SizePanel;
|
||||
using CanFly.Util;
|
||||
using DH.Commons.Base;
|
||||
using HalconDotNet;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace XKRS.CanFly
|
||||
{
|
||||
|
||||
public partial class FrmMainSize : Window
|
||||
{
|
||||
|
||||
private string _currentImageFile = "";
|
||||
private System.Windows.Forms.Timer _statusTimer = new System.Windows.Forms.Timer();
|
||||
private SizeBaseGuideControl? _currentGuideCtrl;
|
||||
|
||||
|
||||
private SizeGuideCircleCtrl guideCircleCtrl = new SizeGuideCircleCtrl();
|
||||
private SizeGuideLineCircleCtrl guideLineCircleCtrl = new SizeGuideLineCircleCtrl();
|
||||
private SizeGuideLineLineCtrl guideLineLineCtrl = new SizeGuideLineLineCtrl();
|
||||
private SizeGuideLineCtrl guideLineCtrl = new SizeGuideLineCtrl();
|
||||
private SizeGuideHeightCtrl guideHeightCtrl = new SizeGuideHeightCtrl();
|
||||
string Type=string.Empty;
|
||||
|
||||
|
||||
public string inputtext=string.Empty;
|
||||
public string outtext = string.Empty;
|
||||
DetectionConfig DetectionConfig;
|
||||
public FrmMainSize(string type,DetectionConfig detectionConfig)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
DetectionConfig = detectionConfig;
|
||||
Type=type;
|
||||
|
||||
guideCircleCtrl.Dock = DockStyle.Fill;
|
||||
guideCircleCtrl.OnControlCloseEvent -= () => panelContent.Controls.Clear();
|
||||
guideCircleCtrl.OnControlCloseEvent += () => panelContent.Controls.Clear();
|
||||
|
||||
|
||||
guideLineCircleCtrl.Dock = DockStyle.Fill;
|
||||
guideLineCircleCtrl.OnControlCloseEvent -= () => panelContent.Controls.Clear();
|
||||
guideLineCircleCtrl.OnControlCloseEvent += () => panelContent.Controls.Clear();
|
||||
|
||||
guideLineLineCtrl.Dock = DockStyle.Fill;
|
||||
guideLineLineCtrl.OnControlCloseEvent -= () => panelContent.Controls.Clear();
|
||||
guideLineLineCtrl.OnControlCloseEvent += () => panelContent.Controls.Clear();
|
||||
|
||||
guideLineCtrl.Dock = DockStyle.Fill;
|
||||
guideLineCtrl.OnControlCloseEvent -= () => panelContent.Controls.Clear();
|
||||
guideLineCtrl.OnControlCloseEvent += () => panelContent.Controls.Clear();
|
||||
|
||||
|
||||
guideHeightCtrl.Dock = DockStyle.Fill;
|
||||
guideHeightCtrl.OnControlCloseEvent -= () => panelContent.Controls.Clear();
|
||||
guideHeightCtrl.OnControlCloseEvent += () => panelContent.Controls.Clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void FrmMain_Load(object sender, EventArgs e)
|
||||
{
|
||||
switch (Type)
|
||||
{
|
||||
case "1":
|
||||
SwitchMeasureMode(guideCircleCtrl);
|
||||
break;
|
||||
case "2":
|
||||
SwitchMeasureMode(guideLineCtrl);
|
||||
break;
|
||||
case "3":
|
||||
SwitchMeasureMode(guideLineLineCtrl);
|
||||
break;
|
||||
case "4":
|
||||
SwitchMeasureMode(guideLineCircleCtrl);
|
||||
break;
|
||||
case "5":
|
||||
SwitchMeasureMode(guideHeightCtrl);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void btnLoadImage_Click(object sender, EventArgs e)
|
||||
{
|
||||
//OpenFileDialog ofd = new OpenFileDialog();
|
||||
//ofd.Filter = "ͼ<><CDBC><EFBFBD>ļ<EFBFBD>|*.jpg;*.png";
|
||||
//ofd.Multiselect = false;
|
||||
//if (ofd.ShowDialog() == DialogResult.OK)
|
||||
//{
|
||||
// _currentImageFile = ofd.FileName;
|
||||
// Bitmap bitmap = (Bitmap)Image.FromFile(_currentImageFile);
|
||||
// this.canvas.LoadPixmap(bitmap);
|
||||
// this.btnCreateCircle.Enabled = true;
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void btnMeasureCircle_Click(object sender, EventArgs e)
|
||||
{
|
||||
//var contentCtrls = panelContent.Controls;
|
||||
|
||||
//if (contentCtrls.Count > 0)
|
||||
//{
|
||||
// if (contentCtrls[0] == guideCircleCtrl)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
//}
|
||||
|
||||
//panelContent.Controls.Clear();
|
||||
//panelContent.Controls.Add(guideCircleCtrl);
|
||||
|
||||
SwitchMeasureMode(guideCircleCtrl);
|
||||
}
|
||||
|
||||
|
||||
private void btnMeasureLineCircle_Click(object sender, EventArgs e)
|
||||
{
|
||||
SwitchMeasureMode(guideLineCircleCtrl);
|
||||
}
|
||||
|
||||
|
||||
private void SwitchMeasureMode(SizeBaseGuideControl control)
|
||||
{
|
||||
var contentCtrls = panelContent.Controls;
|
||||
|
||||
if (contentCtrls.Count > 0)
|
||||
{
|
||||
if (contentCtrls[0] == control)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
panelContent.Controls.Clear();
|
||||
|
||||
control.OnDataPassed -= Control_OnDataPassed;
|
||||
control.OnDataPassed += Control_OnDataPassed;
|
||||
|
||||
|
||||
|
||||
//control.Dock = DockStyle.Fill;
|
||||
//control.OnControlCloseEvent -= () => panelContent.Controls.Clear();
|
||||
//control.OnControlCloseEvent += () => panelContent.Controls.Clear();
|
||||
panelContent.Controls.Add(control);
|
||||
}
|
||||
|
||||
private void Control_OnDataPassed(string obj,string obj1)
|
||||
{
|
||||
inputtext = obj;
|
||||
outtext = obj1;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btnCreateRect_Click(object sender, EventArgs e)
|
||||
{
|
||||
//this.canvas.StartDraw(ShapeTypeEnum.Rectangle);
|
||||
//this.btnCreateCircle.Enabled = false;
|
||||
//this.btnStopDraw.Enabled = true;
|
||||
//this.canvas.Enabled = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void btnStopDraw_Click(object sender, EventArgs e)
|
||||
{
|
||||
//panelGuide.Controls.Clear();
|
||||
StopDrawMode();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void StartDrawMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void StopDrawMode()
|
||||
{
|
||||
//this.canvas.StopDraw();
|
||||
|
||||
|
||||
//this.btnStopDraw.Enabled = false;
|
||||
//this.btnCreateCircle.Enabled = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void Status(string message, int delay = 5000)
|
||||
{
|
||||
//_statusTimer.Stop();
|
||||
//// <20><>ʾ<EFBFBD><CABE>Ϣ
|
||||
//lblStatus.Text = message;
|
||||
|
||||
//// <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
|
||||
//_statusTimer.Interval = delay; // <20><><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
//_statusTimer.Tick += (sender, e) =>
|
||||
//{
|
||||
// _statusTimer.Stop(); // ֹͣ<CDA3><D6B9>ʱ<EFBFBD><CAB1>
|
||||
// lblStatus.Text = string.Empty; // <20><><EFBFBD><EFBFBD>״̬<D7B4><CCAC>Ϣ
|
||||
//};
|
||||
//_statusTimer.Start(); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void Canvas_mouseMoved(PointF pos)
|
||||
{
|
||||
//if (InvokeRequired)
|
||||
//{
|
||||
// Invoke(Canvas_mouseMoved, pos);
|
||||
// return;
|
||||
//}
|
||||
|
||||
//lblStatus.Text = $"X:{pos.X}, Y:{pos.Y}";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void Canvas_selectionChanged(List<FlyShape> shapes)
|
||||
{
|
||||
if (shapes.Count != 1)
|
||||
{
|
||||
// panelGuide.Controls.Clear();
|
||||
return;
|
||||
}
|
||||
//SwitchGuideForm(shapes[0].ShapeType);
|
||||
Canvas_OnShapeUpdateEvent(shapes[0]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void SwitchGuideForm(ShapeTypeEnum shapeType)
|
||||
{
|
||||
//if (_currentGuideCtrl == null)
|
||||
//{
|
||||
// switch (shapeType)
|
||||
// {
|
||||
// case ShapeTypeEnum.Point:
|
||||
// break;
|
||||
// case ShapeTypeEnum.Line:
|
||||
// break;
|
||||
// case ShapeTypeEnum.Rectangle:
|
||||
// break;
|
||||
// case ShapeTypeEnum.Circle:
|
||||
// _currentGuideCtrl = new GuideCircleCtrl();
|
||||
// _currentGuideCtrl.ImageFile = _currentImageFile;
|
||||
// _currentGuideCtrl.OnDrawCircle += this.canvas.DrawCircle;
|
||||
// _currentGuideCtrl.OnClose += () =>
|
||||
// {
|
||||
// panelGuide.Controls.Clear();
|
||||
// StopDrawMode();
|
||||
// };
|
||||
// break;
|
||||
// case ShapeTypeEnum.Polygon:
|
||||
// break;
|
||||
// case ShapeTypeEnum.LineStrip:
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
//_currentGuideCtrl?.AddToPanel(panelGuide);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void Canvas_OnShapeMoving(List<FlyShape> shapes)
|
||||
{
|
||||
//if (shapes.Count != 1)
|
||||
//{
|
||||
// panelGuide.Controls.Clear();
|
||||
// return;
|
||||
//}
|
||||
|
||||
//_currentGuideCtrl?.UpdateShape(shapes[0]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void Canvas_OnShapeUpdateEvent(FlyShape shape)
|
||||
{
|
||||
switch (shape.ShapeType)
|
||||
{
|
||||
case ShapeTypeEnum.Point:
|
||||
break;
|
||||
case ShapeTypeEnum.Line:
|
||||
break;
|
||||
case ShapeTypeEnum.Rectangle:
|
||||
break;
|
||||
case ShapeTypeEnum.Circle:
|
||||
{
|
||||
//_currentGuideCtrl?.UpdateShape(shape);
|
||||
}
|
||||
break;
|
||||
case ShapeTypeEnum.Polygon:
|
||||
break;
|
||||
case ShapeTypeEnum.LineStrip:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void btnTestOutsideDraw_Click(object sender, EventArgs e)
|
||||
{
|
||||
//Random random = new Random((int)DateTime.Now.Ticks);
|
||||
|
||||
//for (int i = 0; i < 10; i++)
|
||||
//{
|
||||
// // this.canvas.DrawCircle(new PointF(500, 500), 100);
|
||||
|
||||
// int x = random.Next() % 500;
|
||||
// int y = random.Next() % 500;
|
||||
// int r = random.Next() % 200;
|
||||
|
||||
// Debug.WriteLine($"X:{x}\tY:{y}\tR:{r}");
|
||||
|
||||
// this.canvas.DrawCircle(new PointF(x, y), r);
|
||||
//}
|
||||
}
|
||||
|
||||
private void btnTestClearDraw_Click(object sender, EventArgs e)
|
||||
{
|
||||
//this.canvas.ClearDraw();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private async void btnTestCircleMeasure_Click(object sender, EventArgs e)
|
||||
{
|
||||
//string dir = Path.Combine(Environment.CurrentDirectory, "hscripts");
|
||||
//string file = "CircleMeasure.hdvp";
|
||||
//string filePath = Path.Combine(dir, file);
|
||||
//if (!File.Exists(filePath))
|
||||
//{
|
||||
// MessageBox.Show($"<22>ļ<EFBFBD> {filePath} <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
// return;
|
||||
//}
|
||||
|
||||
//HObject? hImage = null;
|
||||
|
||||
//try
|
||||
//{
|
||||
// HDevEngineTool tool = new HDevEngineTool(dir);
|
||||
// tool.LoadProcedure(Path.GetFileNameWithoutExtension(file));
|
||||
|
||||
// // string imageFile = Path.Combine(Environment.CurrentDirectory, "hscripts", "image.png");
|
||||
|
||||
// HOperatorSet.ReadImage(out hImage, _currentImageFile);
|
||||
// tool.InputImageDic["INPUT_Image"] = hImage;
|
||||
// tool.InputTupleDic["XCenter"] = 981.625;
|
||||
// tool.InputTupleDic["YCenter"] = 931.823;
|
||||
// tool.InputTupleDic["Radius"] = 900.141;
|
||||
|
||||
// Stopwatch sw = new Stopwatch();
|
||||
// sw.Start();
|
||||
// if (!tool.RunProcedure(out string error, out _))
|
||||
// {
|
||||
// throw new Exception();
|
||||
// }
|
||||
// sw.Stop();
|
||||
|
||||
|
||||
|
||||
// var flag = tool.GetResultTuple("OUTPUT_Flag").HTupleToDouble();
|
||||
// List<double> x = tool.GetResultTuple("RXCenter").HTupleToDouble();
|
||||
// var y = tool.GetResultTuple("RYCenter").HTupleToDouble();
|
||||
// var r = tool.GetResultTuple("RRadius").HTupleToDouble();
|
||||
|
||||
// if (flag.Count > 0 && x.Count > 0 && y.Count > 0 && r.Count > 0)
|
||||
// {
|
||||
// this.canvas.DrawCircle(new PointF((float)x[0], (float)y[0]), (float)r[0]);
|
||||
// }
|
||||
|
||||
// //
|
||||
// Debug.WriteLine("");
|
||||
//}
|
||||
//catch (Exception)
|
||||
//{
|
||||
// throw;
|
||||
//}
|
||||
//finally
|
||||
//{
|
||||
// hImage?.Dispose();
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void btnTest_Click(object sender, EventArgs e)
|
||||
{
|
||||
//this.canvas.DrawRectangle(new PointF(300, 300),
|
||||
// new PointF(800, 500), 33f);
|
||||
}
|
||||
|
||||
|
||||
private void btnRotateTest_Click(object sender, EventArgs e)
|
||||
{
|
||||
//if (this.canvas.Shapes.Count == 0)
|
||||
//{
|
||||
// return;
|
||||
//}
|
||||
|
||||
//this.canvas.Shapes[0]._currentRotateAngle += 10;
|
||||
//this.canvas.Invalidate();
|
||||
}
|
||||
|
||||
private void btnMeasureLineline_Click(object sender, EventArgs e)
|
||||
{
|
||||
SwitchMeasureMode(guideLineLineCtrl);
|
||||
}
|
||||
|
||||
private void btnMeasureLine_Click(object sender, EventArgs e)
|
||||
{
|
||||
SwitchMeasureMode(guideLineCtrl);
|
||||
}
|
||||
}
|
||||
}
|
@ -117,4 +117,7 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
@ -14,14 +14,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CanFly.Canvas\CanFly.Canvas.csproj" />
|
||||
<ProjectReference Include="..\DH.Commons\DH.Commons.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -29,6 +24,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AntdUI" Version="1.8.9" />
|
||||
<PackageReference Include="OpenCvSharp4" Version="4.10.0.20241108" />
|
||||
<PackageReference Include="OpenCvSharp4.Extensions" Version="4.10.0.20241108" />
|
||||
<PackageReference Include="OpenCvSharp4.runtime.win" Version="4.10.0.20241108" />
|
||||
|
@ -3,6 +3,7 @@ using System.ComponentModel;
|
||||
using System.Drawing.Imaging;
|
||||
using AntdUI;
|
||||
using DH.Commons.Enums;
|
||||
using DVPCameraType;
|
||||
using HalconDotNet;
|
||||
using OpenCvSharp;
|
||||
|
||||
@ -47,10 +48,13 @@ namespace DH.Commons.Base
|
||||
// 私有字段 + 带通知的属性(与DetectionLabel风格一致)
|
||||
private bool _isEnabled = false;
|
||||
private bool _isallPicEnabled = true;//默认全画幅
|
||||
private bool _isRGBEnabled = true;//默认彩色
|
||||
private bool _isContinueMode = false;
|
||||
private bool _isSavePicEnabled = false;
|
||||
private bool _isZoomCamera = false;
|
||||
private string _imageSaveDirectory;
|
||||
private EnumCamType _CamType;
|
||||
private dvpStreamFormat _dvpstreamFormat = dvpStreamFormat.S_RGB24;
|
||||
private ImageFormat _imageFormat = ImageFormat.Jpeg;
|
||||
private bool _isHardwareTrigger = true;
|
||||
private string _serialNumber = string.Empty;
|
||||
@ -59,7 +63,7 @@ namespace DH.Commons.Base
|
||||
private string _computerIP = string.Empty;
|
||||
private bool _isDirectHardwareTrigger = false;
|
||||
private float _gain =6;
|
||||
private float _rotateImage = 0;
|
||||
private int _rotateImage = 0;
|
||||
private float _exposure = 200;
|
||||
private float _triggerDelay = 0;
|
||||
private decimal _roiX = 0;
|
||||
@ -70,6 +74,20 @@ namespace DH.Commons.Base
|
||||
|
||||
public volatile int SnapshotCount = 0;
|
||||
|
||||
[Category("相机设置")]
|
||||
[DisplayName("图像格式")]
|
||||
[Description("相机采集图像格式")]
|
||||
public dvpStreamFormat DvpImageFormat
|
||||
{
|
||||
get => _dvpstreamFormat;
|
||||
set
|
||||
{
|
||||
if (_dvpstreamFormat == value) return;
|
||||
_dvpstreamFormat = value;
|
||||
OnPropertyChanged(nameof(DvpImageFormat));
|
||||
}
|
||||
}
|
||||
|
||||
[Category("采图模式")]
|
||||
[DisplayName("连续模式")]
|
||||
[Description("是否连续模式。true:连续模式采图;false:触发模式采图")]
|
||||
@ -83,6 +101,16 @@ namespace DH.Commons.Base
|
||||
OnPropertyChanged(nameof(IsContinueMode));
|
||||
}
|
||||
}
|
||||
public bool IsZoomCamera
|
||||
{
|
||||
get => _isZoomCamera;
|
||||
set
|
||||
{
|
||||
if (_isZoomCamera == value) return;
|
||||
_isZoomCamera = value;
|
||||
OnPropertyChanged(nameof(IsZoomCamera));
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsEnabled
|
||||
{
|
||||
@ -245,7 +273,7 @@ namespace DH.Commons.Base
|
||||
[Category("图像旋转")]
|
||||
[DisplayName("默认旋转")]
|
||||
[Description("默认旋转,相机开启后默认不旋转")]
|
||||
public virtual float RotateImage
|
||||
public virtual int RotateImage
|
||||
{
|
||||
get => _rotateImage;
|
||||
set
|
||||
|
@ -6,6 +6,8 @@ using System.Text.RegularExpressions;
|
||||
using System.Text;
|
||||
using System.Drawing.Design;
|
||||
using AntdUI;
|
||||
|
||||
using System.Text.Json.Serialization;
|
||||
using static DH.Commons.Enums.EnumHelper;
|
||||
using System.Text.Json.Serialization;
|
||||
using DH.Commons.Enums;
|
||||
@ -282,6 +284,7 @@ namespace DH.Commons.Base
|
||||
[Category("关联相机")]
|
||||
[DisplayName("相机源ID")]
|
||||
[Description("关联相机的唯一标识符")]
|
||||
[JsonPropertyName("camera_sourceId")]
|
||||
//[TypeConverter(typeof(CollectionCountConvert))]
|
||||
public string CameraSourceId
|
||||
{
|
||||
@ -616,6 +619,13 @@ namespace DH.Commons.Base
|
||||
}
|
||||
|
||||
[Category("启用配置")]
|
||||
[DisplayName("是否启用预处理")]
|
||||
[JsonPropertyName("is_PreEnabled")]
|
||||
public bool IsPreEnabled { get; set; }
|
||||
// public bool IsAddStation { get; set; } = true;
|
||||
|
||||
private bool _isAddStation;
|
||||
[Category("启用配置")]
|
||||
[DisplayName("是否加入检测工位")]
|
||||
[Description("是否加入检测工位")]
|
||||
public bool IsAddStation
|
||||
@ -901,6 +911,7 @@ namespace DH.Commons.Base
|
||||
ModelPath = modelPath ?? string.Empty;
|
||||
Name = name;
|
||||
ModelType = modelType;
|
||||
ModelPath = modelPath ?? string.Empty;
|
||||
IsEnableGPU = isEnableGPU;
|
||||
|
||||
}
|
||||
@ -916,6 +927,7 @@ namespace DH.Commons.Base
|
||||
|
||||
|
||||
private bool _selected = false;
|
||||
|
||||
public bool Selected
|
||||
{
|
||||
get { return _selected; }
|
||||
@ -926,6 +938,7 @@ namespace DH.Commons.Base
|
||||
OnPropertyChanged(nameof(Selected));
|
||||
}
|
||||
}
|
||||
[JsonPropertyName("name")]
|
||||
private string _name;
|
||||
public string Name
|
||||
{
|
||||
@ -940,6 +953,7 @@ namespace DH.Commons.Base
|
||||
|
||||
|
||||
private string _value;
|
||||
[JsonPropertyName("value")]
|
||||
public string Value
|
||||
{
|
||||
get { return _value; }
|
||||
@ -955,7 +969,9 @@ namespace DH.Commons.Base
|
||||
[JsonIgnore]
|
||||
public CellLink[] CellLinks
|
||||
{
|
||||
get { return cellLinks; }
|
||||
get {
|
||||
|
||||
return cellLinks; }
|
||||
set
|
||||
{
|
||||
if (cellLinks == value) return;
|
||||
@ -995,7 +1011,7 @@ namespace DH.Commons.Base
|
||||
}
|
||||
|
||||
|
||||
|
||||
[JsonPropertyName("labelId")]
|
||||
public string LabelId
|
||||
{
|
||||
get { return _labelId; }
|
||||
@ -1006,7 +1022,7 @@ namespace DH.Commons.Base
|
||||
OnPropertyChanged(nameof(LabelId));
|
||||
}
|
||||
}
|
||||
|
||||
[JsonPropertyName("labelName")]
|
||||
public string LabelName
|
||||
{
|
||||
get { return _labelName; }
|
||||
@ -1039,7 +1055,7 @@ namespace DH.Commons.Base
|
||||
OnPropertyChanged(nameof(MinScore));
|
||||
}
|
||||
}
|
||||
|
||||
[JsonPropertyName("maxArea")]
|
||||
public double MaxArea
|
||||
{
|
||||
get { return _maxArea; }
|
||||
@ -1050,7 +1066,7 @@ namespace DH.Commons.Base
|
||||
OnPropertyChanged(nameof(MaxArea));
|
||||
}
|
||||
}
|
||||
|
||||
[JsonPropertyName("minArea")]
|
||||
public double MinArea
|
||||
{
|
||||
get { return _minArea; }
|
||||
@ -1061,7 +1077,7 @@ namespace DH.Commons.Base
|
||||
OnPropertyChanged(nameof(MinArea));
|
||||
}
|
||||
}
|
||||
|
||||
[JsonPropertyName("_resultState")]
|
||||
public ResultState ResultState
|
||||
{
|
||||
get { return _resultState; }
|
||||
@ -1077,7 +1093,9 @@ namespace DH.Commons.Base
|
||||
[JsonIgnore]
|
||||
public CellLink[] CellLinks
|
||||
{
|
||||
get { return cellLinks; }
|
||||
get {
|
||||
|
||||
return cellLinks; }
|
||||
set
|
||||
{
|
||||
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
|
||||
{
|
||||
@ -1256,7 +1328,7 @@ namespace DH.Commons.Base
|
||||
[DisplayName("检测项标签")]
|
||||
[Description("检测标签Id")]
|
||||
//[TypeConverter(typeof(DetectionLabelConverter))]
|
||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
||||
|
||||
public string LabelId { get; set; }
|
||||
|
||||
|
||||
|
@ -11,6 +11,9 @@ namespace DH.Commons.Base
|
||||
{
|
||||
public class GlobalConfig : NotifyProperty
|
||||
{
|
||||
bool _EnableVibrator=false;
|
||||
bool _EnableBelt = false;
|
||||
int _ClearTime=0;
|
||||
string _name;
|
||||
private BindingList<PLCItem> _InitProcessList = new BindingList<PLCItem>();
|
||||
private BindingList<PLCItem> _StartProcessList = new BindingList<PLCItem>();
|
||||
@ -29,7 +32,42 @@ namespace DH.Commons.Base
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool EnableBelt
|
||||
{
|
||||
get => _EnableBelt;
|
||||
set
|
||||
{
|
||||
if (_EnableBelt != value)
|
||||
{
|
||||
_EnableBelt = value;
|
||||
OnPropertyChanged(nameof(EnableBelt));
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool EnableVibrator
|
||||
{
|
||||
get => _EnableVibrator;
|
||||
set
|
||||
{
|
||||
if (_EnableVibrator != value)
|
||||
{
|
||||
_EnableVibrator = value;
|
||||
OnPropertyChanged(nameof(EnableVibrator));
|
||||
}
|
||||
}
|
||||
}
|
||||
public int ClearTime
|
||||
{
|
||||
get => _ClearTime;
|
||||
set
|
||||
{
|
||||
if (_ClearTime != value)
|
||||
{
|
||||
_ClearTime = value;
|
||||
OnPropertyChanged(nameof(ClearTime));
|
||||
}
|
||||
}
|
||||
}
|
||||
public BindingList<PLCItem> InitProcessList
|
||||
{
|
||||
get => _InitProcessList;
|
||||
|
80
DH.Commons/Base/VisualLocalization.cs
Normal file
80
DH.Commons/Base/VisualLocalization.cs
Normal file
@ -0,0 +1,80 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace DH.Commons.Base
|
||||
{
|
||||
public class VisualLocalization
|
||||
{
|
||||
// 配置属性
|
||||
public string CameraName { get; set; }
|
||||
public string ModelPath { get; set; }
|
||||
public string ImgPath { get; set; }
|
||||
public string Threshold { get; set; }
|
||||
public string Direction { get; set; }
|
||||
public string Speed { get; set; }
|
||||
|
||||
public string MSpeed { get; set; }
|
||||
|
||||
// 配置文件路径
|
||||
private const string ConfigFile = "VisualConfigs.json";
|
||||
private static readonly object _fileLock = new object();
|
||||
|
||||
/// <summary>
|
||||
/// 保存当前配置(存在则更新,不存在则新增)
|
||||
/// </summary>
|
||||
public void Save()
|
||||
{
|
||||
lock (_fileLock)
|
||||
{
|
||||
var list = LoadAll();
|
||||
var existing = list.FirstOrDefault(c => c.CameraName == CameraName);
|
||||
|
||||
if (existing != null)
|
||||
{
|
||||
// 更新现有配置
|
||||
existing.ModelPath = ModelPath;
|
||||
existing.ImgPath = ImgPath;
|
||||
existing.Threshold = Threshold;
|
||||
existing.Direction = Direction;
|
||||
existing.Speed = Speed;
|
||||
existing.MSpeed = MSpeed;
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(this);
|
||||
}
|
||||
|
||||
SaveAll(list);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取全部配置列表
|
||||
/// </summary>
|
||||
public static List<VisualLocalization> LoadAll()
|
||||
{
|
||||
lock (_fileLock)
|
||||
{
|
||||
if (!File.Exists(ConfigFile)) return new List<VisualLocalization>();
|
||||
|
||||
var json = File.ReadAllText(ConfigFile);
|
||||
return JsonSerializer.Deserialize<List<VisualLocalization>>(json)
|
||||
?? new List<VisualLocalization>();
|
||||
}
|
||||
}
|
||||
|
||||
private static void SaveAll(List<VisualLocalization> list)
|
||||
{
|
||||
var options = new JsonSerializerOptions
|
||||
{
|
||||
WriteIndented = true,
|
||||
IgnoreNullValues = true
|
||||
};
|
||||
|
||||
File.WriteAllText(ConfigFile, JsonSerializer.Serialize(list, options));
|
||||
}
|
||||
}
|
||||
}
|
@ -14,8 +14,11 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AntdUI" Version="1.8.9" />
|
||||
<PackageReference Include="hyjiacan.pinyin4net" Version="4.1.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="OpenCvSharp4" Version="4.10.0.20241108" />
|
||||
<PackageReference Include="OpenCvSharp4.Extensions" Version="4.10.0.20241108" />
|
||||
@ -24,6 +27,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="DVPCameraCS64">
|
||||
<HintPath>..\X64\Debug\DVPCameraCS64.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="halcondotnet">
|
||||
<HintPath>..\x64\Debug\halcondotnet.dll</HintPath>
|
||||
</Reference>
|
||||
|
@ -9,8 +9,9 @@ namespace DH.Commons.Enums
|
||||
{
|
||||
public enum EnumStatus
|
||||
{
|
||||
未运行,
|
||||
待机中,
|
||||
运行中,
|
||||
清料中,
|
||||
警告,
|
||||
异常
|
||||
}
|
||||
@ -115,7 +116,16 @@ namespace DH.Commons.Enums
|
||||
NG脉冲,
|
||||
状态复位,
|
||||
启用定位,
|
||||
定位完成脉冲值
|
||||
定位完成脉冲值,
|
||||
相机步进原点,
|
||||
相机步进位置,
|
||||
相机步进速度,
|
||||
相机步进顺时针,
|
||||
相机步进逆时针,
|
||||
点动相机步进,
|
||||
点动挡杆步进,
|
||||
相机步进实时位置,
|
||||
挡料电机实时位置
|
||||
|
||||
|
||||
|
||||
|
@ -5,6 +5,7 @@ using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using AntdUI;
|
||||
using DH.Commons.Base;
|
||||
using DH.Commons.Enums;
|
||||
using DH.Commons.Models;
|
||||
|
||||
namespace DH.Commons.Helper
|
||||
@ -127,6 +128,13 @@ namespace DH.Commons.Helper
|
||||
{
|
||||
foreach (var label in config.DetectionLableList)
|
||||
{
|
||||
//是否假如判断标签为中文转为为英文
|
||||
//string pinyinlabel = FileHelper.ConvertHanzitoPinyinWithNumbers(label.LabelName.ToString());
|
||||
//if (FileHelper.IsAlphaNumericOnly(pinyinlabel))
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
// 根据实际需求格式化输出
|
||||
writer.WriteLine(label.LabelName.ToString()); // 假设DetectionLable重写了ToString()
|
||||
|
||||
|
@ -682,31 +682,31 @@ namespace DH.Commons.Enums
|
||||
Warning = 8,
|
||||
}
|
||||
|
||||
public enum ResultState
|
||||
{
|
||||
[Description("NA")]
|
||||
NA = -5,
|
||||
[Description("尺寸NG")]
|
||||
SizeNG = -4,
|
||||
[Description("检测NG")]
|
||||
DetectNG = -3,
|
||||
//public enum ResultState
|
||||
//{
|
||||
// [Description("NA")]
|
||||
// NA = -5,
|
||||
// [Description("尺寸NG")]
|
||||
// SizeNG = -4,
|
||||
// [Description("检测NG")]
|
||||
// DetectNG = -3,
|
||||
|
||||
//[Description("检测不足TBD")]
|
||||
// ShortageTBD = -2,
|
||||
[Description("检测结果TBD")]
|
||||
ResultTBD = -1,
|
||||
[Description("OK")]
|
||||
OK = 1,
|
||||
// [Description("NG")]
|
||||
// NG = 2,
|
||||
//统计结果
|
||||
[Description("A类NG")]
|
||||
A_NG = 25,
|
||||
[Description("B类NG")]
|
||||
B_NG = 26,
|
||||
[Description("C类NG")]
|
||||
C_NG = 27,
|
||||
}
|
||||
// //[Description("检测不足TBD")]
|
||||
// // ShortageTBD = -2,
|
||||
// [Description("检测结果TBD")]
|
||||
// ResultTBD = -1,
|
||||
// [Description("OK")]
|
||||
// OK = 1,
|
||||
// // [Description("NG")]
|
||||
// // NG = 2,
|
||||
// //统计结果
|
||||
// [Description("A类NG")]
|
||||
// A_NG = 25,
|
||||
// [Description("B类NG")]
|
||||
// B_NG = 26,
|
||||
// [Description("C类NG")]
|
||||
// C_NG = 27,
|
||||
//}
|
||||
public enum HikCameraType
|
||||
{
|
||||
[Description("HikCamera-Gige")]
|
||||
|
507
DH.Commons/Helper/FileHelper.cs
Normal file
507
DH.Commons/Helper/FileHelper.cs
Normal file
@ -0,0 +1,507 @@
|
||||
using hyjiacan.py4n;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.Commons.Enums
|
||||
{
|
||||
|
||||
public static class FileHelper
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 清理两个文件夹中的文件,保留文件名交集部分,其余文件删除。
|
||||
/// </summary>
|
||||
/// <param name="imagesFolder">图片文件夹路径</param>
|
||||
/// <param name="labelsFolder">标签文件夹路径</param>
|
||||
public static void CleanupFolders(string imagesFolder, string labelsFolder)
|
||||
{
|
||||
if (!Directory.Exists(imagesFolder))
|
||||
{
|
||||
Console.WriteLine($"Images folder does not exist: {imagesFolder}");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Directory.Exists(labelsFolder))
|
||||
{
|
||||
Console.WriteLine($"Labels folder does not exist: {labelsFolder}");
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取文件名(不包含扩展名)
|
||||
var imageFiles = Directory.GetFiles(imagesFolder)
|
||||
.Select(Path.GetFileNameWithoutExtension)
|
||||
.ToHashSet();
|
||||
|
||||
var labelFiles = Directory.GetFiles(labelsFolder)
|
||||
.Select(Path.GetFileNameWithoutExtension)
|
||||
.ToHashSet();
|
||||
|
||||
// 计算交集
|
||||
var commonFiles = imageFiles.Intersect(labelFiles);
|
||||
|
||||
// 删除 images 文件夹中不在交集中的文件
|
||||
foreach (var imagePath in Directory.GetFiles(imagesFolder))
|
||||
{
|
||||
string fileNameWithoutExt = Path.GetFileNameWithoutExtension(imagePath);
|
||||
if (!commonFiles.Contains(fileNameWithoutExt))
|
||||
{
|
||||
File.Delete(imagePath);
|
||||
Console.WriteLine($"Deleted image file: {imagePath}");
|
||||
}
|
||||
}
|
||||
|
||||
// 删除 labels 文件夹中不在交集中的文件
|
||||
foreach (var labelPath in Directory.GetFiles(labelsFolder))
|
||||
{
|
||||
string fileNameWithoutExt = Path.GetFileNameWithoutExtension(labelPath);
|
||||
if (!commonFiles.Contains(fileNameWithoutExt))
|
||||
{
|
||||
File.Delete(labelPath);
|
||||
Console.WriteLine($"Deleted label file: {labelPath}");
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine("Folders cleaned successfully!");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取文件夹中所有图片文件的个数
|
||||
/// </summary>
|
||||
/// <param name="folderPath">目标文件夹路径</param>
|
||||
/// <param name="includeSubdirectories">是否包含子文件夹,默认不包含</param>
|
||||
/// <returns>图片文件总数</returns>
|
||||
public static int CountImageFiles(string folderPath, bool includeSubdirectories = false)
|
||||
{
|
||||
if (!Directory.Exists(folderPath))
|
||||
{
|
||||
throw new DirectoryNotFoundException($"The folder '{folderPath}' does not exist.");
|
||||
}
|
||||
|
||||
// 支持的图片格式
|
||||
string[] imageExtensions = { "*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif" };
|
||||
|
||||
// 搜索选项
|
||||
SearchOption searchOption = includeSubdirectories ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly;
|
||||
|
||||
int fileCount = 0;
|
||||
|
||||
foreach (var ext in imageExtensions)
|
||||
{
|
||||
fileCount += Directory.GetFiles(folderPath, ext, searchOption).Length;
|
||||
}
|
||||
|
||||
return fileCount;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个目录所有子目录和文件
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
public static void DeleteDirectoryAndContents(string path)
|
||||
{
|
||||
// 确保目录存在
|
||||
if (Directory.Exists(path))
|
||||
{
|
||||
// 删除目录中的文件
|
||||
string[] files = Directory.GetFiles(path);
|
||||
foreach (var file in files)
|
||||
{
|
||||
File.Delete(file);
|
||||
Console.WriteLine($"文件已删除: {file}");
|
||||
}
|
||||
|
||||
// 删除目录中的子目录
|
||||
string[] directories = Directory.GetDirectories(path);
|
||||
foreach (var directory in directories)
|
||||
{
|
||||
DeleteDirectoryAndContents(directory); // 递归删除子目录
|
||||
}
|
||||
|
||||
// 删除空目录
|
||||
Directory.Delete(path);
|
||||
Console.WriteLine($"目录已删除: {path}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("目录不存在!");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 将一个文件夹中的所有图片文件和 JSON 文件复制到另一个文件夹中
|
||||
/// </summary>
|
||||
/// <param name="sourceDirectory"></param>
|
||||
/// <param name="destinationDirectory"></param>
|
||||
public static void CopyImageAndJsonFiles(string sourceDirectory, string destinationDirectory)
|
||||
{
|
||||
// 确保目标文件夹存在,如果不存在则创建它
|
||||
if (!Directory.Exists(destinationDirectory))
|
||||
{
|
||||
Directory.CreateDirectory(destinationDirectory);
|
||||
}
|
||||
|
||||
// 获取源文件夹中的所有图片文件和 JSON 文件
|
||||
string[] imageFiles = Directory.GetFiles(sourceDirectory, "*.*")
|
||||
.Where(file => file.EndsWith(".jpg", StringComparison.OrdinalIgnoreCase) ||
|
||||
file.EndsWith(".jpeg", StringComparison.OrdinalIgnoreCase) ||
|
||||
file.EndsWith(".png", StringComparison.OrdinalIgnoreCase) ||
|
||||
file.EndsWith(".gif", StringComparison.OrdinalIgnoreCase) ||
|
||||
file.EndsWith(".bmp", StringComparison.OrdinalIgnoreCase) ||
|
||||
file.EndsWith(".tiff", StringComparison.OrdinalIgnoreCase) ||
|
||||
file.EndsWith(".webp", StringComparison.OrdinalIgnoreCase))
|
||||
.ToArray();
|
||||
|
||||
string[] jsonFiles = Directory.GetFiles(sourceDirectory, "*.json");
|
||||
|
||||
// 合并图片文件和 JSON 文件
|
||||
string[] filesToCopy = imageFiles.Concat(jsonFiles).ToArray();
|
||||
|
||||
foreach (string file in filesToCopy)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 获取文件名
|
||||
string fileName = Path.GetFileName(file);
|
||||
|
||||
// 拼接目标文件的完整路径
|
||||
string destinationFile = Path.Combine(destinationDirectory, fileName);
|
||||
|
||||
// 如果目标文件已存在,可以选择覆盖或跳过(这里我们选择跳过)
|
||||
if (File.Exists(destinationFile))
|
||||
{
|
||||
Console.WriteLine($"文件 {fileName} 已存在,跳过复制.");
|
||||
continue;
|
||||
}
|
||||
|
||||
// 复制文件
|
||||
File.Copy(file, destinationFile);
|
||||
Console.WriteLine($"文件 {fileName} 已成功复制到 {destinationDirectory}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"复制文件 {file} 时出错: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 遍历图片文件夹,检查对应的标签文件夹中是否有同名的 .txt 文件。
|
||||
/// 如果没有,则创建一个空的 .txt 文件。
|
||||
/// </summary>
|
||||
/// <param name="imagesDirectory">图片文件夹路径</param>
|
||||
/// <param name="labelsDirectory">标签文件夹路径</param>
|
||||
public static void ProcessImageFiles(string imagesDirectory, string labelsDirectory)
|
||||
{
|
||||
// 检查 images 目录是否存在
|
||||
if (!Directory.Exists(imagesDirectory))
|
||||
{
|
||||
throw new DirectoryNotFoundException($"目录 {imagesDirectory} 不存在.");
|
||||
}
|
||||
|
||||
// 检查 labels 目录是否存在,如果不存在则创建
|
||||
if (!Directory.Exists(labelsDirectory))
|
||||
{
|
||||
Directory.CreateDirectory(labelsDirectory);
|
||||
Console.WriteLine($"目录 {labelsDirectory} 已创建.");
|
||||
}
|
||||
|
||||
// 获取 images 目录中的所有文件(包括图片文件)
|
||||
string[] imageFiles = Directory.GetFiles(imagesDirectory, "*.*", SearchOption.TopDirectoryOnly);
|
||||
string[] validExtensions = { ".jpg", ".jpeg", ".png", ".bmp", ".gif" }; // 支持的图片格式
|
||||
|
||||
foreach (var imageFile in imageFiles)
|
||||
{
|
||||
// 检查文件扩展名是否为支持的图片格式
|
||||
string extension = Path.GetExtension(imageFile).ToLower();
|
||||
if (Array.Exists(validExtensions, ext => ext == extension))
|
||||
{
|
||||
// 获取图片文件的文件名(不包括扩展名)
|
||||
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(imageFile);
|
||||
|
||||
// 生成对应的 txt 文件路径
|
||||
string labelFilePath = Path.Combine(labelsDirectory, fileNameWithoutExtension + ".txt");
|
||||
|
||||
// 如果该 txt 文件不存在,则创建一个空白 txt 文件
|
||||
if (!File.Exists(labelFilePath))
|
||||
{
|
||||
try
|
||||
{
|
||||
File.WriteAllText(labelFilePath, string.Empty); // 创建空白 txt 文件
|
||||
Console.WriteLine($"创建空白文件: {labelFilePath}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"无法创建文件 {labelFilePath}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 封装的函数:删除没有对应 JSON 文件的图片
|
||||
public static void DeleteUnmatchedImages(string labelsFolderPath, string imagesFolderPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 获取 labels 文件夹中的所有 JSON 文件名(去除扩展名)
|
||||
string[] jsonFiles = Directory.GetFiles(labelsFolderPath, "*.txt");
|
||||
HashSet<string> jsonFileNames = new HashSet<string>();
|
||||
|
||||
foreach (string jsonFile in jsonFiles)
|
||||
{
|
||||
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(jsonFile);
|
||||
jsonFileNames.Add(fileNameWithoutExtension);
|
||||
}
|
||||
|
||||
// 获取 images 文件夹中的所有图片文件
|
||||
string[] imageFiles = Directory.GetFiles(imagesFolderPath);
|
||||
|
||||
// 遍历图片文件,检查是否有对应的 JSON 文件
|
||||
foreach (string imageFile in imageFiles)
|
||||
{
|
||||
string imageFileNameWithoutExtension = Path.GetFileNameWithoutExtension(imageFile);
|
||||
|
||||
// 如果图片文件名不在 labels 文件夹的 JSON 文件名集合中,则删除该图片
|
||||
if (!jsonFileNames.Contains(imageFileNameWithoutExtension))
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Delete(imageFile); // 删除图片
|
||||
Console.WriteLine($"已删除图片: {Path.GetFileName(imageFile)}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"删除文件 {Path.GetFileName(imageFile)} 时出错: {ex.Message}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine($"图片 {Path.GetFileName(imageFile)} 有对应的 JSON 文件,不删除。");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"操作失败: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将 List<string> 保存到指定文件中,格式为 "项,标签"。
|
||||
/// 标签是根据项的索引生成的。
|
||||
/// </summary>
|
||||
/// <param name="items">要保存的字符串列表</param>
|
||||
/// <param name="filePath">保存文件的路径</param>
|
||||
public static void SaveItemsToFile(List<string> items, string filePath)
|
||||
{
|
||||
// 使用 StreamWriter 写入文件
|
||||
using (StreamWriter writer = new StreamWriter(filePath))
|
||||
{
|
||||
// 遍历 items 列表
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
// 写入每一行,格式为 "项, 标签"
|
||||
writer.WriteLine($"{items[i]},{i}");
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void SaveItemsToFile(HashSet<string> items, string filePath)
|
||||
{
|
||||
// 使用 StreamWriter 写入文件
|
||||
using (StreamWriter writer = new StreamWriter(filePath))
|
||||
{
|
||||
// 遍历 HashSet
|
||||
int i = 0;
|
||||
foreach (string item in items)
|
||||
{
|
||||
// 写入每一行,格式为 "项, 标签"
|
||||
writer.WriteLine($"{item},{i}"); // 假设使用 item 的长度作为标签
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
static List<FileInformation> FileList = new List<FileInformation>();
|
||||
|
||||
/// <summary>
|
||||
/// 递归获取指定文件夹下所有文件
|
||||
/// </summary>
|
||||
/// <param name="dir"></param>
|
||||
/// <returns></returns>
|
||||
public static List<FileInformation> GetAllFiles(DirectoryInfo dir)
|
||||
{
|
||||
FileInfo[] allFile = dir.GetFiles();
|
||||
foreach (FileInfo fi in allFile)
|
||||
{
|
||||
FileList.Add(new FileInformation { FileName = fi.Name, FilePath = fi.FullName });
|
||||
}
|
||||
DirectoryInfo[] allDir = dir.GetDirectories();
|
||||
foreach (DirectoryInfo d in allDir)
|
||||
{
|
||||
GetAllFiles(d);
|
||||
}
|
||||
return FileList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断字符串是否纯字母
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsAlphabetOnly(string input)
|
||||
{
|
||||
return Regex.IsMatch(input, "^[a-zA-Z]+$");
|
||||
}
|
||||
/// <summary>
|
||||
/// 判断字符串是否仅包含大小写字母和数字
|
||||
/// </summary>
|
||||
/// <param name="input">待判断的字符串</param>
|
||||
/// <returns>如果字符串仅包含字母和数字,返回 true;否则返回 false</returns>
|
||||
public static bool IsAlphaNumericOnly(string input)
|
||||
{
|
||||
return Regex.IsMatch(input, "^[a-zA-Z0-9]+$");
|
||||
}
|
||||
public static string ConvertHanzitoPinyinWithNumbers(string input)
|
||||
{
|
||||
// 正则表达式匹配汉字
|
||||
string pattern = @"[\u4e00-\u9fa5]";
|
||||
Regex regex = new Regex(pattern);
|
||||
|
||||
StringBuilder result = new StringBuilder();
|
||||
int lastIndex = 0;
|
||||
|
||||
foreach (Match match in regex.Matches(input))
|
||||
{
|
||||
// 将非汉字部分保留为原样
|
||||
result.Append(input.Substring(lastIndex, match.Index - lastIndex));
|
||||
|
||||
// 获取汉字并转换为拼音
|
||||
string hanzi = match.Value;
|
||||
string pinyin = ConvertHanziToPinyin(hanzi);
|
||||
|
||||
// 将拼音追加到结果中
|
||||
result.Append(pinyin);
|
||||
|
||||
lastIndex = match.Index + match.Length;
|
||||
}
|
||||
|
||||
// 添加最后的非汉字部分
|
||||
result.Append(input.Substring(lastIndex));
|
||||
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
public static string ConvertHanziToPinyin(string hanzi)
|
||||
{
|
||||
// 设置拼音格式:去掉音调,拼音小写,ü保持为u:
|
||||
PinyinFormat format = PinyinFormat.WITHOUT_TONE | PinyinFormat.LOWERCASE | PinyinFormat.WITH_U_AND_COLON;
|
||||
|
||||
// 获取拼音数组
|
||||
List<PinyinItem> pinyinItems = Pinyin4Net.GetPinyinArray(hanzi, format);
|
||||
|
||||
StringBuilder pinyinBuilder = new StringBuilder();
|
||||
|
||||
foreach (var item in pinyinItems)
|
||||
{
|
||||
// 处理多音字:默认取第一个拼音
|
||||
if (item.Count > 0)
|
||||
{
|
||||
string pinyin = item[0];
|
||||
|
||||
// 特殊处理ü的情况
|
||||
pinyin = pinyin.Replace("u:", "v"); // 将u:转为v,这是常见的拼音表示法
|
||||
|
||||
pinyinBuilder.Append(pinyin);
|
||||
}
|
||||
}
|
||||
|
||||
return pinyinBuilder.ToString();
|
||||
}
|
||||
/// <summary>
|
||||
/// 汉字拼音转化
|
||||
/// </summary>
|
||||
/// <param name="hanzi"></param>
|
||||
/// <returns></returns>
|
||||
//public static string ConvertHanzitoPinyin(string hanzi)
|
||||
//{
|
||||
// PinyinFormat format = PinyinFormat.WITHOUT_TONE | PinyinFormat.LOWERCASE | PinyinFormat.WITH_U_UNICODE;
|
||||
|
||||
// // string hanzi = defectRow.LabelDescription;
|
||||
// List<PinyinItem> pylist = Pinyin4Net.GetPinyinArray(hanzi, format);
|
||||
// // 提取所有拼音并合并为一个字符串
|
||||
// List<string> pinyinStrings = new List<string>();
|
||||
// foreach (var item in pylist)
|
||||
// {
|
||||
// // 将PinyinItem中的每个拼音(List<string>)合并为一个字符串
|
||||
// string joinedPinyin = string.Join("", item); // 这里的item就是一个List<string>,其中存储了拼音
|
||||
// pinyinStrings.Add(joinedPinyin); // 添加合并后的拼音
|
||||
// }
|
||||
|
||||
// // 合并所有拼音为一个字符串
|
||||
// string allPinyin = string.Join("", pinyinStrings);
|
||||
// return allPinyin;
|
||||
//}
|
||||
/// <summary>
|
||||
/// 递归获取指定文件夹下所有文件
|
||||
/// </summary>
|
||||
/// <param name="dir"></param>
|
||||
/// <returns></returns>
|
||||
public static List<FileInformation> GetAllFiles(string dir)
|
||||
{
|
||||
DirectoryInfo directoryInfo = new(dir);
|
||||
return GetAllFiles(directoryInfo);
|
||||
}
|
||||
public static string OpenSlectDirDialog(string dirpath = "")
|
||||
{
|
||||
FolderBrowserDialog fbd = new FolderBrowserDialog();
|
||||
fbd.InitialDirectory = dirpath;
|
||||
if (fbd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
string targetDirPath = fbd.SelectedPath;
|
||||
if (Directory.Exists(targetDirPath))
|
||||
{
|
||||
return targetDirPath;
|
||||
}
|
||||
else
|
||||
return string.Empty;
|
||||
//ImportDirImages(targetDirPath);
|
||||
}
|
||||
else
|
||||
return string.Empty;
|
||||
}
|
||||
public static string OpenSlectfileDialog(string dirpath = "")
|
||||
{
|
||||
|
||||
|
||||
|
||||
// 创建并配置 OpenFileDialog 实例
|
||||
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||||
openFileDialog.Title = "选择文件"; // 对话框标题
|
||||
openFileDialog.Filter = "所有文件 (*.pt)|*.*"; // 允许选择任何类型的文件
|
||||
openFileDialog.InitialDirectory = @"C:\"; // 初始显示目录,可以根据需要修改
|
||||
|
||||
// 显示对话框
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
// 获取选中的文件路径
|
||||
string selectedFilePath = openFileDialog.FileName;
|
||||
Console.WriteLine("您选择的文件路径是: " + selectedFilePath);
|
||||
return selectedFilePath;
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("没有选择任何文件。");
|
||||
return string.Empty;
|
||||
MessageBox.Show("没有选择任何文件。");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class FileInformation
|
||||
{
|
||||
public string FileName { get; set; }
|
||||
public string FilePath { get; set; }
|
||||
}
|
||||
}
|
@ -571,8 +571,8 @@ namespace DH.Commons.Enums
|
||||
}
|
||||
|
||||
|
||||
//分别基于像素(GetPixel和SetPixel)、基于内存、基于指针这三种方法增强图片对比度。
|
||||
// 第一种方法:像素提取法。速度慢 基于像素:400-600ms
|
||||
//分别基于像素(GetPixel和SetPixel)、基于内存、基于指针这三种方法增强图片对比度
|
||||
// 第一种方法:像素提取法 速度慢 基于像素:400-600ms
|
||||
public static Bitmap MethodBaseOnPixel(Bitmap bitmap, int degree)
|
||||
{
|
||||
Color curColor;
|
||||
|
@ -1,117 +1,169 @@
|
||||
using System;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace DH.Commons.Helper
|
||||
{
|
||||
public static class SchemeHelper
|
||||
{
|
||||
private const string SchemesKey = "Schemes";
|
||||
private const string CurrentSchemeKey = "CurrentScheme";
|
||||
private const char Separator = '|';
|
||||
private const string DefaultSchemeName = "默认方案";
|
||||
private static readonly string ConfigFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "schemes.json");
|
||||
|
||||
/// <summary>
|
||||
/// 方案配置数据结构
|
||||
/// </summary>
|
||||
private class SchemeConfig
|
||||
{
|
||||
public List<string> Schemes { get; set; } = new List<string>();
|
||||
public string CurrentScheme { get; set; } = DefaultSchemeName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化配置(首次运行时调用)
|
||||
/// </summary>
|
||||
public static void Initialize()
|
||||
{
|
||||
// 如果Schemes不存在,创建空键
|
||||
if (!SystemConfigHelper.KeyExists(SchemesKey))
|
||||
if (!File.Exists(ConfigFilePath))
|
||||
{
|
||||
SystemConfigHelper.SetValue(SchemesKey, "");
|
||||
}
|
||||
|
||||
// 如果CurrentScheme不存在,创建空键
|
||||
if (!SystemConfigHelper.KeyExists(CurrentSchemeKey))
|
||||
{
|
||||
SystemConfigHelper.SetValue(CurrentSchemeKey, "");
|
||||
var defaultConfig = new SchemeConfig
|
||||
{
|
||||
Schemes = new List<string> { DefaultSchemeName },
|
||||
CurrentScheme = DefaultSchemeName
|
||||
};
|
||||
SaveConfig(defaultConfig);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有方案(自动处理空值)
|
||||
/// 获取所有方案
|
||||
/// </summary>
|
||||
public static List<string> GetAllSchemes()
|
||||
{
|
||||
var schemeString = SystemConfigHelper.GetValue(SchemesKey, "");
|
||||
return string.IsNullOrEmpty(schemeString)
|
||||
? new List<string>()
|
||||
: new List<string>(schemeString.Split(Separator));
|
||||
var config = LoadConfig();
|
||||
return config.Schemes ?? new List<string>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加新方案(自动初始化处理)
|
||||
/// 添加新方案
|
||||
/// </summary>
|
||||
public static void AddScheme(string schemeName)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(schemeName))
|
||||
throw new ArgumentException("方案名称无效");
|
||||
|
||||
var schemes = GetAllSchemes();
|
||||
var config = LoadConfig();
|
||||
|
||||
if (schemes.Contains(schemeName))
|
||||
if (config.Schemes.Contains(schemeName))
|
||||
throw new InvalidOperationException($"方案 {schemeName} 已存在");
|
||||
|
||||
schemes.Add(schemeName);
|
||||
SaveSchemes(schemes);
|
||||
config.Schemes.Add(schemeName);
|
||||
SaveConfig(config);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置当前方案(空值安全处理)
|
||||
/// 设置当前方案
|
||||
/// </summary>
|
||||
public static void SetCurrentScheme(string schemeName)
|
||||
{
|
||||
var schemes = GetAllSchemes();
|
||||
var config = LoadConfig();
|
||||
|
||||
if (!schemes.Contains(schemeName))
|
||||
if (!config.Schemes.Contains(schemeName))
|
||||
throw new KeyNotFoundException($"方案 {schemeName} 不存在");
|
||||
|
||||
SystemConfigHelper.SetValue(CurrentSchemeKey, schemeName);
|
||||
config.CurrentScheme = schemeName;
|
||||
SaveConfig(config);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前方案(默认值处理)
|
||||
/// 获取当前方案
|
||||
/// </summary>
|
||||
public static string GetCurrentScheme()
|
||||
{
|
||||
var current = SystemConfigHelper.GetValue(CurrentSchemeKey, "");
|
||||
return !string.IsNullOrEmpty(current) ? current : "默认方案";
|
||||
var config = LoadConfig();
|
||||
return !string.IsNullOrEmpty(config.CurrentScheme)
|
||||
? config.CurrentScheme
|
||||
: DefaultSchemeName;
|
||||
}
|
||||
|
||||
private static void SaveSchemes(List<string> schemes)
|
||||
{
|
||||
var schemeString = schemes.Count > 0
|
||||
? string.Join(Separator.ToString(), schemes)
|
||||
: "";
|
||||
SystemConfigHelper.SetValue(SchemesKey, schemeString);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定方案(自动同步当前方案状态)
|
||||
/// 删除指定方案
|
||||
/// </summary>
|
||||
/// <param name="schemeName">要删除的方案名称</param>
|
||||
/// <exception cref="ArgumentException">当方案名称为空时抛出</exception>
|
||||
/// <exception cref="KeyNotFoundException">当方案不存在时抛出</exception>
|
||||
public static void DeleteScheme(string schemeName)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(schemeName))
|
||||
throw new ArgumentException("方案名称无效");
|
||||
|
||||
var schemes = GetAllSchemes();
|
||||
var config = LoadConfig();
|
||||
|
||||
if (!schemes.Contains(schemeName))
|
||||
if (!config.Schemes.Contains(schemeName))
|
||||
throw new KeyNotFoundException($"方案 {schemeName} 不存在");
|
||||
|
||||
// 删除前检查是否是当前方案
|
||||
bool isCurrent = GetCurrentScheme() == schemeName;
|
||||
// 如果是当前方案,需要先切换
|
||||
if (config.CurrentScheme == schemeName)
|
||||
{
|
||||
var otherScheme = config.Schemes.FirstOrDefault(s => s != schemeName);
|
||||
if (otherScheme != null)
|
||||
{
|
||||
config.CurrentScheme = otherScheme;
|
||||
}
|
||||
else
|
||||
{
|
||||
config.CurrentScheme = DefaultSchemeName;
|
||||
if (!config.Schemes.Contains(DefaultSchemeName))
|
||||
{
|
||||
config.Schemes.Add(DefaultSchemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 执行删除操作
|
||||
schemes.Remove(schemeName);
|
||||
SaveSchemes(schemes);
|
||||
config.Schemes.Remove(schemeName);
|
||||
SaveConfig(config);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载配置文件
|
||||
/// </summary>
|
||||
private static SchemeConfig LoadConfig()
|
||||
{
|
||||
if (!File.Exists(ConfigFilePath))
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
string json = File.ReadAllText(ConfigFilePath);
|
||||
return JsonConvert.DeserializeObject<SchemeConfig>(json) ?? new SchemeConfig();
|
||||
}
|
||||
catch
|
||||
{
|
||||
// 如果读取失败,返回默认配置
|
||||
return new SchemeConfig
|
||||
{
|
||||
Schemes = new List<string> { DefaultSchemeName },
|
||||
CurrentScheme = DefaultSchemeName
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存配置文件
|
||||
/// </summary>
|
||||
private static void SaveConfig(SchemeConfig config)
|
||||
{
|
||||
try
|
||||
{
|
||||
string json = JsonConvert.SerializeObject(config, Formatting.Indented);
|
||||
File.WriteAllText(ConfigFilePath, json);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// 处理保存失败的情况
|
||||
throw new InvalidOperationException("保存方案配置失败", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -108,7 +108,7 @@ namespace DH.Commons.Enums
|
||||
DataGridViewCheckboxHeaderEventArgs ex = new DataGridViewCheckboxHeaderEventArgs();
|
||||
ex.CheckedState = _checked;
|
||||
|
||||
object sender = new object();//此处不代表选择的列头checkbox,只是作为参数传递。因为列头checkbox是绘制出来的,无法获得它的实例
|
||||
object sender = new object();//此处不代表选择的列头checkbox,只是作为参数传递 因为列头checkbox是绘制出来的,无法获得它的实例
|
||||
|
||||
if (OnCheckBoxClicked != null)
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ namespace DH.Commons.Models
|
||||
/// <summary>
|
||||
/// 当前状态
|
||||
/// </summary>
|
||||
public static EnumStatus CurrentStatus =EnumStatus.未运行;
|
||||
public static EnumStatus CurrentStatus =EnumStatus.待机中;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -24,10 +24,10 @@ namespace DH.Devices.Camera
|
||||
private dvpStatus nRet = dvpStatus.DVP_STATUS_OK;
|
||||
private DVPCamera.dvpEventCallback pCallBackFunc;
|
||||
private uint m_handle;
|
||||
|
||||
public bool Connected=false;
|
||||
public int m_n_dev_count = 0;
|
||||
private DVPCamera.dvpStreamCallback ImageCallback;
|
||||
public dvpStreamFormat dvpStreamFormat = dvpStreamFormat.S_RGB24;
|
||||
// public dvpStreamFormat dvpStreamFormat = dvpStreamFormat.S_RGB24;
|
||||
public int m_CamCount = 0;
|
||||
public Double m_dfDisplayCount = 0;
|
||||
|
||||
@ -63,6 +63,8 @@ namespace DH.Devices.Camera
|
||||
{
|
||||
try
|
||||
{
|
||||
if (CameraName == "Cam1")
|
||||
Console.WriteLine("");
|
||||
pCallBackFunc = new DVPCamera.dvpEventCallback(cbExceptiondelegate);
|
||||
nRet = DVPCamera.dvpOpenByUserId(CameraName,
|
||||
dvpOpenMode.OPEN_NORMAL,
|
||||
@ -74,7 +76,7 @@ namespace DH.Devices.Camera
|
||||
throw new Exception($"Create device failed:{nRet:x8}");
|
||||
}
|
||||
|
||||
nRet = DVPCamera.dvpSetTargetFormat(m_handle, (dvpStreamFormat)dvpStreamFormat);
|
||||
nRet = DVPCamera.dvpSetTargetFormat(m_handle, (dvpStreamFormat)DvpImageFormat);
|
||||
if (dvpStatus.DVP_STATUS_OK != nRet)
|
||||
{
|
||||
throw new Exception($"Set image format failed:{nRet:x8}");
|
||||
@ -156,7 +158,10 @@ namespace DH.Devices.Camera
|
||||
}
|
||||
//全画幅
|
||||
if (!IsAllPicEnabled)
|
||||
{
|
||||
SetPictureRoi((int)ROIX, (int)ROIY, (int)ROIW, (int)ROIH);
|
||||
}
|
||||
|
||||
|
||||
//// 设置 触发延迟
|
||||
if (TriggerDelay > 0)
|
||||
@ -180,13 +185,14 @@ namespace DH.Devices.Camera
|
||||
|
||||
//IIConfig.PropertyChanged -= IIConfig_PropertyChanged;
|
||||
//IIConfig.PropertyChanged += IIConfig_PropertyChanged;
|
||||
|
||||
Connected = true;
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
Connected = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -349,14 +355,7 @@ namespace DH.Devices.Camera
|
||||
public int ImageCallbackFunc(uint handle, dvpStreamEvent _event, IntPtr pContext, ref dvpFrame refFrame, IntPtr pBuffer)
|
||||
{
|
||||
Mat cvImage = new Mat();
|
||||
if (this.CameraName.Equals("Cam1"))
|
||||
{
|
||||
Console.WriteLine();
|
||||
}
|
||||
if (this.CameraName.Equals("Cam2"))
|
||||
{
|
||||
Console.WriteLine();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@ -386,11 +385,30 @@ namespace DH.Devices.Camera
|
||||
cvImage = Mat.FromPixelData(nHeight, nWidth, MatType.CV_8UC1, pBuffer);
|
||||
break;
|
||||
}
|
||||
|
||||
Mat smat = cvImage.Clone();
|
||||
Mat rotated = new Mat(); // 显式创建输出对象
|
||||
|
||||
switch (RotateImage)
|
||||
{
|
||||
case 90:
|
||||
Cv2.Rotate(smat, rotated, RotateFlags.Rotate90Clockwise);
|
||||
break;
|
||||
case 180:
|
||||
Cv2.Rotate(smat, rotated, RotateFlags.Rotate180);
|
||||
break;
|
||||
case 270:
|
||||
Cv2.Rotate(smat, rotated, RotateFlags.Rotate90Counterclockwise);
|
||||
break;
|
||||
default:
|
||||
rotated = smat.Clone(); // 无旋转时保持原图
|
||||
break;
|
||||
}
|
||||
|
||||
var imageSet = new MatSet
|
||||
{
|
||||
|
||||
_mat = smat,
|
||||
_mat = rotated,
|
||||
|
||||
};
|
||||
InitialImageSet(imageSet);
|
||||
@ -556,6 +574,12 @@ namespace DH.Devices.Camera
|
||||
|
||||
}
|
||||
|
||||
public void Snapshot()
|
||||
{
|
||||
DVPCamera.dvpTriggerFire(m_handle);
|
||||
|
||||
}
|
||||
|
||||
public void LogAsync(LogMsg msg)
|
||||
{
|
||||
msg.MsgSource = CameraName;
|
||||
|
@ -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>
|
||||
/// <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>
|
||||
/// ע<>⣺<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>䡣
|
||||
/// <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>䣬<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ϊ 0</param>
|
||||
/// <returns></returns>
|
||||
[DllImport("MCDLL_NET.DLL", EntryPoint = "MCF_Search_Home_Stop_Time_Net")]
|
||||
|
@ -444,17 +444,17 @@ namespace DH.Devices.Motion
|
||||
|
||||
//[Category("回原点设置")]
|
||||
//[DisplayName("回原点模式")]
|
||||
//[Description("HomeMode:回原点模式。0:一般模式 1:极限限位模式 2:外部触发模式")]
|
||||
//[Description("HomeMode:回原点模式 0:一般模式 1:极限限位模式 2:外部触发模式")]
|
||||
//public int HomeMode { get; set; } = 0;
|
||||
|
||||
//[Category("回原点设置")]
|
||||
//[DisplayName("回原点方向")]
|
||||
//[Description("IsHomePositive:回原点方向。 true:正方向开始 false:负方向开始")]
|
||||
//[Description("IsHomePositive:回原点方向 true:正方向开始 false:负方向开始")]
|
||||
//public bool IsHomePositive { get; set; } = true;
|
||||
|
||||
//[Category("回原点设置")]
|
||||
//[DisplayName("是否自动回原点")]
|
||||
//[Description("IsAutoGoHome:是否自动回原点。 true:是 false:否")]
|
||||
//[Description("IsAutoGoHome:是否自动回原点 true:是 false:否")]
|
||||
//public bool IsAutoGoHome { get; set; } = false;
|
||||
|
||||
//[Category("超时设置")]
|
||||
@ -601,7 +601,7 @@ namespace DH.Devices.Motion
|
||||
|
||||
[Category("回原点参数")]
|
||||
[DisplayName("碰撞原点缓停时间")]
|
||||
[Description("SearchHomeStopTime:触发缓停时间,范围 0-1000ms,(默认:急停)。注意:设置碰撞原点缓停时间,需要配合回零设置的高速段速度,和低速度速度的搭配。设置大了会出现过冲的现象,设置小了停止的时候会有抖动,需要调节时间,尽量设置找到原点时候在开关中间。")]
|
||||
[Description("SearchHomeStopTime:触发缓停时间,范围 0-1000ms,(默认:急停) 注意:设置碰撞原点缓停时间,需要配合回零设置的高速段速度,和低速度速度的搭配 设置大了会出现过冲的现象,设置小了停止的时候会有抖动,需要调节时间,尽量设置找到原点时候在开关中间 ")]
|
||||
public ushort SearchHomeStopTime { get; set; } = 0;
|
||||
|
||||
|
||||
|
@ -85,11 +85,15 @@ namespace DH.Devices.Motion
|
||||
|
||||
public void NewPieces(int diskIndex, uint pieceNumber)
|
||||
{
|
||||
_taskFactory.StartNew(() =>
|
||||
Task.Run(() =>
|
||||
{
|
||||
Thread.CurrentThread.Priority = ThreadPriority.Highest;
|
||||
try {
|
||||
Thread.CurrentThread.Priority = ThreadPriority.Highest;
|
||||
|
||||
OnNewPieces?.Invoke(diskIndex, pieceNumber);
|
||||
}
|
||||
catch (Exception ex) { /* 记录异常 */ }
|
||||
|
||||
OnNewPieces?.Invoke(diskIndex, pieceNumber);
|
||||
});
|
||||
}
|
||||
public void SetResetFlag(bool isReset)
|
||||
@ -314,9 +318,9 @@ namespace DH.Devices.Motion
|
||||
// //设置物件检测有效电平 0是低电平 1是高电平
|
||||
// rtn = CMCDLL_NET_Sorting.MCF_Sorting_Set_Input_Logic_Net((ushort)SortingInputSetting.BitInputNumber, 0);
|
||||
// //设置来料检测编码器 双转盘要设置两个轴
|
||||
// /*Bit_Input_Number:设置位号。
|
||||
// 取值: Bit_Input_0, Bit_Input_1。
|
||||
// Axis: 轴号。
|
||||
// /*Bit_Input_Number:设置位号
|
||||
// 取值: Bit_Input_0, Bit_Input_1
|
||||
// Axis: 轴号
|
||||
// Source:跟随方式
|
||||
// 取值:0:命令
|
||||
// 1:编码器(默认)
|
||||
@ -1655,7 +1659,7 @@ namespace DH.Devices.Motion
|
||||
#region IMonitor
|
||||
|
||||
/// <summary>
|
||||
/// 位置捕获监听,入料检测。
|
||||
/// 位置捕获监听,入料检测
|
||||
/// 入料检测对射开关接到了HOME口,每当有新料到达入料检测传感器时,程序把当前位置当作原点,并调用<see cref="SolidMotionCardBase.CapturePositionChanged(int, int)"/>函数
|
||||
/// </summary>
|
||||
private void MonitorPieces()
|
||||
@ -1796,7 +1800,7 @@ namespace DH.Devices.Motion
|
||||
// Picese_sizeStr += i.ToString()+":"+Piece_Size[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);
|
||||
if (tmpPieceNumber != piecesCountDic[station] + 1)
|
||||
{
|
||||
|
@ -11,6 +11,7 @@ using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
using DH.Commons.Base;
|
||||
using DH.Commons.Enums;
|
||||
using DH.Commons.Helper;
|
||||
using DH.Commons.Models;
|
||||
using HslCommunication;
|
||||
using HslCommunication.Enthernet;
|
||||
@ -37,6 +38,8 @@ namespace DH.Devices.PLC
|
||||
public event Action<LogMsg> OnLog;
|
||||
private XinJETcpNet TcpNet = new XinJETcpNet();
|
||||
|
||||
private TaskFactory _taskFac = new TaskFactory(TaskCreationOptions.LongRunning, TaskContinuationOptions.LongRunning);
|
||||
|
||||
public override bool PLCConnect()
|
||||
{
|
||||
try
|
||||
@ -76,16 +79,18 @@ namespace DH.Devices.PLC
|
||||
{
|
||||
Connected = false;
|
||||
LogAsync(DateTime.Now, LogLevel.Error, $"PLC初始化失败");
|
||||
throw new Exception($"{IP}:{Port}PLC连接失败!");
|
||||
return false;
|
||||
//throw new Exception($"{IP}:{Port}PLC连接失败!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch(Exception ex)
|
||||
catch (Exception ex)
|
||||
{
|
||||
Connected = false;
|
||||
LogAsync(DateTime.Now, LogLevel.Error, $"{IP}:{Port}PLC连接失败!失败原因:{ex.ToString()}");
|
||||
throw new Exception($"{IP}:{Port}PLC连接失败!失败原因:{ex.ToString()}");
|
||||
return false;
|
||||
//throw new Exception($"{IP}:{Port}PLC连接失败!失败原因:{ex.ToString()}");
|
||||
}
|
||||
|
||||
}
|
||||
@ -256,7 +261,8 @@ namespace DH.Devices.PLC
|
||||
public override bool ReadBool(string address)
|
||||
{
|
||||
try
|
||||
{ if (Connected)
|
||||
{
|
||||
if (Connected)
|
||||
{
|
||||
// 读取Bool变量
|
||||
var result = TcpNet.ReadBool(address);
|
||||
@ -532,7 +538,7 @@ namespace DH.Devices.PLC
|
||||
/// <param name="waitForReply">是否等待回复</param>
|
||||
public override bool WriteBool(string address, bool writeValue, bool waitForReply = true)
|
||||
{
|
||||
if(Connected)
|
||||
if (Connected)
|
||||
{
|
||||
if (string.IsNullOrEmpty(address))
|
||||
{
|
||||
@ -615,28 +621,74 @@ namespace DH.Devices.PLC
|
||||
/// int,int 轴号 捕获位置
|
||||
/// </summary>
|
||||
public event Action<int, uint> OnNewPieces;
|
||||
private System.Threading.Timer timer;
|
||||
private System.Threading.TimerCallback timerCallback;
|
||||
|
||||
|
||||
public void NewPieces(int axisIndex, uint pieceNumber)
|
||||
{
|
||||
_taskFactory.StartNew(() =>
|
||||
{
|
||||
Thread.CurrentThread.Priority = ThreadPriority.Highest;
|
||||
//_taskFactory.StartNew(() =>
|
||||
//{
|
||||
// Thread.CurrentThread.Priority = ThreadPriority.Highest;
|
||||
|
||||
// OnNewPieces?.Invoke(axisIndex, pieceNumber);
|
||||
//});
|
||||
Task.Run(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
Thread.CurrentThread.Priority = ThreadPriority.Highest;
|
||||
|
||||
OnNewPieces?.Invoke(axisIndex, pieceNumber);
|
||||
}
|
||||
catch (Exception ex) { /* 记录异常 */ }
|
||||
|
||||
OnNewPieces?.Invoke(axisIndex, pieceNumber);
|
||||
});
|
||||
}
|
||||
public async Task HeartbeatAsync1()
|
||||
{
|
||||
PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "心跳地址");
|
||||
#if false
|
||||
|
||||
Thread.CurrentThread.Priority = ThreadPriority.AboveNormal;
|
||||
if (pLCItem == null)
|
||||
return;
|
||||
while (Connected)
|
||||
{
|
||||
try
|
||||
{
|
||||
LogAsync(DateTime.Now, LogLevel.Information, $"心跳\t");
|
||||
|
||||
if (pLCItem == null)
|
||||
return;
|
||||
WriteBool(pLCItem.Address, true);
|
||||
await Task.Delay(900); // 非阻塞,等待1秒
|
||||
WriteBool(pLCItem.Address, true);
|
||||
await Task.Delay(2000); // 非阻塞,等待1秒
|
||||
}
|
||||
catch (Exception ex) { }
|
||||
}
|
||||
#else
|
||||
|
||||
timerCallback = (object? state) =>
|
||||
{
|
||||
timer.Change(2000, 2000);
|
||||
try
|
||||
{
|
||||
|
||||
//WriteBool(pLCItem.Address, true);
|
||||
WriteBool("M31", true);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogAsync(DateTime.Now, LogLevel.Error, $"心跳:{ex.Message}");
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
timer = new System.Threading.Timer(
|
||||
timerCallback, null, 0, 2000);
|
||||
|
||||
timer.Change(2000, 2000);
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// 入料监听
|
||||
@ -645,7 +697,7 @@ namespace DH.Devices.PLC
|
||||
private void MonitorPiecesImpl()
|
||||
{
|
||||
|
||||
PLCItem pLCItem= PLCItemList.FirstOrDefault(u => u.Name == "产品计数");
|
||||
PLCItem pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "产品计数");
|
||||
if (pLCItem == null)
|
||||
return;
|
||||
string Count = pLCItem.Address;
|
||||
@ -656,14 +708,14 @@ namespace DH.Devices.PLC
|
||||
//while (CurrentState != DeviceState.DSClose && CurrentState != DeviceState.DSExcept && CurrentState != DeviceState.DSUninit)
|
||||
while (Connected)
|
||||
{
|
||||
Stopwatch sw = new Stopwatch();
|
||||
// Stopwatch sw = new Stopwatch();
|
||||
uint tmpPieceNumber = 0;
|
||||
sw.Start();
|
||||
// sw.Start();
|
||||
|
||||
// var ret = TcpNet.ReadUInt16("D1016");
|
||||
// var ret = TcpNet.ReadUInt16("D1016");
|
||||
var ret = TcpNet.ReadUInt32(Count);
|
||||
|
||||
sw.Stop();
|
||||
//sw.Stop();
|
||||
if (ret.IsSuccess)
|
||||
{
|
||||
tmpPieceNumber = ret.Content;
|
||||
@ -671,20 +723,20 @@ namespace DH.Devices.PLC
|
||||
|
||||
if (ret.IsSuccess && ret.Content > piecesCount)
|
||||
{
|
||||
sw.Start();
|
||||
// sw.Start();
|
||||
// Console.WriteLine($"{DateTime.Now.ToString("HH:mm:ss.fff")} 板卡{station}产品入列触发{tmpPieceNumber}");
|
||||
//LogAsync(DateTime.Now, LogLevel.Information, $"转盘{0}产品入列 {piecesCountDic[0]} size:{sum}");
|
||||
if (tmpPieceNumber != piecesCount + 1)
|
||||
{
|
||||
LogAsync(DateTime.Now, LogLevel.Information, $"入列触发丢失\t{tmpPieceNumber}");
|
||||
LogAsync(DateTime.Now, LogLevel.Information, $"入列触发丢失\t{tmpPieceNumber}");
|
||||
// Console.WriteLine($"{DateTime.Now.ToString("HH:mm:ss.fff")}\t板卡{station}产品入列触发丢失,{piecesCountDic[station]}\t{tmpPieceNumber}");
|
||||
|
||||
}
|
||||
piecesCount = tmpPieceNumber;
|
||||
//NewPieces(ai, piecesCountDic[station]);
|
||||
NewPieces(1, piecesCount);
|
||||
sw.Stop();
|
||||
startTime = DateTime.Now;
|
||||
NewPieces(1, piecesCount);
|
||||
// sw.Stop();
|
||||
// startTime = DateTime.Now;
|
||||
//if (idalarm)
|
||||
//{
|
||||
// idalarm = false;
|
||||
@ -693,7 +745,7 @@ namespace DH.Devices.PLC
|
||||
|
||||
}
|
||||
|
||||
Thread.Sleep(1);
|
||||
Thread.Sleep(2);
|
||||
}
|
||||
}
|
||||
|
||||
@ -701,48 +753,157 @@ namespace DH.Devices.PLC
|
||||
{
|
||||
//启用心跳
|
||||
OpenHeartbeat(true);
|
||||
// LogAsync(DateTime.Now, LogLevel.Information, $"启用心跳");
|
||||
// LogAsync(DateTime.Now, LogLevel.Information, $"启用心跳");
|
||||
//状态复位
|
||||
StatusReset();
|
||||
//LogAsync(DateTime.Now, LogLevel.Information, $"状态复位");
|
||||
//关闭定位
|
||||
VisionPos(false);
|
||||
// LogAsync(DateTime.Now, LogLevel.Information, $"关闭定位");
|
||||
// LogAsync(DateTime.Now, LogLevel.Information, $"关闭定位");
|
||||
//写入流程加载点位配置
|
||||
InitProcessAction();
|
||||
//LogAsync(DateTime.Now, LogLevel.Information, $"写入流程加载点位配置");
|
||||
//计数清零
|
||||
CountToZero();
|
||||
// LogAsync(DateTime.Now, LogLevel.Information, $"计数清零");
|
||||
// LogAsync(DateTime.Now, LogLevel.Information, $"计数清零");
|
||||
//停止转盘
|
||||
TurnStart(false);
|
||||
//LogAsync(DateTime.Now, LogLevel.Information, $"停止转盘");
|
||||
//转盘使能
|
||||
TurnEnable(true);
|
||||
RedLight(false);
|
||||
YellowLight(false);
|
||||
//绿灯
|
||||
GreenLight(true);
|
||||
|
||||
|
||||
LogAsync(DateTime.Now, LogLevel.Information, $"启用心跳-状态复位-关闭定位-写入流程加载点位配置-计数清零-停止转盘-转盘使能");
|
||||
//开启入料监听
|
||||
MonitorPieces();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void StartProcess()
|
||||
{
|
||||
//状态复位
|
||||
StatusReset();
|
||||
// LogAsync(DateTime.Now, LogLevel.Information, $"状态复位");
|
||||
// LogAsync(DateTime.Now, LogLevel.Information, $"状态复位");
|
||||
//关闭定位
|
||||
VisionPos(false);
|
||||
// LogAsync(DateTime.Now, LogLevel.Information, $"关闭定位");
|
||||
// LogAsync(DateTime.Now, LogLevel.Information, $"关闭定位");
|
||||
//写入流程启动点位配置
|
||||
StartProcessAction();
|
||||
// LogAsync(DateTime.Now, LogLevel.Information, $"写入流程加载点位配置");
|
||||
//计数清零
|
||||
CountToZero();
|
||||
LogAsync(DateTime.Now, LogLevel.Information, $"状态复位-关闭定位-写入流程加载点位配置-计数清零");
|
||||
PLCItem? pLCItem = ConfigModel.GlobalList?
|
||||
.FirstOrDefault()?
|
||||
.StartProcessList?
|
||||
.Where(it => it.Name == "挡料电机回原点速度").FirstOrDefault();
|
||||
if (pLCItem == null)
|
||||
{
|
||||
throw new Exception($"未找到挡料电机回原点速度地址,请检查该地址是否存在于点位表!");
|
||||
}
|
||||
PLCItem? pLCItem1 = ConfigModel.GlobalList?
|
||||
.FirstOrDefault()?
|
||||
.StartProcessList?
|
||||
.Where(it => it.Name == "挡料电机位置").FirstOrDefault();
|
||||
if (pLCItem1 == null)
|
||||
{
|
||||
throw new Exception($"未找到挡料电机位置地址,请检查该地址是否存在于点位表!");
|
||||
}
|
||||
FeedingMotor(true, Convert.ToInt32(pLCItem.Value), Convert.ToInt32(pLCItem1.Value));
|
||||
|
||||
|
||||
PLCItem? pLCItemmontor = ConfigModel.GlobalList?
|
||||
.FirstOrDefault()?
|
||||
.StartProcessList?
|
||||
.Where(it => it.Name == "相机步进速度").FirstOrDefault();
|
||||
if (pLCItemmontor == null)
|
||||
{
|
||||
throw new Exception($"未找到相机步进速度地址,请检查该地址是否存在于点位表!");
|
||||
}
|
||||
PLCItem? pLCItemmontor1 = ConfigModel.GlobalList?
|
||||
.FirstOrDefault()?
|
||||
.StartProcessList?
|
||||
.Where(it => it.Name == "相机步进位置").FirstOrDefault();
|
||||
if (pLCItemmontor1 == null)
|
||||
{
|
||||
throw new Exception($"未找到相机步进位置地址,请检查该地址是否存在于点位表!");
|
||||
}
|
||||
|
||||
Motor(true, Convert.ToInt32(pLCItemmontor.Value), Convert.ToInt32(pLCItemmontor1.Value));
|
||||
// if (_PLCConfig?.Enable == true)
|
||||
//挡料电机操作
|
||||
// _PLC.FeedingMotor(_PLCConfig.CunToZeroSpeed, _PLCConfig.CunPos, _PLCConfig.CunSpeed, _PLCConfig.CunDirection);
|
||||
|
||||
//流程开启操作配置
|
||||
// ProcessInitialAction();
|
||||
// if (_PLC?Enabled == true)
|
||||
|
||||
|
||||
|
||||
// LogAsync(DateTime.Now, LogLevel.Information, $"写入流程加载点位配置");
|
||||
|
||||
bool? enableBelt = ConfigModel.GlobalList?.FirstOrDefault()?.EnableBelt;
|
||||
if (enableBelt == true)
|
||||
{
|
||||
Belt(true);
|
||||
}
|
||||
Thread.Sleep(1000);
|
||||
bool? enableVibrator = ConfigModel.GlobalList?.FirstOrDefault()?.EnableVibrator;
|
||||
if (enableVibrator == true)
|
||||
{
|
||||
Vibrator(true);
|
||||
}
|
||||
Thread.Sleep(1000);
|
||||
//转盘使能
|
||||
TurnEnable(true);
|
||||
//转盘启动
|
||||
TurnStart(true);
|
||||
Thread.Sleep(1000);
|
||||
//计数清零
|
||||
CountToZero();
|
||||
Thread.Sleep(1000);
|
||||
|
||||
LogAsync(DateTime.Now, LogLevel.Information, $"状态复位-关闭定位-写入流程加载点位配置-计数清零");
|
||||
|
||||
Thread.Sleep(200);
|
||||
}
|
||||
|
||||
public void StopProcess()
|
||||
{
|
||||
StatusReset();
|
||||
VisionPos(false);
|
||||
CountToZero();
|
||||
bool? enableVibrator = ConfigModel.GlobalList?.FirstOrDefault()?.EnableVibrator;
|
||||
if (enableVibrator == true)
|
||||
{
|
||||
Vibrator(true);
|
||||
}
|
||||
Thread.Sleep(1000);
|
||||
bool? enableBelt = ConfigModel.GlobalList?.FirstOrDefault()?.EnableBelt;
|
||||
if (enableBelt == true)
|
||||
{
|
||||
Belt(false);
|
||||
}
|
||||
Thread.Sleep(1000);
|
||||
StopProcessAction();
|
||||
TurnStart(false);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public async Task ExecuteClearDelayAsync()
|
||||
{
|
||||
int? clearTime = ConfigModel.GlobalList?.FirstOrDefault()?.ClearTime;
|
||||
if (clearTime != null)
|
||||
{
|
||||
TurnClear(true);
|
||||
await Task.Delay(clearTime.Value * 1000);
|
||||
TurnClear(false);
|
||||
}
|
||||
}
|
||||
public void CloseProcess()
|
||||
{
|
||||
StatusReset();
|
||||
@ -750,9 +911,14 @@ namespace DH.Devices.PLC
|
||||
CountToZero();
|
||||
TurnStart(false);
|
||||
TurnEnable(false);
|
||||
StopProcessAction();
|
||||
TurnClear(false);
|
||||
OpenHeartbeat(false);
|
||||
GreenLight(false);
|
||||
YellowLight(false);
|
||||
RedLight(true);
|
||||
PLCDisConnect();
|
||||
// LogAsync(DateTime.Now, LogLevel.Information, $"PLC断开连接");
|
||||
// LogAsync(DateTime.Now, LogLevel.Information, $"PLC断开连接");
|
||||
}
|
||||
public void InitProcessAction() =>
|
||||
ProcessAction(ConfigModel.GlobalList?.FirstOrDefault()?.InitProcessList?.ToList() ?? new List<PLCItem>());
|
||||
@ -815,6 +981,32 @@ namespace DH.Devices.PLC
|
||||
WriteBool(pLCItem.Address, b);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 转盘方向
|
||||
/// </summary>
|
||||
/// <param name="b"></param>
|
||||
public void TurnDirection(bool b)
|
||||
{
|
||||
PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "转盘方向");
|
||||
if (pLCItem == null)
|
||||
return;
|
||||
WriteBool(pLCItem.Address, b);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 转盘速度
|
||||
/// </summary>
|
||||
/// <param name="b"></param>
|
||||
public void TurnSpeed(int speed)
|
||||
{
|
||||
PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "转盘速度");
|
||||
if (pLCItem == null)
|
||||
return;
|
||||
WriteUInt16(pLCItem.Address, (ushort)speed);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 转盘启停
|
||||
/// </summary>
|
||||
@ -824,7 +1016,6 @@ namespace DH.Devices.PLC
|
||||
if (DiskRunItem == null)
|
||||
return;
|
||||
WriteBool(DiskRunItem.Address, b);
|
||||
Thread.Sleep(30);
|
||||
piecesCount = 0;
|
||||
}
|
||||
|
||||
@ -890,102 +1081,200 @@ namespace DH.Devices.PLC
|
||||
Thread.Sleep(30);
|
||||
}
|
||||
|
||||
public void Belt(bool b)
|
||||
{
|
||||
PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "皮带");
|
||||
if (pLCItem == null)
|
||||
return;
|
||||
WriteBool(pLCItem.Address, b);
|
||||
Thread.Sleep(30);
|
||||
|
||||
}
|
||||
public void Vibrator(bool b)
|
||||
{
|
||||
PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "振动盘");
|
||||
if (pLCItem == null)
|
||||
return;
|
||||
WriteBool(pLCItem.Address, b);
|
||||
Thread.Sleep(30);
|
||||
|
||||
}
|
||||
public void Motor(bool direction, int speed, int pos)
|
||||
{
|
||||
|
||||
|
||||
int timeout = 60000;
|
||||
int elapsedTime = 0;
|
||||
int checkInterval = 100;
|
||||
MotorToZero(false);
|
||||
Thread.Sleep(300);
|
||||
|
||||
MotorClockwise(false);
|
||||
Thread.Sleep(300);
|
||||
MotorCounterclockwise(false);
|
||||
Thread.Sleep(300);
|
||||
|
||||
MotorSpeed(speed); // 速度
|
||||
Thread.Sleep(300);
|
||||
// 发送回原点指令
|
||||
MotorToZero(true);
|
||||
Thread.Sleep(1000); // 给设备一些时间响应
|
||||
|
||||
|
||||
|
||||
// 等待回到原点
|
||||
while (true)
|
||||
{
|
||||
if (elapsedTime >= timeout)
|
||||
{
|
||||
LogAsync(DateTime.Now, LogLevel.Error, $"超时");
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (ReadMotorRealPos() == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
Thread.Sleep(checkInterval);
|
||||
elapsedTime += checkInterval;
|
||||
}
|
||||
|
||||
MotorToZero(false);
|
||||
Thread.Sleep(200);
|
||||
MotorClockwise(false);
|
||||
Thread.Sleep(200);
|
||||
MotorCounterclockwise(false);
|
||||
// 无论是刚回到原点还是已经在原点,执行目标位置、速度和方向设置
|
||||
// MotorSpeed(speed);
|
||||
|
||||
Thread.Sleep(300);
|
||||
MotorPos(pos); // 目标位置
|
||||
Thread.Sleep(300);
|
||||
if (direction)
|
||||
{
|
||||
MotorClockwise(true); // 顺时针转动
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
MotorCounterclockwise(true); // 逆时针转动
|
||||
|
||||
}
|
||||
|
||||
|
||||
int timeout1 = 60000;
|
||||
int elapsedTime1 = 0;
|
||||
int checkInterval1 = 100;
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (elapsedTime1 >= timeout1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (ReadMotorRealPos() == pos)
|
||||
{
|
||||
break;
|
||||
}
|
||||
Thread.Sleep(checkInterval1);
|
||||
elapsedTime1 += checkInterval1;
|
||||
}
|
||||
Thread.Sleep(1500);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 挡料电机操作
|
||||
/// true: 顺时针
|
||||
/// False: 逆时针
|
||||
/// </summary>
|
||||
/// <param name="u"></param>
|
||||
public void FeedingMotor( bool direction)
|
||||
public void FeedingMotor(bool direction, int speed, int pos)
|
||||
{
|
||||
|
||||
|
||||
// 设置最大等待时间,假设为 3 秒
|
||||
int timeout = 3000;
|
||||
int timeout = 10000;
|
||||
int elapsedTime = 0;
|
||||
int checkInterval = 100; // 每次检查等待 100ms
|
||||
|
||||
PLCItem pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "挡料电机回原点");
|
||||
if (pLCItem == null)
|
||||
return;
|
||||
PLCItem zerospeeditem = PLCItemList.FirstOrDefault(u => u.Name == "挡料电机回原点速度");
|
||||
if (zerospeeditem == null)
|
||||
return;
|
||||
|
||||
PLCItem CunSpeed = PLCItemList.FirstOrDefault(u => u.Name == "挡料电机速度");
|
||||
if (CunSpeed == null)
|
||||
return;
|
||||
|
||||
PLCItem CunClockwiseItem = PLCItemList.FirstOrDefault(u => u.Name == "挡料电机顺时针");
|
||||
if (CunClockwiseItem == null)
|
||||
return;
|
||||
|
||||
PLCItem CunCounterclockwiseItem = PLCItemList.FirstOrDefault(u => u.Name == "挡料电机逆时针");
|
||||
if (CunCounterclockwiseItem == null)
|
||||
return;
|
||||
|
||||
PLCItem CunPosItem = PLCItemList.FirstOrDefault(u => u.Name == "挡料电机位置");
|
||||
if (CunPosItem == null)
|
||||
return;
|
||||
|
||||
string CunToZero = pLCItem.Type + pLCItem.Address;
|
||||
string CunToZeroSpeed = zerospeeditem.Type + zerospeeditem.Address;
|
||||
string CunSpeedadress = CunSpeed.Type + CunSpeed.Address;
|
||||
string CunClockwise = CunClockwiseItem.Type + CunClockwiseItem.Address;
|
||||
string CunCounterclockwise = CunCounterclockwiseItem.Type + CunCounterclockwiseItem.Address;
|
||||
string CunPos = CunPosItem.Type + CunPosItem.Address;
|
||||
UInt16 zerospeed = UInt16.Parse(zerospeeditem.Value);
|
||||
UInt16 cunSpeed = UInt16.Parse(CunSpeed.Value);
|
||||
UInt16 u = UInt16.Parse(CunPosItem.Value);
|
||||
// WriteBool(CountToZero, true);
|
||||
int checkInterval = 100;
|
||||
|
||||
BarrierToZero(false);
|
||||
Thread.Sleep(300);
|
||||
// 检查是否不在原点,如果不在,则回原点
|
||||
if (!ReadBool(CunToZero))
|
||||
BarrierClockwise(false);
|
||||
Thread.Sleep(300);
|
||||
BarrierCounterclockwise(false);
|
||||
Thread.Sleep(300);
|
||||
BarrierToZeroSpeed(speed); // 速度
|
||||
Thread.Sleep(300);
|
||||
// 发送回原点指令
|
||||
BarrierToZero(true);
|
||||
Thread.Sleep(300); // 给设备一些时间响应
|
||||
|
||||
// 等待回到原点
|
||||
while (true)
|
||||
{
|
||||
WriteUInt16(CunToZeroSpeed, zerospeed); // 速度
|
||||
Thread.Sleep(30);
|
||||
// 发送回原点指令
|
||||
WriteBool(CunToZero, true);
|
||||
Thread.Sleep(1000); // 给设备一些时间响应
|
||||
|
||||
// 等待回到原点
|
||||
while (!ReadBool(CunToZero))
|
||||
if (elapsedTime >= timeout)
|
||||
{
|
||||
if (elapsedTime >= timeout)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
Thread.Sleep(checkInterval);
|
||||
elapsedTime += checkInterval;
|
||||
break;
|
||||
}
|
||||
|
||||
if (ReadBarrierRealPos() == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
Thread.Sleep(checkInterval);
|
||||
elapsedTime += checkInterval;
|
||||
}
|
||||
|
||||
BarrierToZero(false);
|
||||
Thread.Sleep(300);
|
||||
// 检查是否不在原点,如果不在,则回原点
|
||||
BarrierClockwise(false);
|
||||
Thread.Sleep(300);
|
||||
BarrierCounterclockwise(false);
|
||||
Thread.Sleep(300);
|
||||
// 无论是刚回到原点还是已经在原点,执行目标位置、速度和方向设置
|
||||
BarrierSpeed(speed);
|
||||
Thread.Sleep(300);
|
||||
|
||||
|
||||
|
||||
WriteUInt16(CunSpeedadress,cunSpeed);
|
||||
Thread.Sleep(2000);
|
||||
string dir = string.Empty;
|
||||
if (direction)
|
||||
{
|
||||
WriteBool(CunClockwise, true); // 顺时针转动
|
||||
dir = "顺时针";
|
||||
BarrierClockwise(true); // 顺时针转动
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteBool(CunCounterclockwise, true); // 逆时针转动
|
||||
dir = "逆时针";
|
||||
BarrierCounterclockwise(true); // 逆时针转动
|
||||
|
||||
}
|
||||
Thread.Sleep(30);
|
||||
WriteUInt16(CunPos, u); // 目标位置
|
||||
Thread.Sleep(2000);
|
||||
|
||||
Thread.Sleep(300);
|
||||
BarrierPos(pos); // 目标位置
|
||||
Thread.Sleep(300);
|
||||
int timeout1 = 10000;
|
||||
int elapsedTime1 = 0;
|
||||
int checkInterval1 = 100;
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (elapsedTime1 >= timeout1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (ReadBarrierRealPos() == pos)
|
||||
{
|
||||
break;
|
||||
}
|
||||
Thread.Sleep(checkInterval1);
|
||||
elapsedTime1 += checkInterval1;
|
||||
}
|
||||
Thread.Sleep(300);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 转盘清料
|
||||
/// </summary>
|
||||
@ -1013,7 +1302,8 @@ namespace DH.Devices.PLC
|
||||
if (b)
|
||||
{
|
||||
//开启心跳
|
||||
Task.Run(async () => await HeartbeatAsync1());
|
||||
//Task.Run(async () => await HeartbeatAsync1());
|
||||
_taskFac.StartNew(async () => await HeartbeatAsync1());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1026,6 +1316,241 @@ namespace DH.Devices.PLC
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 读取定位脉冲
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
|
||||
public int ReadVisionPos()
|
||||
{
|
||||
PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "定位完成脉冲值");
|
||||
if (pLCItem == null)
|
||||
return 0;
|
||||
int value = ReadInt32(pLCItem.Address);
|
||||
Thread.Sleep(100);
|
||||
return Math.Abs(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 挡杆回原点
|
||||
/// </summary>
|
||||
public void BarrierToZero(bool b)
|
||||
{
|
||||
PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "挡料电机回原点");
|
||||
if (pLCItem == null)
|
||||
return;
|
||||
WriteBool(pLCItem.Address, b);
|
||||
}
|
||||
/// <summary>
|
||||
/// 变焦相机回原点
|
||||
/// </summary>
|
||||
public void ZoomcameraToZero(bool b)
|
||||
{
|
||||
PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "步进电机回原点");
|
||||
if (pLCItem == null)
|
||||
return;
|
||||
WriteBool(pLCItem.Address, b);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 读取挡料电机实时位置
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int ReadBarrierRealPos()
|
||||
{
|
||||
PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "挡料电机实时位置");
|
||||
if (pLCItem == null)
|
||||
{
|
||||
throw new Exception("未找到挡料电机实时位置点位");
|
||||
}
|
||||
|
||||
return ReadInt16(pLCItem.Address);
|
||||
}
|
||||
/// <summary>
|
||||
/// 读取 挡杆回原点状态
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="Exception"></exception>
|
||||
|
||||
public bool ReadBarrierToZero()
|
||||
{
|
||||
//PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "挡料电机回原点");
|
||||
//if (pLCItem == null)
|
||||
//{
|
||||
// throw new Exception("未找到挡料电机回原点点位");
|
||||
//}
|
||||
//挡料电机传感器感应点
|
||||
return ReadBool("X11");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 挡杆回原点速度
|
||||
/// </summary>
|
||||
public void BarrierToZeroSpeed(int speed)
|
||||
{
|
||||
PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "挡料电机回原点速度");
|
||||
if (pLCItem == null)
|
||||
return;
|
||||
WriteInt32(pLCItem.Address, speed);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 挡杆位置
|
||||
/// </summary>
|
||||
public void BarrierPos(int value)
|
||||
{
|
||||
PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "挡料电机位置");
|
||||
if (pLCItem == null)
|
||||
return;
|
||||
WriteInt16(pLCItem.Address, (short)value);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 挡杆速度
|
||||
/// </summary>
|
||||
public void BarrierSpeed(int value)
|
||||
{
|
||||
PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "挡料电机速度");
|
||||
if (pLCItem == null)
|
||||
return;
|
||||
WriteUInt32(pLCItem.Address, (uint)value);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 挡杆顺时针
|
||||
/// </summary>
|
||||
public void BarrierClockwise(bool b)
|
||||
{
|
||||
PLCItem? DiskRunItem = PLCItemList.FirstOrDefault(u => u.Name == "挡料电机顺时针");
|
||||
if (DiskRunItem == null)
|
||||
return;
|
||||
WriteBool(DiskRunItem.Address, b);
|
||||
Thread.Sleep(30);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 挡杆逆时针
|
||||
/// </summary>
|
||||
public void BarrierCounterclockwise(bool b)
|
||||
{
|
||||
PLCItem? DiskRunItem = PLCItemList.FirstOrDefault(u => u.Name == "挡料电机逆时针");
|
||||
if (DiskRunItem == null)
|
||||
return;
|
||||
WriteBool(DiskRunItem.Address, b);
|
||||
Thread.Sleep(30);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 相机步进电机回原点
|
||||
/// </summary>
|
||||
/// <param name="b"></param>
|
||||
public void MotorToZero(bool b)
|
||||
{
|
||||
PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "相机步进原点");
|
||||
if (pLCItem == null)
|
||||
return;
|
||||
WriteBool(pLCItem.Address, b);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 读取相机步进电机回原点状态
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="Exception"></exception>
|
||||
public bool ReadMotorToZero()
|
||||
{
|
||||
//PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "相机步进原点");
|
||||
//if (pLCItem == null)
|
||||
//{
|
||||
// throw new Exception("未找到挡料电机回原点点位");
|
||||
//}
|
||||
//return ReadBool(pLCItem.Address);
|
||||
return ReadBool("X10");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 相机步进电机位置
|
||||
/// </summary>
|
||||
/// <param></param>
|
||||
public void MotorPos(int value)
|
||||
{
|
||||
PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "相机步进位置");
|
||||
if (pLCItem == null)
|
||||
return;
|
||||
WriteInt32(pLCItem.Address, (ushort)value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public int ReadMotorRealPos()
|
||||
{
|
||||
PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "相机步进实时位置");
|
||||
if (pLCItem == null)
|
||||
{
|
||||
throw new Exception("未找到相机步进实时位置");
|
||||
}
|
||||
return ReadInt32(pLCItem.Address);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 相机步进电机速度
|
||||
/// </summary>
|
||||
/// <param name="b"></param>
|
||||
public void MotorSpeed(int speed)
|
||||
{
|
||||
PLCItem? pLCItem = PLCItemList.FirstOrDefault(u => u.Name == "相机步进速度");
|
||||
if (pLCItem == null)
|
||||
return;
|
||||
WriteInt32(pLCItem.Address, speed);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 相机步进顺时针
|
||||
/// </summary>
|
||||
public void MotorClockwise(bool b)
|
||||
{
|
||||
PLCItem? DiskRunItem = PLCItemList.FirstOrDefault(u => u.Name == "相机步进顺时针");
|
||||
if (DiskRunItem == null)
|
||||
return;
|
||||
WriteBool(DiskRunItem.Address, b);
|
||||
Thread.Sleep(30);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 相机步进逆时针
|
||||
/// </summary>
|
||||
public void MotorCounterclockwise(bool b)
|
||||
{
|
||||
PLCItem? DiskRunItem = PLCItemList.FirstOrDefault(u => u.Name == "相机步进逆时针");
|
||||
if (DiskRunItem == null)
|
||||
return;
|
||||
WriteBool(DiskRunItem.Address, b);
|
||||
Thread.Sleep(30);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 相机步进点动
|
||||
/// </summary>
|
||||
public void MotorTest(bool b)
|
||||
{
|
||||
PLCItem? DiskRunItem = PLCItemList.FirstOrDefault(u => u.Name == "点动相机步进");
|
||||
if (DiskRunItem == null)
|
||||
return;
|
||||
WriteBool(DiskRunItem.Address, b);
|
||||
Thread.Sleep(30);
|
||||
}
|
||||
|
||||
public void LogAsync(LogMsg msg)
|
||||
{
|
||||
msg.MsgSource = "PLC";
|
||||
|
@ -32,6 +32,10 @@ namespace DH.Devices.Vision
|
||||
bool res = false;
|
||||
try
|
||||
{
|
||||
if (!Path.GetExtension(mLInit.ModelFile).Equals(".trt", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
throw new Exception("选择的模型不是trt格式");
|
||||
}
|
||||
Model = MLGPUEngine.InitModel(mLInit.ModelFile, 1, mLInit.Score_thre, mLInit.GPUId, 3, 8);
|
||||
|
||||
//Model = MLEngine.InitModel(mLInit.ModelFile, 1, 0.45f, 0, 3);
|
||||
@ -233,15 +237,15 @@ namespace DH.Devices.Vision
|
||||
{
|
||||
|
||||
originMat?.Dispose();
|
||||
#pragma warning disable CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
||||
#pragma warning disable CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型
|
||||
originMat = null;
|
||||
#pragma warning restore CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
||||
#pragma warning restore CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型
|
||||
//maskMat?.Dispose();
|
||||
// maskMat = null;
|
||||
detectMat?.Dispose();
|
||||
#pragma warning disable CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
||||
#pragma warning disable CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型
|
||||
detectMat = null;
|
||||
#pragma warning restore CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
||||
#pragma warning restore CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型
|
||||
// maskWeighted?.Dispose();
|
||||
// maskWeighted = null;
|
||||
// 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]}]}";
|
||||
//
|
||||
Console.WriteLine("检测结果JSON:" + json);
|
||||
#pragma warning disable CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
||||
#pragma warning disable CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型
|
||||
SegResult detResult = JsonConvert.DeserializeObject<SegResult>(json);
|
||||
#pragma warning restore CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
||||
#pragma warning restore CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型
|
||||
if (detResult == null)
|
||||
{
|
||||
return;
|
||||
@ -259,9 +259,9 @@ namespace DH.Devices.Vision
|
||||
{
|
||||
|
||||
originMat?.Dispose();
|
||||
#pragma warning disable CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
||||
#pragma warning disable CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型
|
||||
originMat = null;
|
||||
#pragma warning restore CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
||||
#pragma warning restore CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型
|
||||
|
||||
|
||||
// GC.Collect();
|
||||
|
@ -32,13 +32,21 @@ namespace DH.Devices.Vision
|
||||
|
||||
public void Init()
|
||||
{
|
||||
//InitialQueue();
|
||||
InitialHalconTools();
|
||||
InitialSimboMLEnginesAsync();
|
||||
try
|
||||
{
|
||||
//InitialQueue();
|
||||
InitialHalconTools();
|
||||
InitialSimboMLEnginesAsync();
|
||||
|
||||
// ImageSaveHelper.OnImageSaveExceptionRaised -= ImageSaveHelper_OnImageSaveExceptionRaised;
|
||||
// ImageSaveHelper.OnImageSaveExceptionRaised += ImageSaveHelper_OnImageSaveExceptionRaised;
|
||||
// base.Init();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception(ex.Message);
|
||||
}
|
||||
|
||||
// ImageSaveHelper.OnImageSaveExceptionRaised -= ImageSaveHelper_OnImageSaveExceptionRaised;
|
||||
// ImageSaveHelper.OnImageSaveExceptionRaised += ImageSaveHelper_OnImageSaveExceptionRaised;
|
||||
// base.Init();
|
||||
}
|
||||
public void Stop()
|
||||
{
|
||||
@ -292,9 +300,16 @@ namespace DH.Devices.Vision
|
||||
/// </summary>
|
||||
private bool InitialSimboMLEnginesAsync()
|
||||
{
|
||||
//深度学习 模型加载
|
||||
var resultOK = MLLoadModel();
|
||||
return resultOK;
|
||||
try
|
||||
{
|
||||
//深度学习 模型加载
|
||||
var resultOK = MLLoadModel();
|
||||
return resultOK;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception(ex.Message);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 深度学习 模型加载
|
||||
@ -358,6 +373,7 @@ namespace DH.Devices.Vision
|
||||
{
|
||||
// LogAsync(DateTime.Now, LogLevel.Exception, $"异常:模型并发加载异常:{ex.GetExceptionMessage()}");
|
||||
resultOK = false;
|
||||
throw new Exception(ex.Message);
|
||||
}
|
||||
|
||||
return resultOK;
|
||||
@ -409,7 +425,7 @@ namespace DH.Devices.Vision
|
||||
}
|
||||
MLInit mLInit;
|
||||
string inferenceDevice = "CPU";
|
||||
if (dc.IsEnableGPU)
|
||||
if (dc.ModelType== ModelType.目标检测GPU)
|
||||
{
|
||||
inferenceDevice = "GPU";
|
||||
mLInit = new MLInit(dc.ModelPath, isGPU, coreInx, dc.ModelconfThreshold);
|
||||
@ -432,7 +448,7 @@ namespace DH.Devices.Vision
|
||||
{
|
||||
// LogAsync(DateTime.Now, LogLevel.Error, $"模型加载成功;是否GPU:{isGPU} CoreInx:{coreInx} - {dc.Name}" + $" {dc.ModelType.GetEnumDescription()}:{dc.ModelPath}");
|
||||
|
||||
throw new ProcessException($"异常:是否GPU:{isGPU} CoreInx:{coreInx} - {dc.Name}模型加载异常:{ex.GetExceptionMessage()}");
|
||||
throw new Exception($"异常:是否GPU:{isGPU} CoreInx:{coreInx} - {dc.Name}模型加载异常:{ex.Message}");
|
||||
}
|
||||
return mLEngineSet;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ namespace DH.Devices.Vision
|
||||
// "rect": [421, 823, 6, 8]
|
||||
// }]
|
||||
//}
|
||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
||||
|
||||
public List<Result> HYolo;
|
||||
|
||||
public class Result
|
||||
@ -67,12 +67,12 @@ namespace DH.Devices.Vision
|
||||
|
||||
public double fScore;
|
||||
public int classId;
|
||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
||||
|
||||
public string classname;
|
||||
|
||||
|
||||
//public double area;
|
||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
||||
|
||||
public List<int> rect;
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ namespace DH.Devices.Vision
|
||||
}
|
||||
public class SegResult
|
||||
{
|
||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
||||
|
||||
public List<Result> SegmentResult;
|
||||
|
||||
public class Result
|
||||
@ -90,12 +90,12 @@ namespace DH.Devices.Vision
|
||||
|
||||
public double fScore;
|
||||
public int classId;
|
||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
||||
|
||||
public string classname;
|
||||
|
||||
|
||||
public double area;
|
||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
||||
|
||||
public List<int> rect;
|
||||
|
||||
|
||||
|
@ -22,18 +22,18 @@ namespace DH.Devices.Vision
|
||||
/// <summary>
|
||||
/// 检测配置ID
|
||||
/// </summary>
|
||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
||||
|
||||
public string DetectionId { get; set; }
|
||||
|
||||
|
||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
||||
|
||||
public string DetectionName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 深度学习模型
|
||||
/// </summary>
|
||||
#pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
|
||||
|
||||
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
|
||||
}
|
||||
}
|
@ -109,9 +109,6 @@
|
||||
<Compile Include="Views\Sys\User\UserPage.cs" />
|
||||
<Compile Include="Views\Sys\User\UserPage.Designer.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="favicon.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AntdUI" Version="1.8.9" />
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB |
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
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
|
@ -923,9 +923,9 @@ namespace DH.UI.Model.Winform
|
||||
|
||||
#region Dispose
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
|
@ -3,14 +3,14 @@
|
||||
partial class IOIndicatorCtrl
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
|
@ -864,30 +864,30 @@ namespace DH.UI.Model.Winform
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
// 释放托管状态(托管对象)。
|
||||
// 释放托管状态(托管对象)
|
||||
Pen?.Dispose();
|
||||
}
|
||||
|
||||
// TODO: 释放未托管的资源(未托管的对象)并在以下内容中替代终结器。
|
||||
// TODO: 将大型字段设置为 null。
|
||||
// TODO: 释放未托管的资源(未托管的对象)并在以下内容中替代终结器
|
||||
// TODO: 将大型字段设置为 null
|
||||
|
||||
disposedValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: 仅当以上 Dispose(bool disposing) 拥有用于释放未托管资源的代码时才替代终结器。
|
||||
// TODO: 仅当以上 Dispose(bool disposing) 拥有用于释放未托管资源的代码时才替代终结器
|
||||
// ~ElementBase()
|
||||
// {
|
||||
// // 请勿更改此代码。将清理代码放入以上 Dispose(bool disposing) 中。
|
||||
// // 请勿更改此代码 将清理代码放入以上 Dispose(bool disposing) 中
|
||||
// Dispose(false);
|
||||
// }
|
||||
|
||||
// 添加此代码以正确实现可处置模式。
|
||||
// 添加此代码以正确实现可处置模式
|
||||
public void Dispose()
|
||||
{
|
||||
// 请勿更改此代码。将清理代码放入以上 Dispose(bool disposing) 中。
|
||||
// 请勿更改此代码 将清理代码放入以上 Dispose(bool disposing) 中
|
||||
Dispose(true);
|
||||
// TODO: 如果在以上内容中替代了终结器,则取消注释以下行。
|
||||
// TODO: 如果在以上内容中替代了终结器,则取消注释以下行
|
||||
// GC.SuppressFinalize(this);
|
||||
}
|
||||
#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
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
|
@ -10,6 +10,7 @@
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<ApplicationIcon>assets\logo.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@ -18,7 +19,12 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="assets\logo.ico" />
|
||||
<Content Include="assets\screenshots\favicon.ico" />
|
||||
<Content Include="db\config.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
@ -37,6 +43,26 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AntdUI" Version="1.8.9" />
|
||||
@ -68,10 +94,13 @@
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="db\db.sqlite">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="assets\favicon.ico" />
|
||||
<None Include="db\db.sqlite">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<!-- 仅在首次生成时复制 -->
|
||||
<Condition>!Exists('$(OutputPath)\db\db.sqlite')</Condition>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
3
DHSoftware/LoginWindow.Designer.cs
generated
3
DHSoftware/LoginWindow.Designer.cs
generated
@ -53,6 +53,7 @@
|
||||
iptName.PlaceholderText = "请输入用户名";
|
||||
iptName.Size = new Size(227, 37);
|
||||
iptName.TabIndex = 1;
|
||||
iptName.Text = "user";
|
||||
//
|
||||
// iptPwd
|
||||
//
|
||||
@ -62,6 +63,7 @@
|
||||
iptPwd.PlaceholderText = "请输入密码";
|
||||
iptPwd.Size = new Size(227, 37);
|
||||
iptPwd.TabIndex = 2;
|
||||
iptPwd.Text = "123";
|
||||
iptPwd.UseSystemPasswordChar = true;
|
||||
//
|
||||
// button_cancel
|
||||
@ -101,7 +103,6 @@
|
||||
Name = "LoginWindow";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "登录界面";
|
||||
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
200
DHSoftware/MainWindow.Designer.cs
generated
200
DHSoftware/MainWindow.Designer.cs
generated
@ -28,14 +28,15 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AntdUI.Tabs.StyleLine styleLine2 = new AntdUI.Tabs.StyleLine();
|
||||
AntdUI.Tabs.StyleCard styleCard2 = new AntdUI.Tabs.StyleCard();
|
||||
AntdUI.SegmentedItem segmentedItem6 = new AntdUI.SegmentedItem();
|
||||
AntdUI.Tabs.StyleLine styleLine1 = new AntdUI.Tabs.StyleLine();
|
||||
AntdUI.Tabs.StyleCard styleCard1 = new AntdUI.Tabs.StyleCard();
|
||||
AntdUI.SegmentedItem segmentedItem1 = new AntdUI.SegmentedItem();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow));
|
||||
AntdUI.SegmentedItem segmentedItem7 = new AntdUI.SegmentedItem();
|
||||
AntdUI.SegmentedItem segmentedItem8 = new AntdUI.SegmentedItem();
|
||||
AntdUI.SegmentedItem segmentedItem9 = new AntdUI.SegmentedItem();
|
||||
AntdUI.SegmentedItem segmentedItem10 = new AntdUI.SegmentedItem();
|
||||
AntdUI.SegmentedItem segmentedItem2 = new AntdUI.SegmentedItem();
|
||||
AntdUI.SegmentedItem segmentedItem3 = new AntdUI.SegmentedItem();
|
||||
AntdUI.SegmentedItem segmentedItem4 = new AntdUI.SegmentedItem();
|
||||
AntdUI.SegmentedItem segmentedItem5 = new AntdUI.SegmentedItem();
|
||||
AntdUI.SegmentedItem segmentedItem6 = new AntdUI.SegmentedItem();
|
||||
titlebar = new AntdUI.PageHeader();
|
||||
lbName = new AntdUI.Label();
|
||||
tabsStas = new AntdUI.Tabs();
|
||||
@ -52,7 +53,6 @@
|
||||
dgvCamreaNums = new DataGridView();
|
||||
panelNums = new AntdUI.Panel();
|
||||
tableLayoutNums = new TableLayoutPanel();
|
||||
dgvProductNums = new DataGridView();
|
||||
tableLayoutPanel3 = new TableLayoutPanel();
|
||||
lblTotalTime = new Label();
|
||||
label1 = new Label();
|
||||
@ -62,8 +62,10 @@
|
||||
lblOEE_Total = new Label();
|
||||
label10 = new Label();
|
||||
label7 = new Label();
|
||||
tagMachineStatus = new AntdUI.Tag();
|
||||
panel2 = new AntdUI.Panel();
|
||||
panel1 = new AntdUI.Panel();
|
||||
segmented2 = new AntdUI.Segmented();
|
||||
panel3 = new AntdUI.Panel();
|
||||
textBoxBatchNO = new AntdUI.Input();
|
||||
btnCreateBatchNO = new AntdUI.Button();
|
||||
@ -92,7 +94,6 @@
|
||||
((System.ComponentModel.ISupportInitialize)dgvCamreaNums).BeginInit();
|
||||
panelNums.SuspendLayout();
|
||||
tableLayoutNums.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dgvProductNums).BeginInit();
|
||||
tableLayoutPanel3.SuspendLayout();
|
||||
panel1.SuspendLayout();
|
||||
panel3.SuspendLayout();
|
||||
@ -136,7 +137,7 @@
|
||||
tabsStas.Name = "tabsStas";
|
||||
tabsStas.Pages.Add(tabPage3);
|
||||
tabsStas.Size = new Size(580, 176);
|
||||
tabsStas.Style = styleLine2;
|
||||
tabsStas.Style = styleLine1;
|
||||
tabsStas.TabIndex = 3;
|
||||
tabsStas.Text = "tabs3";
|
||||
//
|
||||
@ -201,7 +202,7 @@
|
||||
tabImgDisplay.Location = new Point(0, 0);
|
||||
tabImgDisplay.Name = "tabImgDisplay";
|
||||
tabImgDisplay.Size = new Size(1024, 400);
|
||||
tabImgDisplay.Style = styleCard2;
|
||||
tabImgDisplay.Style = styleCard1;
|
||||
tabImgDisplay.TabIndex = 3;
|
||||
tabImgDisplay.Text = "tabs1";
|
||||
//
|
||||
@ -294,8 +295,8 @@
|
||||
//
|
||||
tableLayoutNums.ColumnCount = 1;
|
||||
tableLayoutNums.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
|
||||
tableLayoutNums.Controls.Add(dgvProductNums, 0, 0);
|
||||
tableLayoutNums.Controls.Add(tableLayoutPanel3, 0, 1);
|
||||
tableLayoutNums.Controls.Add(tagMachineStatus, 0, 0);
|
||||
tableLayoutNums.Dock = DockStyle.Fill;
|
||||
tableLayoutNums.Location = new Point(0, 0);
|
||||
tableLayoutNums.Name = "tableLayoutNums";
|
||||
@ -306,31 +307,6 @@
|
||||
tableLayoutNums.Size = new Size(338, 101);
|
||||
tableLayoutNums.TabIndex = 8;
|
||||
//
|
||||
// dgvProductNums
|
||||
//
|
||||
dgvProductNums.AllowUserToAddRows = false;
|
||||
dgvProductNums.AllowUserToDeleteRows = false;
|
||||
dgvProductNums.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dgvProductNums.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
|
||||
dgvProductNums.BackgroundColor = SystemColors.Control;
|
||||
dgvProductNums.BorderStyle = BorderStyle.None;
|
||||
dgvProductNums.CellBorderStyle = DataGridViewCellBorderStyle.SunkenHorizontal;
|
||||
dgvProductNums.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.None;
|
||||
dgvProductNums.ColumnHeadersHeight = 4;
|
||||
dgvProductNums.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
|
||||
dgvProductNums.ColumnHeadersVisible = false;
|
||||
dgvProductNums.Dock = DockStyle.Fill;
|
||||
dgvProductNums.Location = new Point(3, 10);
|
||||
dgvProductNums.Margin = new Padding(3, 10, 3, 0);
|
||||
dgvProductNums.MultiSelect = false;
|
||||
dgvProductNums.Name = "dgvProductNums";
|
||||
dgvProductNums.ReadOnly = true;
|
||||
dgvProductNums.RowHeadersBorderStyle = DataGridViewHeaderBorderStyle.None;
|
||||
dgvProductNums.RowHeadersVisible = false;
|
||||
dgvProductNums.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dgvProductNums.Size = new Size(332, 40);
|
||||
dgvProductNums.TabIndex = 10;
|
||||
//
|
||||
// tableLayoutPanel3
|
||||
//
|
||||
tableLayoutPanel3.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
@ -445,6 +421,16 @@
|
||||
label7.Text = "总计数";
|
||||
label7.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// tagMachineStatus
|
||||
//
|
||||
tagMachineStatus.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
tagMachineStatus.Location = new Point(3, 3);
|
||||
tagMachineStatus.Name = "tagMachineStatus";
|
||||
tagMachineStatus.Size = new Size(141, 44);
|
||||
tagMachineStatus.TabIndex = 12;
|
||||
tagMachineStatus.Text = "待机中";
|
||||
tagMachineStatus.Type = AntdUI.TTypeMini.Primary;
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
panel2.Location = new Point(511, 86);
|
||||
@ -456,6 +442,7 @@
|
||||
// panel1
|
||||
//
|
||||
panel1.Back = Color.FromArgb(46, 108, 227);
|
||||
panel1.Controls.Add(segmented2);
|
||||
panel1.Controls.Add(panel3);
|
||||
panel1.Controls.Add(segmented1);
|
||||
panel1.Dock = DockStyle.Top;
|
||||
@ -467,6 +454,33 @@
|
||||
panel1.TabIndex = 0;
|
||||
panel1.Text = "panel1";
|
||||
//
|
||||
// segmented2
|
||||
//
|
||||
segmented2.BackActive = Color.FromArgb(100, 255, 87, 34);
|
||||
segmented2.BackColor = Color.Transparent;
|
||||
segmented2.Dock = DockStyle.Left;
|
||||
segmented2.Font = new Font("Microsoft YaHei UI", 9F);
|
||||
segmented2.ForeColor = Color.White;
|
||||
segmented2.Full = true;
|
||||
segmentedItem1.Badge = null;
|
||||
segmentedItem1.BadgeAlign = AntdUI.TAlignFrom.TR;
|
||||
segmentedItem1.BadgeBack = null;
|
||||
segmentedItem1.BadgeMode = false;
|
||||
segmentedItem1.BadgeOffsetX = 0;
|
||||
segmentedItem1.BadgeOffsetY = 0;
|
||||
segmentedItem1.BadgeSize = 0.6F;
|
||||
segmentedItem1.BadgeSvg = null;
|
||||
segmentedItem1.IconActiveSvg = resources.GetString("segmentedItem1.IconActiveSvg");
|
||||
segmentedItem1.IconSvg = resources.GetString("segmentedItem1.IconSvg");
|
||||
segmentedItem1.Text = "定位";
|
||||
segmented2.Items.Add(segmentedItem1);
|
||||
segmented2.Location = new Point(439, 0);
|
||||
segmented2.Name = "segmented2";
|
||||
segmented2.Size = new Size(96, 83);
|
||||
segmented2.TabIndex = 17;
|
||||
segmented2.Text = "segmented2";
|
||||
segmented2.SelectIndexChanged += segmented2_SelectIndexChanged;
|
||||
//
|
||||
// panel3
|
||||
//
|
||||
panel3.Back = Color.FromArgb(46, 108, 227);
|
||||
@ -477,13 +491,13 @@
|
||||
panel3.Controls.Add(btnLoadProject);
|
||||
panel3.Controls.Add(sltProjects);
|
||||
panel3.Dock = DockStyle.Right;
|
||||
panel3.Location = new Point(553, 0);
|
||||
panel3.Location = new Point(554, 0);
|
||||
panel3.Name = "panel3";
|
||||
panel3.Padding = new Padding(30);
|
||||
panel3.Radius = 0;
|
||||
panel3.ShadowOpacity = 0F;
|
||||
panel3.ShadowOpacityHover = 0F;
|
||||
panel3.Size = new Size(471, 83);
|
||||
panel3.Size = new Size(470, 83);
|
||||
panel3.TabIndex = 16;
|
||||
panel3.Text = "panel3";
|
||||
//
|
||||
@ -500,7 +514,7 @@
|
||||
btnCreateBatchNO.Name = "btnCreateBatchNO";
|
||||
btnCreateBatchNO.Size = new Size(72, 35);
|
||||
btnCreateBatchNO.TabIndex = 21;
|
||||
btnCreateBatchNO.Tag = "sys-load";
|
||||
btnCreateBatchNO.Tag = "";
|
||||
btnCreateBatchNO.Text = "生成批次";
|
||||
btnCreateBatchNO.Click += btnCreateBatchNO_Click;
|
||||
//
|
||||
@ -553,6 +567,50 @@
|
||||
segmented1.Font = new Font("Microsoft YaHei UI", 9F);
|
||||
segmented1.ForeColor = Color.White;
|
||||
segmented1.Full = true;
|
||||
segmentedItem2.Badge = null;
|
||||
segmentedItem2.BadgeAlign = AntdUI.TAlignFrom.TR;
|
||||
segmentedItem2.BadgeBack = null;
|
||||
segmentedItem2.BadgeMode = false;
|
||||
segmentedItem2.BadgeOffsetX = 0;
|
||||
segmentedItem2.BadgeOffsetY = 0;
|
||||
segmentedItem2.BadgeSize = 0.6F;
|
||||
segmentedItem2.BadgeSvg = null;
|
||||
segmentedItem2.IconActiveSvg = resources.GetString("segmentedItem2.IconActiveSvg");
|
||||
segmentedItem2.IconSvg = resources.GetString("segmentedItem2.IconSvg");
|
||||
segmentedItem2.Text = "启动";
|
||||
segmentedItem3.Badge = null;
|
||||
segmentedItem3.BadgeAlign = AntdUI.TAlignFrom.TR;
|
||||
segmentedItem3.BadgeBack = null;
|
||||
segmentedItem3.BadgeMode = false;
|
||||
segmentedItem3.BadgeOffsetX = 0;
|
||||
segmentedItem3.BadgeOffsetY = 0;
|
||||
segmentedItem3.BadgeSize = 0.6F;
|
||||
segmentedItem3.BadgeSvg = null;
|
||||
segmentedItem3.IconActiveSvg = resources.GetString("segmentedItem3.IconActiveSvg");
|
||||
segmentedItem3.IconSvg = resources.GetString("segmentedItem3.IconSvg");
|
||||
segmentedItem3.Text = "停止";
|
||||
segmentedItem4.Badge = null;
|
||||
segmentedItem4.BadgeAlign = AntdUI.TAlignFrom.TR;
|
||||
segmentedItem4.BadgeBack = null;
|
||||
segmentedItem4.BadgeMode = false;
|
||||
segmentedItem4.BadgeOffsetX = 0;
|
||||
segmentedItem4.BadgeOffsetY = 0;
|
||||
segmentedItem4.BadgeSize = 0.6F;
|
||||
segmentedItem4.BadgeSvg = null;
|
||||
segmentedItem4.IconActiveSvg = resources.GetString("segmentedItem4.IconActiveSvg");
|
||||
segmentedItem4.IconSvg = resources.GetString("segmentedItem4.IconSvg");
|
||||
segmentedItem4.Text = "复位";
|
||||
segmentedItem5.Badge = null;
|
||||
segmentedItem5.BadgeAlign = AntdUI.TAlignFrom.TR;
|
||||
segmentedItem5.BadgeBack = null;
|
||||
segmentedItem5.BadgeMode = false;
|
||||
segmentedItem5.BadgeOffsetX = 0;
|
||||
segmentedItem5.BadgeOffsetY = 0;
|
||||
segmentedItem5.BadgeSize = 0.6F;
|
||||
segmentedItem5.BadgeSvg = null;
|
||||
segmentedItem5.IconActiveSvg = resources.GetString("segmentedItem5.IconActiveSvg");
|
||||
segmentedItem5.IconSvg = resources.GetString("segmentedItem5.IconSvg");
|
||||
segmentedItem5.Text = "登录";
|
||||
segmentedItem6.Badge = null;
|
||||
segmentedItem6.BadgeAlign = AntdUI.TAlignFrom.TR;
|
||||
segmentedItem6.BadgeBack = null;
|
||||
@ -563,60 +621,16 @@
|
||||
segmentedItem6.BadgeSvg = null;
|
||||
segmentedItem6.IconActiveSvg = resources.GetString("segmentedItem6.IconActiveSvg");
|
||||
segmentedItem6.IconSvg = resources.GetString("segmentedItem6.IconSvg");
|
||||
segmentedItem6.Text = "启动";
|
||||
segmentedItem7.Badge = null;
|
||||
segmentedItem7.BadgeAlign = AntdUI.TAlignFrom.TR;
|
||||
segmentedItem7.BadgeBack = null;
|
||||
segmentedItem7.BadgeMode = false;
|
||||
segmentedItem7.BadgeOffsetX = 0;
|
||||
segmentedItem7.BadgeOffsetY = 0;
|
||||
segmentedItem7.BadgeSize = 0.6F;
|
||||
segmentedItem7.BadgeSvg = null;
|
||||
segmentedItem7.IconActiveSvg = resources.GetString("segmentedItem7.IconActiveSvg");
|
||||
segmentedItem7.IconSvg = resources.GetString("segmentedItem7.IconSvg");
|
||||
segmentedItem7.Text = "停止";
|
||||
segmentedItem8.Badge = null;
|
||||
segmentedItem8.BadgeAlign = AntdUI.TAlignFrom.TR;
|
||||
segmentedItem8.BadgeBack = null;
|
||||
segmentedItem8.BadgeMode = false;
|
||||
segmentedItem8.BadgeOffsetX = 0;
|
||||
segmentedItem8.BadgeOffsetY = 0;
|
||||
segmentedItem8.BadgeSize = 0.6F;
|
||||
segmentedItem8.BadgeSvg = null;
|
||||
segmentedItem8.IconActiveSvg = resources.GetString("segmentedItem8.IconActiveSvg");
|
||||
segmentedItem8.IconSvg = resources.GetString("segmentedItem8.IconSvg");
|
||||
segmentedItem8.Text = "复位";
|
||||
segmentedItem9.Badge = null;
|
||||
segmentedItem9.BadgeAlign = AntdUI.TAlignFrom.TR;
|
||||
segmentedItem9.BadgeBack = null;
|
||||
segmentedItem9.BadgeMode = false;
|
||||
segmentedItem9.BadgeOffsetX = 0;
|
||||
segmentedItem9.BadgeOffsetY = 0;
|
||||
segmentedItem9.BadgeSize = 0.6F;
|
||||
segmentedItem9.BadgeSvg = null;
|
||||
segmentedItem9.IconActiveSvg = resources.GetString("segmentedItem9.IconActiveSvg");
|
||||
segmentedItem9.IconSvg = resources.GetString("segmentedItem9.IconSvg");
|
||||
segmentedItem9.Text = "登录";
|
||||
segmentedItem10.Badge = null;
|
||||
segmentedItem10.BadgeAlign = AntdUI.TAlignFrom.TR;
|
||||
segmentedItem10.BadgeBack = null;
|
||||
segmentedItem10.BadgeMode = false;
|
||||
segmentedItem10.BadgeOffsetX = 0;
|
||||
segmentedItem10.BadgeOffsetY = 0;
|
||||
segmentedItem10.BadgeSize = 0.6F;
|
||||
segmentedItem10.BadgeSvg = null;
|
||||
segmentedItem10.IconActiveSvg = resources.GetString("segmentedItem10.IconActiveSvg");
|
||||
segmentedItem10.IconSvg = resources.GetString("segmentedItem10.IconSvg");
|
||||
segmentedItem10.ID = "sys-setbutton";
|
||||
segmentedItem10.Text = "设置";
|
||||
segmentedItem6.ID = "sys-setbutton";
|
||||
segmentedItem6.Text = "设置";
|
||||
segmented1.Items.Add(segmentedItem2);
|
||||
segmented1.Items.Add(segmentedItem3);
|
||||
segmented1.Items.Add(segmentedItem4);
|
||||
segmented1.Items.Add(segmentedItem5);
|
||||
segmented1.Items.Add(segmentedItem6);
|
||||
segmented1.Items.Add(segmentedItem7);
|
||||
segmented1.Items.Add(segmentedItem8);
|
||||
segmented1.Items.Add(segmentedItem9);
|
||||
segmented1.Items.Add(segmentedItem10);
|
||||
segmented1.Location = new Point(0, 0);
|
||||
segmented1.Name = "segmented1";
|
||||
segmented1.Size = new Size(491, 83);
|
||||
segmented1.Size = new Size(439, 83);
|
||||
segmented1.TabIndex = 1;
|
||||
segmented1.Text = "segmented1";
|
||||
segmented1.SelectIndexChanged += segmented1_SelectIndexChanged;
|
||||
@ -689,7 +703,6 @@
|
||||
((System.ComponentModel.ISupportInitialize)dgvCamreaNums).EndInit();
|
||||
panelNums.ResumeLayout(false);
|
||||
tableLayoutNums.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dgvProductNums).EndInit();
|
||||
tableLayoutPanel3.ResumeLayout(false);
|
||||
tableLayoutPanel3.PerformLayout();
|
||||
panel1.ResumeLayout(false);
|
||||
@ -748,9 +761,10 @@
|
||||
// private Label label7;
|
||||
// private AntdUI.Panel pnlLog;
|
||||
private AntdUI.Label lbInBackend;
|
||||
private DataGridView dgvProductNums;
|
||||
private TableLayoutPanel tableLayoutPanel3;
|
||||
private AntdUI.Button btnCreateBatchNO;
|
||||
private AntdUI.Input textBoxBatchNO;
|
||||
private AntdUI.Segmented segmented2;
|
||||
public AntdUI.Tag tagMachineStatus;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -117,287 +117,46 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="segmentedItem1.IconActiveSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 1024a512 512 0 1 1 512-512 512.568889 512.568889 0 0 1-512 512zm0-946.915556A434.915556 434.915556 0 1 0 946.915556 512 435.427556 435.427556 0 0 0 512 77.084444z" fill="#FFFFFF"/><path d="M199.555 528.063h293.116v278.095L710.638 300.43 199.555 528.063zm148.53-39.044 252.043 112.252L531.715 616.92V489.019H383.185z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem1.IconSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 1024a512 512 0 1 1 512-512 512.568889 512.568889 0 0 1-512 512zm0-946.915556A434.915556 434.915556 0 1 0 946.915556 512 435.427556 435.427556 0 0 0 512 77.084444z" fill="#FFFFFF"/><path d="M199.555 528.063h293.116v278.095L710.638 300.43 199.555 528.063zm148.53-39.044 252.043 112.252L531.715 616.92V489.019H383.185z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem2.IconActiveSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M731.818667 500.280889L386.844444 239.729778a14.677333 14.677333 0 0 0-23.495111 11.719111v521.159111a14.677333 14.677333 0 0 0 23.495111 11.662222l344.860445-260.608a14.677333 14.677333 0 0 0 0.113778-23.381333z" fill="#FFFFFF"/><path d="M512 1024a512 512 0 1 1 512-512 512.568889 512.568889 0 0 1-512 512z m0-946.915556A434.915556 434.915556 0 1 0 946.915556 512 435.427556 435.427556 0 0 0 512 77.084444z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem2.IconSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M731.818667 500.280889L386.844444 239.729778a14.677333 14.677333 0 0 0-23.495111 11.719111v521.159111a14.677333 14.677333 0 0 0 23.495111 11.662222l344.860445-260.608a14.677333 14.677333 0 0 0 0.113778-23.381333z" fill="#FFFFFF"/><path d="M512 1024a512 512 0 1 1 512-512 512.568889 512.568889 0 0 1-512 512z m0-946.915556A434.915556 434.915556 0 1 0 946.915556 512 435.427556 435.427556 0 0 0 512 77.084444z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem3.IconActiveSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M365.014704 657.815846H657.084939V365.74561H365.014704V657.815846zm584.140471-146.035118c0-240.906781-197.125482-438.105353-438.105353-438.105353-240.979872 0-438.105353 197.198572-438.105354 438.105353 0 240.979872 197.125482 438.178444 438.105354 438.178444 240.979872 0 438.105353-197.198572 438.105353-438.178444zM511.634547 0.730906c281.399001 0 511.634547 230.235546 511.634547 511.634547s-230.235546 511.634547-511.634547 511.634547-511.634547-230.235546-511.634547-511.634547 230.235546-511.634547 511.634547-511.634547z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem3.IconSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M365.014704 657.815846H657.084939V365.74561H365.014704V657.815846zm584.140471-146.035118c0-240.906781-197.125482-438.105353-438.105353-438.105353-240.979872 0-438.105353 197.198572-438.105354 438.105353 0 240.979872 197.125482 438.178444 438.105354 438.178444 240.979872 0 438.105353-197.198572 438.105353-438.178444zM511.634547 0.730906c281.399001 0 511.634547 230.235546 511.634547 511.634547s-230.235546 511.634547-511.634547 511.634547-511.634547-230.235546-511.634547-511.634547 230.235546-511.634547 511.634547-511.634547z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem4.IconActiveSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1027 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 0C229.376 0 0 229.376 0 512s229.376 512 512 512 512-229.376 512-512S794.624 0 512 0zm0 963.584c-249.344 0-451.584-202.24-451.584-451.584S262.656 60.416 512 60.416s451.584 202.24 451.584 451.584-202.24 451.584-451.584 451.584z" fill="#FFFFFF"/><path d="M527.36 351.744V292.864L410.624 380.416 527.36 468.48V410.624c72.192 8.192 124.416 73.216 116.224 145.408-8.192 72.192-73.216 124.416-145.408 116.224-66.56-7.168-117.248-64-117.248-131.072-0.512-5.12-0.512-9.728 0-14.848H323.584c-0.512 5.12-0.512 9.728 0 14.848 0 104.96 85.504 189.952 190.464 189.952s189.952-85.504 189.952-190.464c-0.512-99.328-77.312-181.76-176.64-188.928z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem4.IconSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1027 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 0C229.376 0 0 229.376 0 512s229.376 512 512 512 512-229.376 512-512S794.624 0 512 0zm0 963.584c-249.344 0-451.584-202.24-451.584-451.584S262.656 60.416 512 60.416s451.584 202.24 451.584 451.584-202.24 451.584-451.584 451.584z" fill="#FFFFFF"/><path d="M527.36 351.744V292.864L410.624 380.416 527.36 468.48V410.624c72.192 8.192 124.416 73.216 116.224 145.408-8.192 72.192-73.216 124.416-145.408 116.224-66.56-7.168-117.248-64-117.248-131.072-0.512-5.12-0.512-9.728 0-14.848H323.584c-0.512 5.12-0.512 9.728 0 14.848 0 104.96 85.504 189.952 190.464 189.952s189.952-85.504 189.952-190.464c-0.512-99.328-77.312-181.76-176.64-188.928z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem5.IconActiveSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 0C229.376 0 0 229.376 0 512s229.376 512 512 512 512-229.376 512-512S794.624 0 512 0zm0 963.584c-249.344 0-451.584-202.24-451.584-451.584S262.656 60.416 512 60.416s451.584 202.24 451.584 451.584-202.24 451.584-451.584 451.584z" fill="#FFFFFF"/><path transform="scale(0.8) translate(128,128)" d="M960.853333 903.816533a463.633067 463.633067 0 0 0-11.264-39.185066c-1.536-4.539733-3.413333-8.942933-5.051733-13.448534a484.078933 484.078933 0 0 0-9.557333-24.4736c-2.2528-5.188267-4.881067-10.274133-7.338667-15.394133-3.413333-7.099733-6.8608-14.165333-10.6496-21.0944-2.901333-5.3248-6.075733-10.513067-9.181867-15.701333-2.423467-4.061867-4.573867-8.226133-7.133866-12.219734-1.604267-2.4576-3.413333-4.778667-5.0176-7.202133-1.501867-2.218667-2.730667-4.608-4.266667-6.792533-0.4096-0.6144-1.058133-0.887467-1.501867-1.4336a461.482667 461.482667 0 0 0-90.385066-96.768c-13.5168-10.786133-27.7504-20.48-42.257067-29.5936-0.477867-0.341333-0.7168-0.8192-1.194667-1.1264-3.6864-2.286933-7.509333-4.3008-11.264-6.485334-4.266667-2.491733-8.4992-5.051733-12.868266-7.441066-6.826667-3.6864-13.789867-7.099733-20.753067-10.478934-3.618133-1.7408-7.202133-3.618133-10.8544-5.290666a449.194667 449.194667 0 0 0-31.607467-12.731734c-0.7168-0.273067-1.365333-0.6144-2.082133-0.8192-3.140267-1.1264-6.417067-1.911467-9.557333-2.935466-4.164267-1.399467-8.328533-2.833067-12.561067-4.096a259.9936 259.9936 0 0 0 129.194667-225.450667 260.061867 260.061867 0 0 0-76.629334-185.002667 259.9936 259.9936 0 0 0-185.002666-76.629333H512h-0.034133a259.857067 259.857067 0 0 0-185.002667 76.629333 259.925333 259.925333 0 0 0-76.629333 185.002667 259.584 259.584 0 0 0 76.629333 185.002667c15.906133 15.940267 33.655467 29.2864 52.565333 40.448-4.266667 1.262933-8.430933 2.730667-12.663466 4.096-3.140267 1.058133-6.3488 1.8432-9.489067 2.935466-0.7168 0.238933-1.365333 0.580267-2.048 0.8192-10.683733 3.822933-21.265067 8.0896-31.675733 12.765867-3.584 1.604267-7.0656 3.4816-10.615467 5.154133-7.099733 3.413333-14.165333 6.826667-21.0944 10.615467-4.266667 2.321067-8.3968 4.8128-12.561067 7.2704-3.822933 2.218667-7.748267 4.266667-11.502933 6.621867-0.512 0.3072-0.750933 0.8192-1.2288 1.160533-14.506667 9.147733-28.706133 18.807467-42.222933 29.559467a459.6736 459.6736 0 0 0-90.385067 96.768c-0.443733 0.546133-1.092267 0.8192-1.501867 1.4336-1.536 2.184533-2.7648 4.573867-4.266666 6.792533-1.604267 2.423467-3.447467 4.744533-5.0176 7.202133-2.56 3.9936-4.7104 8.157867-7.133867 12.219734-3.106133 5.188267-6.280533 10.376533-9.181867 15.701333-3.7888 6.929067-7.202133 13.994667-10.6496 21.0944-2.4576 5.12-5.051733 10.205867-7.338666 15.394133-3.515733 8.021333-6.519467 16.247467-9.557334 24.4736-1.672533 4.5056-3.549867 8.9088-5.051733 13.448534-4.3008 12.868267-8.0896 25.941333-11.264 39.185066-3.072 12.970667 2.594133 25.770667 13.073067 32.802134a31.3344 31.3344 0 0 0 9.966933 4.608 30.9248 30.9248 0 0 0 34.030933-15.2576 30.446933 30.446933 0 0 0 3.345067-7.7824c2.833067-11.844267 6.178133-23.483733 10.0352-34.9184 0.6144-1.8432 1.399467-3.549867 2.013867-5.358934 3.447467-9.762133 7.133867-19.456 11.332266-28.945066 0.512-1.160533 1.1264-2.2528 1.6384-3.447467 4.7104-10.308267 9.728-20.48 15.291734-30.344533l0.068266-0.1024a402.773333 402.773333 0 0 1 19.694934-31.4368l0.136533-0.375467a397.4144 397.4144 0 0 1 116.599467-111.2064c0.136533-0.1024 0.3072-0.068267 0.443733-0.170667a397.824 397.824 0 0 1 94.993067-42.973866c2.7648-0.8192 5.495467-1.7408 8.2944-2.491734 5.7344-1.604267 11.5712-3.003733 17.373866-4.334933a367.8208 367.8208 0 0 1 47.342934-7.953067c3.8912-0.443733 7.7824-0.9216 11.6736-1.2288 10.410667-0.785067 20.8896-1.3312 31.505066-1.3312s21.060267 0.546133 31.505067 1.3312c3.8912 0.3072 7.816533 0.785067 11.707733 1.2288a361.3696 361.3696 0 0 1 47.240534 7.953067c5.870933 1.3312 11.707733 2.730667 17.5104 4.334933 2.696533 0.750933 5.358933 1.6384 8.021333 2.4576 33.348267 10.103467 65.365333 24.405333 95.197867 43.008 0.136533 0.1024 0.3072 0.068267 0.443733 0.170667a396.151467 396.151467 0 0 1 116.599467 111.2064c0.1024 0.136533 0.1024 0.273067 0.170666 0.375467 13.687467 19.7632 25.3952 40.5504 35.191467 62.1568l1.467733 3.037866c4.3008 9.659733 8.055467 19.592533 11.605334 29.5936 0.546133 1.604267 1.2288 3.106133 1.774933 4.7104 3.822933 11.4688 7.236267 23.176533 10.0352 35.0208a31.061333 31.061333 0 0 0 60.450133-14.336zm-249.275733-560.2304A199.850667 199.850667 0 0 1 512 543.197867a199.850667 199.850667 0 0 1-199.5776-199.611734A199.816533 199.816533 0 0 1 512 144.008533a199.816533 199.816533 0 0 1 199.5776 199.5776z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem5.IconSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 0C229.376 0 0 229.376 0 512s229.376 512 512 512 512-229.376 512-512S794.624 0 512 0zm0 963.584c-249.344 0-451.584-202.24-451.584-451.584S262.656 60.416 512 60.416s451.584 202.24 451.584 451.584-202.24 451.584-451.584 451.584z" fill="#FFFFFF"/><path transform="scale(0.8) translate(128,128)" d="M960.853333 903.816533a463.633067 463.633067 0 0 0-11.264-39.185066c-1.536-4.539733-3.413333-8.942933-5.051733-13.448534a484.078933 484.078933 0 0 0-9.557333-24.4736c-2.2528-5.188267-4.881067-10.274133-7.338667-15.394133-3.413333-7.099733-6.8608-14.165333-10.6496-21.0944-2.901333-5.3248-6.075733-10.513067-9.181867-15.701333-2.423467-4.061867-4.573867-8.226133-7.133866-12.219734-1.604267-2.4576-3.413333-4.778667-5.0176-7.202133-1.501867-2.218667-2.730667-4.608-4.266667-6.792533-0.4096-0.6144-1.058133-0.887467-1.501867-1.4336a461.482667 461.482667 0 0 0-90.385066-96.768c-13.5168-10.786133-27.7504-20.48-42.257067-29.5936-0.477867-0.341333-0.7168-0.8192-1.194667-1.1264-3.6864-2.286933-7.509333-4.3008-11.264-6.485334-4.266667-2.491733-8.4992-5.051733-12.868266-7.441066-6.826667-3.6864-13.789867-7.099733-20.753067-10.478934-3.618133-1.7408-7.202133-3.618133-10.8544-5.290666a449.194667 449.194667 0 0 0-31.607467-12.731734c-0.7168-0.273067-1.365333-0.6144-2.082133-0.8192-3.140267-1.1264-6.417067-1.911467-9.557333-2.935466-4.164267-1.399467-8.328533-2.833067-12.561067-4.096a259.9936 259.9936 0 0 0 129.194667-225.450667 260.061867 260.061867 0 0 0-76.629334-185.002667 259.9936 259.9936 0 0 0-185.002666-76.629333H512h-0.034133a259.857067 259.857067 0 0 0-185.002667 76.629333 259.925333 259.925333 0 0 0-76.629333 185.002667 259.584 259.584 0 0 0 76.629333 185.002667c15.906133 15.940267 33.655467 29.2864 52.565333 40.448-4.266667 1.262933-8.430933 2.730667-12.663466 4.096-3.140267 1.058133-6.3488 1.8432-9.489067 2.935466-0.7168 0.238933-1.365333 0.580267-2.048 0.8192-10.683733 3.822933-21.265067 8.0896-31.675733 12.765867-3.584 1.604267-7.0656 3.4816-10.615467 5.154133-7.099733 3.413333-14.165333 6.826667-21.0944 10.615467-4.266667 2.321067-8.3968 4.8128-12.561067 7.2704-3.822933 2.218667-7.748267 4.266667-11.502933 6.621867-0.512 0.3072-0.750933 0.8192-1.2288 1.160533-14.506667 9.147733-28.706133 18.807467-42.222933 29.559467a459.6736 459.6736 0 0 0-90.385067 96.768c-0.443733 0.546133-1.092267 0.8192-1.501867 1.4336-1.536 2.184533-2.7648 4.573867-4.266666 6.792533-1.604267 2.423467-3.447467 4.744533-5.0176 7.202133-2.56 3.9936-4.7104 8.157867-7.133867 12.219734-3.106133 5.188267-6.280533 10.376533-9.181867 15.701333-3.7888 6.929067-7.202133 13.994667-10.6496 21.0944-2.4576 5.12-5.051733 10.205867-7.338666 15.394133-3.515733 8.021333-6.519467 16.247467-9.557334 24.4736-1.672533 4.5056-3.549867 8.9088-5.051733 13.448534-4.3008 12.868267-8.0896 25.941333-11.264 39.185066-3.072 12.970667 2.594133 25.770667 13.073067 32.802134a31.3344 31.3344 0 0 0 9.966933 4.608 30.9248 30.9248 0 0 0 34.030933-15.2576 30.446933 30.446933 0 0 0 3.345067-7.7824c2.833067-11.844267 6.178133-23.483733 10.0352-34.9184 0.6144-1.8432 1.399467-3.549867 2.013867-5.358934 3.447467-9.762133 7.133867-19.456 11.332266-28.945066 0.512-1.160533 1.1264-2.2528 1.6384-3.447467 4.7104-10.308267 9.728-20.48 15.291734-30.344533l0.068266-0.1024a402.773333 402.773333 0 0 1 19.694934-31.4368l0.136533-0.375467a397.4144 397.4144 0 0 1 116.599467-111.2064c0.136533-0.1024 0.3072-0.068267 0.443733-0.170667a397.824 397.824 0 0 1 94.993067-42.973866c2.7648-0.8192 5.495467-1.7408 8.2944-2.491734 5.7344-1.604267 11.5712-3.003733 17.373866-4.334933a367.8208 367.8208 0 0 1 47.342934-7.953067c3.8912-0.443733 7.7824-0.9216 11.6736-1.2288 10.410667-0.785067 20.8896-1.3312 31.505066-1.3312s21.060267 0.546133 31.505067 1.3312c3.8912 0.3072 7.816533 0.785067 11.707733 1.2288a361.3696 361.3696 0 0 1 47.240534 7.953067c5.870933 1.3312 11.707733 2.730667 17.5104 4.334933 2.696533 0.750933 5.358933 1.6384 8.021333 2.4576 33.348267 10.103467 65.365333 24.405333 95.197867 43.008 0.136533 0.1024 0.3072 0.068267 0.443733 0.170667a396.151467 396.151467 0 0 1 116.599467 111.2064c0.1024 0.136533 0.1024 0.273067 0.170666 0.375467 13.687467 19.7632 25.3952 40.5504 35.191467 62.1568l1.467733 3.037866c4.3008 9.659733 8.055467 19.592533 11.605334 29.5936 0.546133 1.604267 1.2288 3.106133 1.774933 4.7104 3.822933 11.4688 7.236267 23.176533 10.0352 35.0208a31.061333 31.061333 0 0 0 60.450133-14.336zm-249.275733-560.2304A199.850667 199.850667 0 0 1 512 543.197867a199.850667 199.850667 0 0 1-199.5776-199.611734A199.816533 199.816533 0 0 1 512 144.008533a199.816533 199.816533 0 0 1 199.5776 199.5776z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem6.IconActiveSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M731.818667 500.280889L386.844444 239.729778a14.677333 14.677333 0 0 0-23.495111 11.719111v521.159111a14.677333 14.677333 0 0 0 23.495111 11.662222l344.860445-260.608a14.677333 14.677333 0 0 0 0.113778-23.381333z" fill="#FFFFFF"/><path d="M512 1024a512 512 0 1 1 512-512 512.568889 512.568889 0 0 1-512 512z m0-946.915556A434.915556 434.915556 0 1 0 946.915556 512 435.427556 435.427556 0 0 0 512 77.084444z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem6.IconSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M731.818667 500.280889L386.844444 239.729778a14.677333 14.677333 0 0 0-23.495111 11.719111v521.159111a14.677333 14.677333 0 0 0 23.495111 11.662222l344.860445-260.608a14.677333 14.677333 0 0 0 0.113778-23.381333z" fill="#FFFFFF"/><path d="M512 1024a512 512 0 1 1 512-512 512.568889 512.568889 0 0 1-512 512z m0-946.915556A434.915556 434.915556 0 1 0 946.915556 512 435.427556 435.427556 0 0 0 512 77.084444z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem7.IconActiveSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M365.014704 657.815846H657.084939V365.74561H365.014704V657.815846zm584.140471-146.035118c0-240.906781-197.125482-438.105353-438.105353-438.105353-240.979872 0-438.105353 197.198572-438.105354 438.105353 0 240.979872 197.125482 438.178444 438.105354 438.178444 240.979872 0 438.105353-197.198572 438.105353-438.178444zM511.634547 0.730906c281.399001 0 511.634547 230.235546 511.634547 511.634547s-230.235546 511.634547-511.634547 511.634547-511.634547-230.235546-511.634547-511.634547 230.235546-511.634547 511.634547-511.634547z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem7.IconSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M365.014704 657.815846H657.084939V365.74561H365.014704V657.815846zm584.140471-146.035118c0-240.906781-197.125482-438.105353-438.105353-438.105353-240.979872 0-438.105353 197.198572-438.105354 438.105353 0 240.979872 197.125482 438.178444 438.105354 438.178444 240.979872 0 438.105353-197.198572 438.105353-438.178444zM511.634547 0.730906c281.399001 0 511.634547 230.235546 511.634547 511.634547s-230.235546 511.634547-511.634547 511.634547-511.634547-230.235546-511.634547-511.634547 230.235546-511.634547 511.634547-511.634547z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem8.IconActiveSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1027 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 0C229.376 0 0 229.376 0 512s229.376 512 512 512 512-229.376 512-512S794.624 0 512 0zm0 963.584c-249.344 0-451.584-202.24-451.584-451.584S262.656 60.416 512 60.416s451.584 202.24 451.584 451.584-202.24 451.584-451.584 451.584z" fill="#FFFFFF"/><path d="M527.36 351.744V292.864L410.624 380.416 527.36 468.48V410.624c72.192 8.192 124.416 73.216 116.224 145.408-8.192 72.192-73.216 124.416-145.408 116.224-66.56-7.168-117.248-64-117.248-131.072-0.512-5.12-0.512-9.728 0-14.848H323.584c-0.512 5.12-0.512 9.728 0 14.848 0 104.96 85.504 189.952 190.464 189.952s189.952-85.504 189.952-190.464c-0.512-99.328-77.312-181.76-176.64-188.928z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem8.IconSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1027 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 0C229.376 0 0 229.376 0 512s229.376 512 512 512 512-229.376 512-512S794.624 0 512 0zm0 963.584c-249.344 0-451.584-202.24-451.584-451.584S262.656 60.416 512 60.416s451.584 202.24 451.584 451.584-202.24 451.584-451.584 451.584z" fill="#FFFFFF"/><path d="M527.36 351.744V292.864L410.624 380.416 527.36 468.48V410.624c72.192 8.192 124.416 73.216 116.224 145.408-8.192 72.192-73.216 124.416-145.408 116.224-66.56-7.168-117.248-64-117.248-131.072-0.512-5.12-0.512-9.728 0-14.848H323.584c-0.512 5.12-0.512 9.728 0 14.848 0 104.96 85.504 189.952 190.464 189.952s189.952-85.504 189.952-190.464c-0.512-99.328-77.312-181.76-176.64-188.928z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem9.IconActiveSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 0C229.376 0 0 229.376 0 512s229.376 512 512 512 512-229.376 512-512S794.624 0 512 0zm0 963.584c-249.344 0-451.584-202.24-451.584-451.584S262.656 60.416 512 60.416s451.584 202.24 451.584 451.584-202.24 451.584-451.584 451.584z" fill="#FFFFFF"/><path transform="scale(0.8) translate(128,128)" d="M960.853333 903.816533a463.633067 463.633067 0 0 0-11.264-39.185066c-1.536-4.539733-3.413333-8.942933-5.051733-13.448534a484.078933 484.078933 0 0 0-9.557333-24.4736c-2.2528-5.188267-4.881067-10.274133-7.338667-15.394133-3.413333-7.099733-6.8608-14.165333-10.6496-21.0944-2.901333-5.3248-6.075733-10.513067-9.181867-15.701333-2.423467-4.061867-4.573867-8.226133-7.133866-12.219734-1.604267-2.4576-3.413333-4.778667-5.0176-7.202133-1.501867-2.218667-2.730667-4.608-4.266667-6.792533-0.4096-0.6144-1.058133-0.887467-1.501867-1.4336a461.482667 461.482667 0 0 0-90.385066-96.768c-13.5168-10.786133-27.7504-20.48-42.257067-29.5936-0.477867-0.341333-0.7168-0.8192-1.194667-1.1264-3.6864-2.286933-7.509333-4.3008-11.264-6.485334-4.266667-2.491733-8.4992-5.051733-12.868266-7.441066-6.826667-3.6864-13.789867-7.099733-20.753067-10.478934-3.618133-1.7408-7.202133-3.618133-10.8544-5.290666a449.194667 449.194667 0 0 0-31.607467-12.731734c-0.7168-0.273067-1.365333-0.6144-2.082133-0.8192-3.140267-1.1264-6.417067-1.911467-9.557333-2.935466-4.164267-1.399467-8.328533-2.833067-12.561067-4.096a259.9936 259.9936 0 0 0 129.194667-225.450667 260.061867 260.061867 0 0 0-76.629334-185.002667 259.9936 259.9936 0 0 0-185.002666-76.629333H512h-0.034133a259.857067 259.857067 0 0 0-185.002667 76.629333 259.925333 259.925333 0 0 0-76.629333 185.002667 259.584 259.584 0 0 0 76.629333 185.002667c15.906133 15.940267 33.655467 29.2864 52.565333 40.448-4.266667 1.262933-8.430933 2.730667-12.663466 4.096-3.140267 1.058133-6.3488 1.8432-9.489067 2.935466-0.7168 0.238933-1.365333 0.580267-2.048 0.8192-10.683733 3.822933-21.265067 8.0896-31.675733 12.765867-3.584 1.604267-7.0656 3.4816-10.615467 5.154133-7.099733 3.413333-14.165333 6.826667-21.0944 10.615467-4.266667 2.321067-8.3968 4.8128-12.561067 7.2704-3.822933 2.218667-7.748267 4.266667-11.502933 6.621867-0.512 0.3072-0.750933 0.8192-1.2288 1.160533-14.506667 9.147733-28.706133 18.807467-42.222933 29.559467a459.6736 459.6736 0 0 0-90.385067 96.768c-0.443733 0.546133-1.092267 0.8192-1.501867 1.4336-1.536 2.184533-2.7648 4.573867-4.266666 6.792533-1.604267 2.423467-3.447467 4.744533-5.0176 7.202133-2.56 3.9936-4.7104 8.157867-7.133867 12.219734-3.106133 5.188267-6.280533 10.376533-9.181867 15.701333-3.7888 6.929067-7.202133 13.994667-10.6496 21.0944-2.4576 5.12-5.051733 10.205867-7.338666 15.394133-3.515733 8.021333-6.519467 16.247467-9.557334 24.4736-1.672533 4.5056-3.549867 8.9088-5.051733 13.448534-4.3008 12.868267-8.0896 25.941333-11.264 39.185066-3.072 12.970667 2.594133 25.770667 13.073067 32.802134a31.3344 31.3344 0 0 0 9.966933 4.608 30.9248 30.9248 0 0 0 34.030933-15.2576 30.446933 30.446933 0 0 0 3.345067-7.7824c2.833067-11.844267 6.178133-23.483733 10.0352-34.9184 0.6144-1.8432 1.399467-3.549867 2.013867-5.358934 3.447467-9.762133 7.133867-19.456 11.332266-28.945066 0.512-1.160533 1.1264-2.2528 1.6384-3.447467 4.7104-10.308267 9.728-20.48 15.291734-30.344533l0.068266-0.1024a402.773333 402.773333 0 0 1 19.694934-31.4368l0.136533-0.375467a397.4144 397.4144 0 0 1 116.599467-111.2064c0.136533-0.1024 0.3072-0.068267 0.443733-0.170667a397.824 397.824 0 0 1 94.993067-42.973866c2.7648-0.8192 5.495467-1.7408 8.2944-2.491734 5.7344-1.604267 11.5712-3.003733 17.373866-4.334933a367.8208 367.8208 0 0 1 47.342934-7.953067c3.8912-0.443733 7.7824-0.9216 11.6736-1.2288 10.410667-0.785067 20.8896-1.3312 31.505066-1.3312s21.060267 0.546133 31.505067 1.3312c3.8912 0.3072 7.816533 0.785067 11.707733 1.2288a361.3696 361.3696 0 0 1 47.240534 7.953067c5.870933 1.3312 11.707733 2.730667 17.5104 4.334933 2.696533 0.750933 5.358933 1.6384 8.021333 2.4576 33.348267 10.103467 65.365333 24.405333 95.197867 43.008 0.136533 0.1024 0.3072 0.068267 0.443733 0.170667a396.151467 396.151467 0 0 1 116.599467 111.2064c0.1024 0.136533 0.1024 0.273067 0.170666 0.375467 13.687467 19.7632 25.3952 40.5504 35.191467 62.1568l1.467733 3.037866c4.3008 9.659733 8.055467 19.592533 11.605334 29.5936 0.546133 1.604267 1.2288 3.106133 1.774933 4.7104 3.822933 11.4688 7.236267 23.176533 10.0352 35.0208a31.061333 31.061333 0 0 0 60.450133-14.336zm-249.275733-560.2304A199.850667 199.850667 0 0 1 512 543.197867a199.850667 199.850667 0 0 1-199.5776-199.611734A199.816533 199.816533 0 0 1 512 144.008533a199.816533 199.816533 0 0 1 199.5776 199.5776z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem9.IconSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 0C229.376 0 0 229.376 0 512s229.376 512 512 512 512-229.376 512-512S794.624 0 512 0zm0 963.584c-249.344 0-451.584-202.24-451.584-451.584S262.656 60.416 512 60.416s451.584 202.24 451.584 451.584-202.24 451.584-451.584 451.584z" fill="#FFFFFF"/><path transform="scale(0.8) translate(128,128)" d="M960.853333 903.816533a463.633067 463.633067 0 0 0-11.264-39.185066c-1.536-4.539733-3.413333-8.942933-5.051733-13.448534a484.078933 484.078933 0 0 0-9.557333-24.4736c-2.2528-5.188267-4.881067-10.274133-7.338667-15.394133-3.413333-7.099733-6.8608-14.165333-10.6496-21.0944-2.901333-5.3248-6.075733-10.513067-9.181867-15.701333-2.423467-4.061867-4.573867-8.226133-7.133866-12.219734-1.604267-2.4576-3.413333-4.778667-5.0176-7.202133-1.501867-2.218667-2.730667-4.608-4.266667-6.792533-0.4096-0.6144-1.058133-0.887467-1.501867-1.4336a461.482667 461.482667 0 0 0-90.385066-96.768c-13.5168-10.786133-27.7504-20.48-42.257067-29.5936-0.477867-0.341333-0.7168-0.8192-1.194667-1.1264-3.6864-2.286933-7.509333-4.3008-11.264-6.485334-4.266667-2.491733-8.4992-5.051733-12.868266-7.441066-6.826667-3.6864-13.789867-7.099733-20.753067-10.478934-3.618133-1.7408-7.202133-3.618133-10.8544-5.290666a449.194667 449.194667 0 0 0-31.607467-12.731734c-0.7168-0.273067-1.365333-0.6144-2.082133-0.8192-3.140267-1.1264-6.417067-1.911467-9.557333-2.935466-4.164267-1.399467-8.328533-2.833067-12.561067-4.096a259.9936 259.9936 0 0 0 129.194667-225.450667 260.061867 260.061867 0 0 0-76.629334-185.002667 259.9936 259.9936 0 0 0-185.002666-76.629333H512h-0.034133a259.857067 259.857067 0 0 0-185.002667 76.629333 259.925333 259.925333 0 0 0-76.629333 185.002667 259.584 259.584 0 0 0 76.629333 185.002667c15.906133 15.940267 33.655467 29.2864 52.565333 40.448-4.266667 1.262933-8.430933 2.730667-12.663466 4.096-3.140267 1.058133-6.3488 1.8432-9.489067 2.935466-0.7168 0.238933-1.365333 0.580267-2.048 0.8192-10.683733 3.822933-21.265067 8.0896-31.675733 12.765867-3.584 1.604267-7.0656 3.4816-10.615467 5.154133-7.099733 3.413333-14.165333 6.826667-21.0944 10.615467-4.266667 2.321067-8.3968 4.8128-12.561067 7.2704-3.822933 2.218667-7.748267 4.266667-11.502933 6.621867-0.512 0.3072-0.750933 0.8192-1.2288 1.160533-14.506667 9.147733-28.706133 18.807467-42.222933 29.559467a459.6736 459.6736 0 0 0-90.385067 96.768c-0.443733 0.546133-1.092267 0.8192-1.501867 1.4336-1.536 2.184533-2.7648 4.573867-4.266666 6.792533-1.604267 2.423467-3.447467 4.744533-5.0176 7.202133-2.56 3.9936-4.7104 8.157867-7.133867 12.219734-3.106133 5.188267-6.280533 10.376533-9.181867 15.701333-3.7888 6.929067-7.202133 13.994667-10.6496 21.0944-2.4576 5.12-5.051733 10.205867-7.338666 15.394133-3.515733 8.021333-6.519467 16.247467-9.557334 24.4736-1.672533 4.5056-3.549867 8.9088-5.051733 13.448534-4.3008 12.868267-8.0896 25.941333-11.264 39.185066-3.072 12.970667 2.594133 25.770667 13.073067 32.802134a31.3344 31.3344 0 0 0 9.966933 4.608 30.9248 30.9248 0 0 0 34.030933-15.2576 30.446933 30.446933 0 0 0 3.345067-7.7824c2.833067-11.844267 6.178133-23.483733 10.0352-34.9184 0.6144-1.8432 1.399467-3.549867 2.013867-5.358934 3.447467-9.762133 7.133867-19.456 11.332266-28.945066 0.512-1.160533 1.1264-2.2528 1.6384-3.447467 4.7104-10.308267 9.728-20.48 15.291734-30.344533l0.068266-0.1024a402.773333 402.773333 0 0 1 19.694934-31.4368l0.136533-0.375467a397.4144 397.4144 0 0 1 116.599467-111.2064c0.136533-0.1024 0.3072-0.068267 0.443733-0.170667a397.824 397.824 0 0 1 94.993067-42.973866c2.7648-0.8192 5.495467-1.7408 8.2944-2.491734 5.7344-1.604267 11.5712-3.003733 17.373866-4.334933a367.8208 367.8208 0 0 1 47.342934-7.953067c3.8912-0.443733 7.7824-0.9216 11.6736-1.2288 10.410667-0.785067 20.8896-1.3312 31.505066-1.3312s21.060267 0.546133 31.505067 1.3312c3.8912 0.3072 7.816533 0.785067 11.707733 1.2288a361.3696 361.3696 0 0 1 47.240534 7.953067c5.870933 1.3312 11.707733 2.730667 17.5104 4.334933 2.696533 0.750933 5.358933 1.6384 8.021333 2.4576 33.348267 10.103467 65.365333 24.405333 95.197867 43.008 0.136533 0.1024 0.3072 0.068267 0.443733 0.170667a396.151467 396.151467 0 0 1 116.599467 111.2064c0.1024 0.136533 0.1024 0.273067 0.170666 0.375467 13.687467 19.7632 25.3952 40.5504 35.191467 62.1568l1.467733 3.037866c4.3008 9.659733 8.055467 19.592533 11.605334 29.5936 0.546133 1.604267 1.2288 3.106133 1.774933 4.7104 3.822933 11.4688 7.236267 23.176533 10.0352 35.0208a31.061333 31.061333 0 0 0 60.450133-14.336zm-249.275733-560.2304A199.850667 199.850667 0 0 1 512 543.197867a199.850667 199.850667 0 0 1-199.5776-199.611734A199.816533 199.816533 0 0 1 512 144.008533a199.816533 199.816533 0 0 1 199.5776 199.5776z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem10.IconActiveSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1027 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 0C229.376 0 0 229.376 0 512s229.376 512 512 512 512-229.376 512-512S794.624 0 512 0zm0 963.584c-249.344 0-451.584-202.24-451.584-451.584S262.656 60.416 512 60.416s451.584 202.24 451.584 451.584-202.24 451.584-451.584 451.584z" fill="#FFFFFF"/><path d="M437.314 840.84l-18.967-5.795c-43.935-13.425-84.182-35.551-119.623-65.767l-15.203-12.962 11.199-16.544c17.376-25.668 17.938-59.158 1.433-85.319-14.356-22.787-39.028-36.385-66.006-36.385-4.102 0-8.229 0.328-12.267 0.974l-19.752 3.158-5.301-19.288c-8.196-29.823-12.353-59.896-12.353-89.381 0-19.675 1.863-39.491 5.694-60.582l3.652-20.105 20.349 1.862c2.343 0.214 4.726 0.323 7.081 0.323 29.007 0 55.436-15.908 68.974-41.516 14.941-28.2 11.264-62.223-9.356-86.694l-13.166-15.625L278.1 276.7c38.694-38.954 86.677-68.095 138.76-84.273l19.741-6.132 7.631 19.211c11.88 29.908 40.312 49.234 72.432 49.234 32.097 0 60.521-19.328 72.413-49.241l7.632-19.197 19.73 6.122c43.968 13.642 84.295 36.164 119.862 66.938l15.414 13.337-11.883 16.561c-18.636 25.975-19.684 60.166-2.671 87.105 14.369 22.78 39.055 36.373 66.04 36.372 4.344 0 8.71-0.366 12.978-1.087l20.143-3.403 5.176 19.762c7.539 28.792 11.362 57.566 11.362 85.522 0 21.328-2.143 43.048-6.365 64.554l-3.859 19.65-19.952-1.709a77.999 77.999 0 0 0-6.612-0.281c-28.998 0-55.44 15.917-69.009 41.542-14.47 27.405-11.311 60.816 8.063 85.095l12.496 15.661-14.222 14.111c-38.674 38.378-86.551 67.041-138.455 82.892l-18.968 5.792-7.988-18.152c-12.462-28.318-40.459-46.617-71.325-46.617-30.883 0-58.893 18.299-71.36 46.619l-7.99 18.152zm-95.455-94.18c22.324 16.82 46.59 30.174 72.469 39.881 22.445-34.023 60.731-55.125 102.336-55.125 41.59 0 79.862 21.1 102.303 55.12 32.745-12.298 63.249-30.557 89.663-53.667-19.709-35.774-20.525-79.555-1.04-116.455 19.699-37.203 56.634-61.386 98.053-64.883 1.705-12.731 2.565-25.453 2.565-38 0-18.339-1.923-37.155-5.729-56.144-42.123-0.241-80.616-21.581-103.077-57.189-22.944-36.331-25.024-81.029-6.697-118.768-22.165-16.932-46.203-30.4-71.788-40.221-8.847 14.328-20.577 26.719-34.618 36.447-20.522 14.219-44.602 21.735-69.635 21.735-25.044 0-49.131-7.516-69.657-21.734-14.042-9.727-25.773-22.116-34.618-36.441-32.551 12.503-62.856 30.935-89.106 54.196 21.198 36.233 22.547 80.974 2.407 118.987-19.71 37.285-56.808 61.499-98.402 64.875-1.45 11.713-2.161 23.035-2.161 34.255 0 19.715 2.166 39.792 6.449 59.894 41.851 0.474 80.029 21.785 102.35 57.214 22.218 35.217 24.782 78.871 7.933 116.023z" fill="#FFFFFF"/><path d="M516.664 633.864c-66.246 0-120.141-53.897-120.141-120.147 0-66.249 53.895-120.146 120.141-120.146 66.237 0 120.127 53.897 120.127 120.146 0 66.25-53.89 120.147-120.127 120.147zm0-195.641c-41.625 0-75.488 33.866-75.488 75.494s33.863 75.495 75.488 75.495c41.617 0 75.475-33.867 75.475-75.495s-33.858-75.494-75.475-75.494z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<data name="segmentedItem10.IconSvg" xml:space="preserve">
|
||||
<data name="segmentedItem6.IconSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1027 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 0C229.376 0 0 229.376 0 512s229.376 512 512 512 512-229.376 512-512S794.624 0 512 0zm0 963.584c-249.344 0-451.584-202.24-451.584-451.584S262.656 60.416 512 60.416s451.584 202.24 451.584 451.584-202.24 451.584-451.584 451.584z" fill="#FFFFFF"/><path d="M437.314 840.84l-18.967-5.795c-43.935-13.425-84.182-35.551-119.623-65.767l-15.203-12.962 11.199-16.544c17.376-25.668 17.938-59.158 1.433-85.319-14.356-22.787-39.028-36.385-66.006-36.385-4.102 0-8.229 0.328-12.267 0.974l-19.752 3.158-5.301-19.288c-8.196-29.823-12.353-59.896-12.353-89.381 0-19.675 1.863-39.491 5.694-60.582l3.652-20.105 20.349 1.862c2.343 0.214 4.726 0.323 7.081 0.323 29.007 0 55.436-15.908 68.974-41.516 14.941-28.2 11.264-62.223-9.356-86.694l-13.166-15.625L278.1 276.7c38.694-38.954 86.677-68.095 138.76-84.273l19.741-6.132 7.631 19.211c11.88 29.908 40.312 49.234 72.432 49.234 32.097 0 60.521-19.328 72.413-49.241l7.632-19.197 19.73 6.122c43.968 13.642 84.295 36.164 119.862 66.938l15.414 13.337-11.883 16.561c-18.636 25.975-19.684 60.166-2.671 87.105 14.369 22.78 39.055 36.373 66.04 36.372 4.344 0 8.71-0.366 12.978-1.087l20.143-3.403 5.176 19.762c7.539 28.792 11.362 57.566 11.362 85.522 0 21.328-2.143 43.048-6.365 64.554l-3.859 19.65-19.952-1.709a77.999 77.999 0 0 0-6.612-0.281c-28.998 0-55.44 15.917-69.009 41.542-14.47 27.405-11.311 60.816 8.063 85.095l12.496 15.661-14.222 14.111c-38.674 38.378-86.551 67.041-138.455 82.892l-18.968 5.792-7.988-18.152c-12.462-28.318-40.459-46.617-71.325-46.617-30.883 0-58.893 18.299-71.36 46.619l-7.99 18.152zm-95.455-94.18c22.324 16.82 46.59 30.174 72.469 39.881 22.445-34.023 60.731-55.125 102.336-55.125 41.59 0 79.862 21.1 102.303 55.12 32.745-12.298 63.249-30.557 89.663-53.667-19.709-35.774-20.525-79.555-1.04-116.455 19.699-37.203 56.634-61.386 98.053-64.883 1.705-12.731 2.565-25.453 2.565-38 0-18.339-1.923-37.155-5.729-56.144-42.123-0.241-80.616-21.581-103.077-57.189-22.944-36.331-25.024-81.029-6.697-118.768-22.165-16.932-46.203-30.4-71.788-40.221-8.847 14.328-20.577 26.719-34.618 36.447-20.522 14.219-44.602 21.735-69.635 21.735-25.044 0-49.131-7.516-69.657-21.734-14.042-9.727-25.773-22.116-34.618-36.441-32.551 12.503-62.856 30.935-89.106 54.196 21.198 36.233 22.547 80.974 2.407 118.987-19.71 37.285-56.808 61.499-98.402 64.875-1.45 11.713-2.161 23.035-2.161 34.255 0 19.715 2.166 39.792 6.449 59.894 41.851 0.474 80.029 21.785 102.35 57.214 22.218 35.217 24.782 78.871 7.933 116.023z" fill="#FFFFFF"/><path d="M516.664 633.864c-66.246 0-120.141-53.897-120.141-120.147 0-66.249 53.895-120.146 120.141-120.146 66.237 0 120.127 53.897 120.127 120.146 0 66.25-53.89 120.147-120.127 120.147zm0-195.641c-41.625 0-75.488 33.866-75.488 75.494s33.863 75.495 75.488 75.495c41.617 0 75.475-33.867 75.475-75.495s-33.858-75.494-75.475-75.494z" fill="#FFFFFF"/></svg></value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAMAEBAAAAEAIABoBAAANgAAACAgAAABACAAKBEAAJ4EAAAwMAAAAQAgAGgmAADGFQAAKAAAABAA
|
||||
AAAgAAAAAQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALynH/a8px/xvKcf3b2oH7W9qB97v6gdLAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8W7mUDDu/C8px//vKcf+LynH/q8px//vKcf/7yn
|
||||
H/+8px/FvKUeRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/Du50/xLv1vKcf/7unH6a/vwAEu6ocLbym
|
||||
H3O3qCTbvKcf/7ynH/+7px+dv58gCAAAAAAAAAAAAAAAAAAAAAA/w7udP8S79bynH/+7px+mAAAAAAAA
|
||||
AAAAAAAAQMW7e2q6hf+4pyTxvKcf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AAPwAA/AAf8AA/AAD8AB/wAD8AAPwA
|
||||
D/AAPwAA/AAP8AA/AAD8AA/wAD8AAPwAD/AAPwAA/AAP8AA/AAD8AAAAAD8AAPwAAAAAPwAA/AAAAAA/
|
||||
AAD8AAAAAD8AAPwAAAAAPwAA/AAAAAA/AAD8AAAAAD8AAPwAAAAAPwAA/AAAAAA/AAD8AAAAAD8AAPwA
|
||||
AAAAPwAA/AAAAAA/AAD8AAAAAD8AAPwAAAAAPwAA/AAD+AA/AAD8AAf4AD8AAPwAB/gAPwAA/AAP+AA/
|
||||
AAD8AA/4AD8AAPwAD/gAPwAA/AAP+AA/AAD8AA/8AD8AAPwAD/4APwAA/AAP/4A/AAD+AA//8D8AAP4A
|
||||
H////wAA/wA/////AAD///////8AAP///////wAA////////AAD///////8AAP///////wAA////////
|
||||
AAA=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
@ -67,6 +67,8 @@ namespace DHSoftware
|
||||
catch (Exception ex)
|
||||
{
|
||||
SystemModel.CurrentStatus = EnumStatus.异常;
|
||||
MainWindow.Instance.tagMachineStatus.Type = TTypeMini.Error;
|
||||
MainWindow.Instance.tagMachineStatus.Text = "异常";
|
||||
Modal.open(WelcomeWindow.Instance, "错误!", ex.ToString(), TType.Error);
|
||||
}
|
||||
|
||||
@ -99,6 +101,8 @@ namespace DHSoftware
|
||||
catch (Exception ex)
|
||||
{
|
||||
SystemModel.CurrentStatus = EnumStatus.异常;
|
||||
MainWindow.Instance.tagMachineStatus.Type = TTypeMini.Error;
|
||||
MainWindow.Instance.tagMachineStatus.Text = "异常";
|
||||
Modal.open(WelcomeWindow.Instance, "错误!", ex.ToString(), TType.Error);
|
||||
}
|
||||
UpdateStep(80, "正在加载算法模型", true);
|
||||
@ -109,6 +113,8 @@ namespace DHSoftware
|
||||
catch (Exception ex)
|
||||
{
|
||||
SystemModel.CurrentStatus = EnumStatus.异常;
|
||||
MainWindow.Instance.tagMachineStatus.Type = TTypeMini.Error;
|
||||
MainWindow.Instance.tagMachineStatus.Text = "异常";
|
||||
Modal.open(WelcomeWindow.Instance, "错误!", ex.ToString(), TType.Error);
|
||||
}
|
||||
UpdateStep(100, "程序初始化完成", true);
|
||||
|
28
DHSoftware/Properties/Resources.Designer.cs
generated
28
DHSoftware/Properties/Resources.Designer.cs
generated
@ -1,10 +1,10 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 此代码由工具生成
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// 重新生成代码,这些更改将会丢失
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@ -13,12 +13,12 @@ namespace DHSoftware.Properties {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
@ -33,7 +33,7 @@ namespace DHSoftware.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
@ -48,7 +48,7 @@ namespace DHSoftware.Properties {
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// 使用此强类型资源类的所有资源查找执行重写
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
@ -61,7 +61,7 @@ namespace DHSoftware.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap bg1 {
|
||||
get {
|
||||
@ -71,7 +71,7 @@ namespace DHSoftware.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap bg2 {
|
||||
get {
|
||||
@ -81,7 +81,7 @@ namespace DHSoftware.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap bg3 {
|
||||
get {
|
||||
@ -91,7 +91,7 @@ namespace DHSoftware.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap head {
|
||||
get {
|
||||
@ -101,7 +101,7 @@ namespace DHSoftware.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap head2 {
|
||||
get {
|
||||
@ -111,7 +111,7 @@ namespace DHSoftware.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap logo {
|
||||
get {
|
||||
@ -121,7 +121,7 @@ namespace DHSoftware.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 关闭 {
|
||||
get {
|
||||
|
@ -13,6 +13,7 @@ namespace DHSoftware.Views
|
||||
|
||||
InitializeComponent();
|
||||
lbTitleName.Text = TitleName;
|
||||
|
||||
// 绑定事件
|
||||
BindEventHandler();
|
||||
}
|
||||
@ -21,6 +22,12 @@ namespace DHSoftware.Views
|
||||
{
|
||||
button_ok.Click += Button_ok_Click;
|
||||
button_cancel.Click += Button_cancel_Click;
|
||||
Load += AddCameraControl_Load;
|
||||
}
|
||||
|
||||
private void AddCameraControl_Load(object? sender, EventArgs e)
|
||||
{
|
||||
input_name.Text = CubicleName;
|
||||
}
|
||||
|
||||
private void Button_cancel_Click(object sender, EventArgs e)
|
||||
|
@ -28,6 +28,13 @@ namespace DHSoftware.Views
|
||||
{
|
||||
button_ok.Click += Button_ok_Click;
|
||||
button_cancel.Click += Button_cancel_Click;
|
||||
Load += AddCubicleControl_Load;
|
||||
}
|
||||
|
||||
private void AddCubicleControl_Load(object? sender, EventArgs e)
|
||||
{
|
||||
input_name.Text = CubicleName;
|
||||
sltdetectionType.SelectedIndex =(int)DetectionType;
|
||||
}
|
||||
|
||||
private void Button_cancel_Click(object sender, EventArgs e)
|
||||
|
8
DHSoftware/Views/CamConfigFrm.Designer.cs
generated
8
DHSoftware/Views/CamConfigFrm.Designer.cs
generated
@ -4,14 +4,14 @@
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
|
8
DHSoftware/Views/CameraConfigControl.Designer.cs
generated
8
DHSoftware/Views/CameraConfigControl.Designer.cs
generated
@ -3,14 +3,14 @@
|
||||
partial class CameraConfigControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
|
681
DHSoftware/Views/CameraControl.Designer.cs
generated
681
DHSoftware/Views/CameraControl.Designer.cs
generated
@ -28,227 +28,65 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
swhEnable = new AntdUI.Switch();
|
||||
panel3 = new AntdUI.Panel();
|
||||
button3 = new AntdUI.Button();
|
||||
button2 = new AntdUI.Button();
|
||||
button1 = new AntdUI.Button();
|
||||
btnSizeAdd = new AntdUI.Button();
|
||||
panel4 = new AntdUI.Panel();
|
||||
pictureBox1 = new PictureBox();
|
||||
panel2 = new AntdUI.Panel();
|
||||
label18 = new AntdUI.Label();
|
||||
swhEnable = new AntdUI.Switch();
|
||||
label1 = new AntdUI.Label();
|
||||
label2 = new AntdUI.Label();
|
||||
label3 = new AntdUI.Label();
|
||||
iptExposure = new AntdUI.InputNumber();
|
||||
iptGain = new AntdUI.InputNumber();
|
||||
iptRevolve = new AntdUI.InputNumber();
|
||||
iptExposure = new AntdUI.Input();
|
||||
iptGain = new AntdUI.Input();
|
||||
iptRevolve = new AntdUI.Select();
|
||||
label4 = new AntdUI.Label();
|
||||
sltAcquisitionMode = new AntdUI.Select();
|
||||
label5 = new AntdUI.Label();
|
||||
sltTriggerMode = new AntdUI.Select();
|
||||
label7 = new AntdUI.Label();
|
||||
iptROIW = new AntdUI.InputNumber();
|
||||
iptROIY = new AntdUI.InputNumber();
|
||||
iptROIX = new AntdUI.InputNumber();
|
||||
iptROIH = new AntdUI.InputNumber();
|
||||
pictureBox1 = new PictureBox();
|
||||
btnSizeAdd = new AntdUI.Button();
|
||||
button1 = new AntdUI.Button();
|
||||
button2 = new AntdUI.Button();
|
||||
button3 = new AntdUI.Button();
|
||||
sthPic = new AntdUI.Switch();
|
||||
iptROIX = new AntdUI.Input();
|
||||
iptROIY = new AntdUI.Input();
|
||||
iptROIW = new AntdUI.Input();
|
||||
iptROIH = new AntdUI.Input();
|
||||
label6 = new AntdUI.Label();
|
||||
sthPic = new AntdUI.Switch();
|
||||
label8 = new AntdUI.Label();
|
||||
label9 = new AntdUI.Label();
|
||||
label10 = new AntdUI.Label();
|
||||
label11 = new AntdUI.Label();
|
||||
sthAllPic = new AntdUI.Switch();
|
||||
label12 = new AntdUI.Label();
|
||||
sltCamType = new AntdUI.Select();
|
||||
sthAllPic = new AntdUI.Switch();
|
||||
label13 = new AntdUI.Label();
|
||||
sltCamType = new AntdUI.Select();
|
||||
label14 = new AntdUI.Label();
|
||||
switch1 = new AntdUI.Switch();
|
||||
panel1 = new AntdUI.Panel();
|
||||
sltPicType = new AntdUI.Select();
|
||||
label15 = new AntdUI.Label();
|
||||
panel3.SuspendLayout();
|
||||
panel4.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
|
||||
panel2.SuspendLayout();
|
||||
panel1.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// swhEnable
|
||||
// panel3
|
||||
//
|
||||
swhEnable.CheckedText = "启用";
|
||||
swhEnable.Location = new Point(93, 13);
|
||||
swhEnable.Name = "swhEnable";
|
||||
swhEnable.Size = new Size(94, 33);
|
||||
swhEnable.TabIndex = 13;
|
||||
swhEnable.UnCheckedText = "关闭";
|
||||
//
|
||||
// label18
|
||||
//
|
||||
label18.Location = new Point(28, 23);
|
||||
label18.Name = "label18";
|
||||
label18.Size = new Size(59, 23);
|
||||
label18.TabIndex = 12;
|
||||
label18.Text = "状 态";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.Location = new Point(28, 140);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(59, 36);
|
||||
label1.TabIndex = 14;
|
||||
label1.Text = "曝 光";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.Location = new Point(28, 183);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new Size(59, 36);
|
||||
label2.TabIndex = 15;
|
||||
label2.Text = "增 益";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
label3.Location = new Point(28, 226);
|
||||
label3.Name = "label3";
|
||||
label3.Size = new Size(59, 36);
|
||||
label3.TabIndex = 16;
|
||||
label3.Text = "旋转角度";
|
||||
//
|
||||
// iptExposure
|
||||
//
|
||||
iptExposure.Location = new Point(93, 140);
|
||||
iptExposure.Name = "iptExposure";
|
||||
iptExposure.Size = new Size(94, 36);
|
||||
iptExposure.TabIndex = 17;
|
||||
iptExposure.Tag = "";
|
||||
iptExposure.Text = "0";
|
||||
//
|
||||
// iptGain
|
||||
//
|
||||
iptGain.Location = new Point(93, 183);
|
||||
iptGain.Name = "iptGain";
|
||||
iptGain.Size = new Size(94, 36);
|
||||
iptGain.TabIndex = 18;
|
||||
iptGain.Text = "0";
|
||||
//
|
||||
// iptRevolve
|
||||
//
|
||||
iptRevolve.Location = new Point(93, 226);
|
||||
iptRevolve.Name = "iptRevolve";
|
||||
iptRevolve.Size = new Size(94, 36);
|
||||
iptRevolve.TabIndex = 19;
|
||||
iptRevolve.Text = "0";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
label4.Location = new Point(28, 269);
|
||||
label4.Name = "label4";
|
||||
label4.Size = new Size(59, 36);
|
||||
label4.TabIndex = 20;
|
||||
label4.Text = "采图模式";
|
||||
//
|
||||
// sltAcquisitionMode
|
||||
//
|
||||
sltAcquisitionMode.List = true;
|
||||
sltAcquisitionMode.Location = new Point(93, 269);
|
||||
sltAcquisitionMode.Name = "sltAcquisitionMode";
|
||||
sltAcquisitionMode.Size = new Size(94, 36);
|
||||
sltAcquisitionMode.TabIndex = 21;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
label5.Location = new Point(28, 314);
|
||||
label5.Name = "label5";
|
||||
label5.Size = new Size(59, 36);
|
||||
label5.TabIndex = 22;
|
||||
label5.Text = "触发模式";
|
||||
//
|
||||
// sltTriggerMode
|
||||
//
|
||||
sltTriggerMode.List = true;
|
||||
sltTriggerMode.Location = new Point(93, 314);
|
||||
sltTriggerMode.Name = "sltTriggerMode";
|
||||
sltTriggerMode.Size = new Size(94, 36);
|
||||
sltTriggerMode.TabIndex = 26;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
label7.Location = new Point(19, 476);
|
||||
label7.Name = "label7";
|
||||
label7.Size = new Size(29, 23);
|
||||
label7.TabIndex = 28;
|
||||
label7.Text = "ROI";
|
||||
//
|
||||
// iptROIW
|
||||
//
|
||||
iptROIW.Location = new Point(93, 494);
|
||||
iptROIW.Name = "iptROIW";
|
||||
iptROIW.Size = new Size(94, 37);
|
||||
iptROIW.TabIndex = 31;
|
||||
iptROIW.Text = "0";
|
||||
//
|
||||
// iptROIY
|
||||
//
|
||||
iptROIY.Location = new Point(93, 451);
|
||||
iptROIY.Name = "iptROIY";
|
||||
iptROIY.Size = new Size(94, 37);
|
||||
iptROIY.TabIndex = 30;
|
||||
iptROIY.Text = "0";
|
||||
//
|
||||
// iptROIX
|
||||
//
|
||||
iptROIX.Location = new Point(93, 408);
|
||||
iptROIX.Name = "iptROIX";
|
||||
iptROIX.Size = new Size(94, 37);
|
||||
iptROIX.TabIndex = 29;
|
||||
iptROIX.Tag = "";
|
||||
iptROIX.Text = "0";
|
||||
//
|
||||
// iptROIH
|
||||
//
|
||||
iptROIH.Location = new Point(93, 537);
|
||||
iptROIH.Name = "iptROIH";
|
||||
iptROIH.Size = new Size(94, 37);
|
||||
iptROIH.TabIndex = 32;
|
||||
iptROIH.Text = "0";
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
pictureBox1.BorderStyle = BorderStyle.FixedSingle;
|
||||
pictureBox1.Location = new Point(219, 23);
|
||||
pictureBox1.Name = "pictureBox1";
|
||||
pictureBox1.Size = new Size(659, 489);
|
||||
pictureBox1.TabIndex = 33;
|
||||
pictureBox1.TabStop = false;
|
||||
//
|
||||
// btnSizeAdd
|
||||
//
|
||||
btnSizeAdd.BorderWidth = 2F;
|
||||
btnSizeAdd.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
btnSizeAdd.Ghost = true;
|
||||
btnSizeAdd.IconRatio = 0F;
|
||||
btnSizeAdd.IconSvg = "";
|
||||
btnSizeAdd.Location = new Point(282, 532);
|
||||
btnSizeAdd.Name = "btnSizeAdd";
|
||||
btnSizeAdd.Size = new Size(80, 38);
|
||||
btnSizeAdd.TabIndex = 34;
|
||||
btnSizeAdd.Text = "连接相机";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
button1.BorderWidth = 2F;
|
||||
button1.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
button1.Ghost = true;
|
||||
button1.IconRatio = 0F;
|
||||
button1.IconSvg = "";
|
||||
button1.Location = new Point(440, 532);
|
||||
button1.Name = "button1";
|
||||
button1.Size = new Size(80, 38);
|
||||
button1.TabIndex = 35;
|
||||
button1.Text = "断开相机";
|
||||
//
|
||||
// button2
|
||||
//
|
||||
button2.BorderWidth = 2F;
|
||||
button2.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
button2.Ghost = true;
|
||||
button2.IconRatio = 0F;
|
||||
button2.IconSvg = "";
|
||||
button2.Location = new Point(595, 532);
|
||||
button2.Name = "button2";
|
||||
button2.Size = new Size(80, 38);
|
||||
button2.TabIndex = 36;
|
||||
button2.Text = "单次触发";
|
||||
panel3.Controls.Add(button3);
|
||||
panel3.Controls.Add(button2);
|
||||
panel3.Controls.Add(button1);
|
||||
panel3.Controls.Add(btnSizeAdd);
|
||||
panel3.Dock = DockStyle.Bottom;
|
||||
panel3.Location = new Point(0, 585);
|
||||
panel3.Name = "panel3";
|
||||
panel3.Size = new Size(691, 59);
|
||||
panel3.TabIndex = 39;
|
||||
panel3.Text = "panel3";
|
||||
//
|
||||
// button3
|
||||
//
|
||||
@ -257,169 +95,434 @@
|
||||
button3.Ghost = true;
|
||||
button3.IconRatio = 0F;
|
||||
button3.IconSvg = "";
|
||||
button3.Location = new Point(743, 532);
|
||||
button3.Location = new Point(536, 13);
|
||||
button3.Name = "button3";
|
||||
button3.Size = new Size(80, 38);
|
||||
button3.TabIndex = 37;
|
||||
button3.TabIndex = 46;
|
||||
button3.Text = "连续触发";
|
||||
//
|
||||
// button2
|
||||
//
|
||||
button2.BorderWidth = 2F;
|
||||
button2.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
button2.Ghost = true;
|
||||
button2.IconRatio = 0F;
|
||||
button2.IconSvg = "";
|
||||
button2.Location = new Point(388, 13);
|
||||
button2.Name = "button2";
|
||||
button2.Size = new Size(80, 38);
|
||||
button2.TabIndex = 45;
|
||||
button2.Text = "单次触发";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
button1.BorderWidth = 2F;
|
||||
button1.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
button1.Ghost = true;
|
||||
button1.IconRatio = 0F;
|
||||
button1.IconSvg = "";
|
||||
button1.Location = new Point(233, 13);
|
||||
button1.Name = "button1";
|
||||
button1.Size = new Size(80, 38);
|
||||
button1.TabIndex = 44;
|
||||
button1.Text = "断开相机";
|
||||
//
|
||||
// btnSizeAdd
|
||||
//
|
||||
btnSizeAdd.BorderWidth = 2F;
|
||||
btnSizeAdd.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
btnSizeAdd.Ghost = true;
|
||||
btnSizeAdd.IconRatio = 0F;
|
||||
btnSizeAdd.IconSvg = "";
|
||||
btnSizeAdd.Location = new Point(75, 13);
|
||||
btnSizeAdd.Name = "btnSizeAdd";
|
||||
btnSizeAdd.Size = new Size(80, 38);
|
||||
btnSizeAdd.TabIndex = 43;
|
||||
btnSizeAdd.Text = "连接相机";
|
||||
//
|
||||
// panel4
|
||||
//
|
||||
panel4.Controls.Add(pictureBox1);
|
||||
panel4.Dock = DockStyle.Fill;
|
||||
panel4.Location = new Point(0, 0);
|
||||
panel4.Name = "panel4";
|
||||
panel4.Size = new Size(691, 585);
|
||||
panel4.TabIndex = 40;
|
||||
panel4.Text = "panel4";
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
pictureBox1.BorderStyle = BorderStyle.FixedSingle;
|
||||
pictureBox1.Dock = DockStyle.Fill;
|
||||
pictureBox1.Location = new Point(0, 0);
|
||||
pictureBox1.Name = "pictureBox1";
|
||||
pictureBox1.Size = new Size(691, 585);
|
||||
pictureBox1.TabIndex = 39;
|
||||
pictureBox1.TabStop = false;
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
panel2.Controls.Add(panel4);
|
||||
panel2.Controls.Add(panel3);
|
||||
panel2.Dock = DockStyle.Fill;
|
||||
panel2.Location = new Point(218, 0);
|
||||
panel2.Name = "panel2";
|
||||
panel2.Size = new Size(691, 644);
|
||||
panel2.TabIndex = 49;
|
||||
panel2.Text = "panel2";
|
||||
//
|
||||
// label18
|
||||
//
|
||||
label18.Location = new Point(21, 19);
|
||||
label18.Name = "label18";
|
||||
label18.Size = new Size(59, 23);
|
||||
label18.TabIndex = 48;
|
||||
label18.Text = "状 态";
|
||||
//
|
||||
// swhEnable
|
||||
//
|
||||
swhEnable.CheckedText = "启用";
|
||||
swhEnable.Location = new Point(86, 9);
|
||||
swhEnable.Name = "swhEnable";
|
||||
swhEnable.Size = new Size(111, 33);
|
||||
swhEnable.TabIndex = 49;
|
||||
swhEnable.UnCheckedText = "关闭";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.Location = new Point(21, 136);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(59, 36);
|
||||
label1.TabIndex = 50;
|
||||
label1.Text = "曝 光";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.Location = new Point(21, 179);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new Size(59, 36);
|
||||
label2.TabIndex = 51;
|
||||
label2.Text = "增 益";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
label3.Location = new Point(21, 222);
|
||||
label3.Name = "label3";
|
||||
label3.Size = new Size(59, 36);
|
||||
label3.TabIndex = 52;
|
||||
label3.Text = "旋转角度";
|
||||
//
|
||||
// iptExposure
|
||||
//
|
||||
iptExposure.Location = new Point(86, 136);
|
||||
iptExposure.Name = "iptExposure";
|
||||
iptExposure.Size = new Size(111, 36);
|
||||
iptExposure.TabIndex = 53;
|
||||
iptExposure.Tag = "";
|
||||
iptExposure.Text = "0";
|
||||
//
|
||||
// iptGain
|
||||
//
|
||||
iptGain.Location = new Point(86, 179);
|
||||
iptGain.Name = "iptGain";
|
||||
iptGain.Size = new Size(111, 36);
|
||||
iptGain.TabIndex = 54;
|
||||
iptGain.Text = "0";
|
||||
//
|
||||
// iptRevolve
|
||||
//
|
||||
iptRevolve.Items.AddRange(new object[] { "0", "90", "180", "270" });
|
||||
iptRevolve.List = true;
|
||||
iptRevolve.Location = new Point(86, 222);
|
||||
iptRevolve.Name = "iptRevolve";
|
||||
iptRevolve.Size = new Size(111, 36);
|
||||
iptRevolve.TabIndex = 55;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
label4.Location = new Point(21, 265);
|
||||
label4.Name = "label4";
|
||||
label4.Size = new Size(59, 36);
|
||||
label4.TabIndex = 56;
|
||||
label4.Text = "采图模式";
|
||||
//
|
||||
// sltAcquisitionMode
|
||||
//
|
||||
sltAcquisitionMode.List = true;
|
||||
sltAcquisitionMode.Location = new Point(86, 265);
|
||||
sltAcquisitionMode.Name = "sltAcquisitionMode";
|
||||
sltAcquisitionMode.Size = new Size(111, 36);
|
||||
sltAcquisitionMode.TabIndex = 57;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
label5.Location = new Point(21, 310);
|
||||
label5.Name = "label5";
|
||||
label5.Size = new Size(59, 36);
|
||||
label5.TabIndex = 58;
|
||||
label5.Text = "触发模式";
|
||||
//
|
||||
// sltTriggerMode
|
||||
//
|
||||
sltTriggerMode.List = true;
|
||||
sltTriggerMode.Location = new Point(86, 310);
|
||||
sltTriggerMode.Name = "sltTriggerMode";
|
||||
sltTriggerMode.Size = new Size(111, 36);
|
||||
sltTriggerMode.TabIndex = 59;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
label7.Location = new Point(3, 538);
|
||||
label7.Name = "label7";
|
||||
label7.Size = new Size(29, 23);
|
||||
label7.TabIndex = 60;
|
||||
label7.Text = "ROI";
|
||||
//
|
||||
// iptROIX
|
||||
//
|
||||
iptROIX.Location = new Point(86, 470);
|
||||
iptROIX.Name = "iptROIX";
|
||||
iptROIX.Size = new Size(111, 37);
|
||||
iptROIX.TabIndex = 61;
|
||||
iptROIX.Tag = "";
|
||||
iptROIX.Text = "0";
|
||||
//
|
||||
// iptROIY
|
||||
//
|
||||
iptROIY.Location = new Point(86, 513);
|
||||
iptROIY.Name = "iptROIY";
|
||||
iptROIY.Size = new Size(111, 37);
|
||||
iptROIY.TabIndex = 62;
|
||||
iptROIY.Text = "0";
|
||||
//
|
||||
// iptROIW
|
||||
//
|
||||
iptROIW.Location = new Point(86, 556);
|
||||
iptROIW.Name = "iptROIW";
|
||||
iptROIW.Size = new Size(111, 37);
|
||||
iptROIW.TabIndex = 63;
|
||||
iptROIW.Text = "0";
|
||||
//
|
||||
// iptROIH
|
||||
//
|
||||
iptROIH.Location = new Point(86, 599);
|
||||
iptROIH.Name = "iptROIH";
|
||||
iptROIH.Size = new Size(111, 37);
|
||||
iptROIH.TabIndex = 64;
|
||||
iptROIH.Text = "0";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
label6.Location = new Point(21, 66);
|
||||
label6.Name = "label6";
|
||||
label6.Size = new Size(59, 23);
|
||||
label6.TabIndex = 65;
|
||||
label6.Text = "相 机 图";
|
||||
//
|
||||
// sthPic
|
||||
//
|
||||
sthPic.CheckedText = "启用";
|
||||
sthPic.Location = new Point(93, 60);
|
||||
sthPic.Location = new Point(86, 56);
|
||||
sthPic.Name = "sthPic";
|
||||
sthPic.Size = new Size(94, 33);
|
||||
sthPic.TabIndex = 39;
|
||||
sthPic.Size = new Size(111, 33);
|
||||
sthPic.TabIndex = 66;
|
||||
sthPic.UnCheckedText = "关闭";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
label6.Location = new Point(28, 70);
|
||||
label6.Name = "label6";
|
||||
label6.Size = new Size(59, 23);
|
||||
label6.TabIndex = 38;
|
||||
label6.Text = "相 机 图";
|
||||
//
|
||||
// label8
|
||||
//
|
||||
label8.Location = new Point(58, 408);
|
||||
label8.Location = new Point(36, 470);
|
||||
label8.Name = "label8";
|
||||
label8.Size = new Size(29, 37);
|
||||
label8.TabIndex = 40;
|
||||
label8.TabIndex = 67;
|
||||
label8.Text = "X:";
|
||||
//
|
||||
// label9
|
||||
//
|
||||
label9.Location = new Point(58, 451);
|
||||
label9.Location = new Point(36, 513);
|
||||
label9.Name = "label9";
|
||||
label9.Size = new Size(29, 37);
|
||||
label9.TabIndex = 41;
|
||||
label9.TabIndex = 68;
|
||||
label9.Text = "Y:";
|
||||
//
|
||||
// label10
|
||||
//
|
||||
label10.Location = new Point(43, 494);
|
||||
label10.Location = new Point(28, 556);
|
||||
label10.Name = "label10";
|
||||
label10.Size = new Size(44, 37);
|
||||
label10.TabIndex = 42;
|
||||
label10.TabIndex = 69;
|
||||
label10.Text = "宽度:";
|
||||
//
|
||||
// label11
|
||||
//
|
||||
label11.Location = new Point(43, 538);
|
||||
label11.Location = new Point(28, 600);
|
||||
label11.Name = "label11";
|
||||
label11.Size = new Size(44, 36);
|
||||
label11.TabIndex = 43;
|
||||
label11.TabIndex = 70;
|
||||
label11.Text = "高度:";
|
||||
//
|
||||
// label12
|
||||
//
|
||||
label12.Location = new Point(21, 402);
|
||||
label12.Name = "label12";
|
||||
label12.Size = new Size(59, 23);
|
||||
label12.TabIndex = 71;
|
||||
label12.Text = "全 画 幅";
|
||||
//
|
||||
// sthAllPic
|
||||
//
|
||||
sthAllPic.CheckedText = "启用";
|
||||
sthAllPic.Location = new Point(93, 356);
|
||||
sthAllPic.Location = new Point(86, 392);
|
||||
sthAllPic.Name = "sthAllPic";
|
||||
sthAllPic.Size = new Size(94, 33);
|
||||
sthAllPic.TabIndex = 45;
|
||||
sthAllPic.Size = new Size(111, 33);
|
||||
sthAllPic.TabIndex = 72;
|
||||
sthAllPic.UnCheckedText = "关闭";
|
||||
//
|
||||
// label12
|
||||
// label13
|
||||
//
|
||||
label12.Location = new Point(28, 366);
|
||||
label12.Name = "label12";
|
||||
label12.Size = new Size(59, 23);
|
||||
label12.TabIndex = 44;
|
||||
label12.Text = "全 画 幅";
|
||||
label13.Location = new Point(21, 95);
|
||||
label13.Name = "label13";
|
||||
label13.Size = new Size(59, 36);
|
||||
label13.TabIndex = 73;
|
||||
label13.Text = "相机类型";
|
||||
//
|
||||
// sltCamType
|
||||
//
|
||||
sltCamType.List = true;
|
||||
sltCamType.Location = new Point(93, 97);
|
||||
sltCamType.Location = new Point(86, 93);
|
||||
sltCamType.Name = "sltCamType";
|
||||
sltCamType.Size = new Size(94, 36);
|
||||
sltCamType.TabIndex = 47;
|
||||
sltCamType.Size = new Size(111, 36);
|
||||
sltCamType.TabIndex = 74;
|
||||
//
|
||||
// label13
|
||||
// label14
|
||||
//
|
||||
label13.Location = new Point(28, 99);
|
||||
label13.Name = "label13";
|
||||
label13.Size = new Size(59, 36);
|
||||
label13.TabIndex = 46;
|
||||
label13.Text = "相机类型";
|
||||
label14.Location = new Point(21, 441);
|
||||
label14.Name = "label14";
|
||||
label14.Size = new Size(59, 23);
|
||||
label14.TabIndex = 75;
|
||||
label14.Text = "变焦相机";
|
||||
//
|
||||
// switch1
|
||||
//
|
||||
switch1.CheckedText = "启用";
|
||||
switch1.Location = new Point(86, 431);
|
||||
switch1.Name = "switch1";
|
||||
switch1.Size = new Size(111, 33);
|
||||
switch1.TabIndex = 76;
|
||||
switch1.UnCheckedText = "关闭";
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
panel1.Controls.Add(sltPicType);
|
||||
panel1.Controls.Add(label15);
|
||||
panel1.Controls.Add(switch1);
|
||||
panel1.Controls.Add(label14);
|
||||
panel1.Controls.Add(sltCamType);
|
||||
panel1.Controls.Add(label13);
|
||||
panel1.Controls.Add(sthAllPic);
|
||||
panel1.Controls.Add(label12);
|
||||
panel1.Controls.Add(label11);
|
||||
panel1.Controls.Add(label10);
|
||||
panel1.Controls.Add(label9);
|
||||
panel1.Controls.Add(label8);
|
||||
panel1.Controls.Add(sthPic);
|
||||
panel1.Controls.Add(label6);
|
||||
panel1.Controls.Add(iptROIH);
|
||||
panel1.Controls.Add(iptROIW);
|
||||
panel1.Controls.Add(iptROIY);
|
||||
panel1.Controls.Add(iptROIX);
|
||||
panel1.Controls.Add(label7);
|
||||
panel1.Controls.Add(sltTriggerMode);
|
||||
panel1.Controls.Add(label5);
|
||||
panel1.Controls.Add(sltAcquisitionMode);
|
||||
panel1.Controls.Add(label4);
|
||||
panel1.Controls.Add(iptRevolve);
|
||||
panel1.Controls.Add(iptGain);
|
||||
panel1.Controls.Add(iptExposure);
|
||||
panel1.Controls.Add(label3);
|
||||
panel1.Controls.Add(label2);
|
||||
panel1.Controls.Add(label1);
|
||||
panel1.Controls.Add(swhEnable);
|
||||
panel1.Controls.Add(label18);
|
||||
panel1.Dock = DockStyle.Left;
|
||||
panel1.Location = new Point(0, 0);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new Size(218, 644);
|
||||
panel1.TabIndex = 48;
|
||||
panel1.Text = "panel1";
|
||||
//
|
||||
// sltPicType
|
||||
//
|
||||
sltPicType.List = true;
|
||||
sltPicType.Location = new Point(86, 352);
|
||||
sltPicType.Name = "sltPicType";
|
||||
sltPicType.Size = new Size(111, 36);
|
||||
sltPicType.TabIndex = 78;
|
||||
//
|
||||
// label15
|
||||
//
|
||||
label15.Location = new Point(21, 352);
|
||||
label15.Name = "label15";
|
||||
label15.Size = new Size(59, 36);
|
||||
label15.TabIndex = 77;
|
||||
label15.Text = "图片格式";
|
||||
//
|
||||
// CameraControl
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 17F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
Controls.Add(sltCamType);
|
||||
Controls.Add(label13);
|
||||
Controls.Add(sthAllPic);
|
||||
Controls.Add(label12);
|
||||
Controls.Add(label11);
|
||||
Controls.Add(label10);
|
||||
Controls.Add(label9);
|
||||
Controls.Add(label8);
|
||||
Controls.Add(sthPic);
|
||||
Controls.Add(label6);
|
||||
Controls.Add(button3);
|
||||
Controls.Add(button2);
|
||||
Controls.Add(button1);
|
||||
Controls.Add(btnSizeAdd);
|
||||
Controls.Add(pictureBox1);
|
||||
Controls.Add(iptROIH);
|
||||
Controls.Add(iptROIW);
|
||||
Controls.Add(iptROIY);
|
||||
Controls.Add(iptROIX);
|
||||
Controls.Add(label7);
|
||||
Controls.Add(sltTriggerMode);
|
||||
Controls.Add(label5);
|
||||
Controls.Add(sltAcquisitionMode);
|
||||
Controls.Add(label4);
|
||||
Controls.Add(iptRevolve);
|
||||
Controls.Add(iptGain);
|
||||
Controls.Add(iptExposure);
|
||||
Controls.Add(label3);
|
||||
Controls.Add(label2);
|
||||
Controls.Add(label1);
|
||||
Controls.Add(swhEnable);
|
||||
Controls.Add(label18);
|
||||
Controls.Add(panel2);
|
||||
Controls.Add(panel1);
|
||||
Name = "CameraControl";
|
||||
Size = new Size(909, 601);
|
||||
Size = new Size(909, 644);
|
||||
panel3.ResumeLayout(false);
|
||||
panel4.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
|
||||
panel2.ResumeLayout(false);
|
||||
panel1.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private AntdUI.Switch swhEnable;
|
||||
private AntdUI.Panel panel3;
|
||||
private AntdUI.Button button3;
|
||||
private AntdUI.Button button2;
|
||||
private AntdUI.Button button1;
|
||||
private AntdUI.Button btnSizeAdd;
|
||||
private AntdUI.Panel panel4;
|
||||
private PictureBox pictureBox1;
|
||||
private AntdUI.Panel panel2;
|
||||
private AntdUI.Label label18;
|
||||
private AntdUI.Switch swhEnable;
|
||||
private AntdUI.Label label1;
|
||||
private AntdUI.Label label2;
|
||||
private AntdUI.Label label3;
|
||||
private AntdUI.InputNumber iptExposure;
|
||||
private AntdUI.InputNumber iptGain;
|
||||
private AntdUI.InputNumber iptRevolve;
|
||||
private AntdUI.Input iptExposure;
|
||||
private AntdUI.Input iptGain;
|
||||
private AntdUI.Select iptRevolve;
|
||||
private AntdUI.Label label4;
|
||||
private AntdUI.Select sltAcquisitionMode;
|
||||
private AntdUI.Label label5;
|
||||
private AntdUI.Select sltTriggerMode;
|
||||
private AntdUI.Label label7;
|
||||
private AntdUI.InputNumber iptROIW;
|
||||
private AntdUI.InputNumber iptROIY;
|
||||
private AntdUI.InputNumber iptROIX;
|
||||
private AntdUI.InputNumber iptROIH;
|
||||
private PictureBox pictureBox1;
|
||||
private AntdUI.Button btnSizeAdd;
|
||||
private AntdUI.Button button1;
|
||||
private AntdUI.Button button2;
|
||||
private AntdUI.Button button3;
|
||||
private AntdUI.Switch sthPic;
|
||||
private AntdUI.Input iptROIX;
|
||||
private AntdUI.Input iptROIY;
|
||||
private AntdUI.Input iptROIW;
|
||||
private AntdUI.Input iptROIH;
|
||||
private AntdUI.Label label6;
|
||||
private AntdUI.Switch sthPic;
|
||||
private AntdUI.Label label8;
|
||||
private AntdUI.Label label9;
|
||||
private AntdUI.Label label10;
|
||||
private AntdUI.Label label11;
|
||||
private AntdUI.Switch sthAllPic;
|
||||
private AntdUI.Label label12;
|
||||
private AntdUI.Select sltCamType;
|
||||
private AntdUI.Switch sthAllPic;
|
||||
private AntdUI.Label label13;
|
||||
private AntdUI.Select sltCamType;
|
||||
private AntdUI.Label label14;
|
||||
private AntdUI.Switch switch1;
|
||||
private AntdUI.Panel panel1;
|
||||
private AntdUI.Select sltPicType;
|
||||
private AntdUI.Label label15;
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ using System.Windows.Forms;
|
||||
using AntdUI;
|
||||
using DH.Commons.Base;
|
||||
using DH.Commons.Enums;
|
||||
using DVPCameraType;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
using Window = AntdUI.Window;
|
||||
|
||||
@ -26,9 +27,36 @@ namespace DHSoftware.Views
|
||||
InitializeComponent();
|
||||
|
||||
sltCamType.TextChanged += SltCamTpye_TextChanged;
|
||||
sltPicType.TextChanged += SltPicTpye_TextChanged;
|
||||
InitData();
|
||||
BindData();
|
||||
}
|
||||
private void SltPicTpye_TextChanged(object? sender, EventArgs e)
|
||||
{
|
||||
if (sender is Select slt && !string.IsNullOrEmpty(slt.Text))
|
||||
{
|
||||
// 将文本转换为枚举值
|
||||
if (Enum.TryParse<dvpStreamFormat>(slt.Text, out var plcType))
|
||||
{
|
||||
switch (plcType)
|
||||
{
|
||||
case dvpStreamFormat.S_RGB24:
|
||||
case dvpStreamFormat.S_MONO8:
|
||||
|
||||
break;
|
||||
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
private void SltCamTpye_TextChanged(object? sender, EventArgs e)
|
||||
{
|
||||
if (sender is Select slt && !string.IsNullOrEmpty(slt.Text))
|
||||
@ -77,6 +105,7 @@ namespace DHSoftware.Views
|
||||
{
|
||||
|
||||
sltCamType.DataBindings.Add("Text", CameraBase, "CamType", true, DataSourceUpdateMode.OnPropertyChanged, "");
|
||||
sltPicType.DataBindings.Add("Text", CameraBase, "DvpImageFormat", true, DataSourceUpdateMode.OnPropertyChanged, "");
|
||||
sthPic.DataBindings.Add(nameof(sthPic.Checked), CameraBase, nameof(CameraBase.IsSavePicEnabled),
|
||||
true, DataSourceUpdateMode.OnPropertyChanged);
|
||||
sthAllPic.DataBindings.Add(nameof(sthAllPic.Checked), CameraBase, nameof(CameraBase.IsAllPicEnabled),
|
||||
@ -84,24 +113,23 @@ namespace DHSoftware.Views
|
||||
// 启用状态绑定
|
||||
swhEnable.DataBindings.Add(nameof(swhEnable.Checked), CameraBase, nameof(CameraBase.IsEnabled),
|
||||
true, DataSourceUpdateMode.OnPropertyChanged);
|
||||
|
||||
switch1.DataBindings.Add(nameof(switch1.Checked), CameraBase, nameof(CameraBase.IsZoomCamera),
|
||||
true, DataSourceUpdateMode.OnPropertyChanged);
|
||||
// 曝光时间绑定(假设iptExposure是NumericUpDown)
|
||||
iptExposure.DataBindings.Add(nameof(iptExposure.Value), CameraBase, nameof(CameraBase.Exposure),
|
||||
true, DataSourceUpdateMode.OnPropertyChanged, 0M, "N2");
|
||||
|
||||
iptExposure.DataBindings.Add(nameof(iptExposure.Text), CameraBase, nameof(CameraBase.Exposure));
|
||||
// 增益绑定
|
||||
iptGain.DataBindings.Add(nameof(iptGain.Value), CameraBase, nameof(CameraBase.Gain),
|
||||
true, DataSourceUpdateMode.OnPropertyChanged, 0M, "N2");
|
||||
|
||||
iptGain.DataBindings.Add(nameof(iptGain.Text), CameraBase, nameof(CameraBase.Gain));
|
||||
// 旋转角度绑定
|
||||
iptRevolve.DataBindings.Add(nameof(iptRevolve.Value), CameraBase, nameof(CameraBase.RotateImage),
|
||||
true, DataSourceUpdateMode.OnPropertyChanged, 0M, "N2");
|
||||
iptRevolve.DataBindings.Add(nameof(iptRevolve.Text), CameraBase, nameof(CameraBase.RotateImage));
|
||||
|
||||
|
||||
// ROI坐标绑定
|
||||
iptROIX.DataBindings.Add(nameof(iptROIX.Value), CameraBase, nameof(CameraBase.ROIX));
|
||||
iptROIY.DataBindings.Add(nameof(iptROIY.Value), CameraBase, nameof(CameraBase.ROIY));
|
||||
iptROIW.DataBindings.Add(nameof(iptROIW.Value), CameraBase, nameof(CameraBase.ROIW));
|
||||
iptROIH.DataBindings.Add(nameof(iptROIH.Value), CameraBase, nameof(CameraBase.ROIH));
|
||||
iptROIX.DataBindings.Add(nameof(iptROIX.Text), CameraBase, nameof(CameraBase.ROIX));
|
||||
iptROIY.DataBindings.Add(nameof(iptROIY.Text), CameraBase, nameof(CameraBase.ROIY));
|
||||
iptROIW.DataBindings.Add(nameof(iptROIW.Text), CameraBase, nameof(CameraBase.ROIW));
|
||||
iptROIH.DataBindings.Add(nameof(iptROIH.Text), CameraBase, nameof(CameraBase.ROIH));
|
||||
|
||||
// 采集模式下拉框处理
|
||||
sltAcquisitionMode.SelectedIndexChanged += (s, e) =>
|
||||
@ -118,16 +146,23 @@ namespace DHSoftware.Views
|
||||
|
||||
private void InitData()
|
||||
{
|
||||
iptRevolve.Text = Convert.ToInt32(CameraBase.RotateImage).ToString();
|
||||
// 获取枚举字段名列表(原描述改为字段名)
|
||||
sltCamType.Items.Clear();
|
||||
foreach (EnumCamType value in Enum.GetValues(typeof(EnumCamType)))
|
||||
{
|
||||
sltCamType.Items.Add(value.ToString());
|
||||
}
|
||||
sltPicType.Items.Clear();
|
||||
foreach (dvpStreamFormat value in Enum.GetValues(typeof(dvpStreamFormat)))
|
||||
{
|
||||
sltPicType.Items.Add(value.ToString());
|
||||
}
|
||||
// 初始化下拉框选项
|
||||
sltAcquisitionMode.Items.AddRange(new[] { "连续模式", "触发模式" });
|
||||
sltTriggerMode.Items.AddRange(new[] { "软触发", "硬触发" });
|
||||
|
||||
|
||||
// 设置初始选择
|
||||
sltAcquisitionMode.SelectedIndex = CameraBase.IsContinueMode ? 0 : 1;
|
||||
sltTriggerMode.SelectedIndex = CameraBase.IsHardwareTrigger ? 1 : 0;
|
||||
|
@ -3,14 +3,14 @@
|
||||
partial class CorrelatedCameraEdit
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
|
8
DHSoftware/Views/CtrlVisionDisplay.Designer.cs
generated
8
DHSoftware/Views/CtrlVisionDisplay.Designer.cs
generated
@ -3,14 +3,14 @@
|
||||
partial class CtrlVisionDisplay
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -25,7 +25,7 @@ namespace XKRS.UI.Device.Winform
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
|
8
DHSoftware/Views/DefectRowEdit.Designer.cs
generated
8
DHSoftware/Views/DefectRowEdit.Designer.cs
generated
@ -3,14 +3,14 @@
|
||||
partial class DefectRowEdit
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ namespace AntdUIDemo.Views.Table
|
||||
{
|
||||
public partial class DefectRowEdit : UserControl
|
||||
{
|
||||
DetectConfigControl detectConfigControl;
|
||||
//DetectConfigControl detectConfigControl;
|
||||
private AntdUI.Window window;
|
||||
private DefectRow user;
|
||||
public bool submit;
|
||||
|
297
DHSoftware/Views/DetectConfigControl.Designer.cs
generated
297
DHSoftware/Views/DetectConfigControl.Designer.cs
generated
@ -1,297 +0,0 @@
|
||||
namespace DHSoftware.Views
|
||||
{
|
||||
partial class DetectConfigControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
panel1 = new Panel();
|
||||
panel3 = new Panel();
|
||||
label6 = new AntdUI.Label();
|
||||
cbxDetectType = new AntdUI.Select();
|
||||
label1 = new AntdUI.Label();
|
||||
tbDetectName = new AntdUI.Input();
|
||||
btnPreOpen = new AntdUI.Button();
|
||||
tbModelpath = new AntdUI.Input();
|
||||
button3 = new AntdUI.Button();
|
||||
switchEnable = new AntdUI.Switch();
|
||||
label8 = new AntdUI.Label();
|
||||
label10 = new AntdUI.Label();
|
||||
sthPic = new AntdUI.Switch();
|
||||
sthSaveNGPic = new AntdUI.Switch();
|
||||
label7 = new AntdUI.Label();
|
||||
label9 = new AntdUI.Label();
|
||||
swSaveOKPic = new AntdUI.Switch();
|
||||
panel2 = new Panel();
|
||||
label2 = new AntdUI.Label();
|
||||
buttonDEL = new AntdUI.Button();
|
||||
table_base = new AntdUI.Table();
|
||||
buttonADD = new AntdUI.Button();
|
||||
panel1.SuspendLayout();
|
||||
panel3.SuspendLayout();
|
||||
panel2.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
panel1.BorderStyle = BorderStyle.FixedSingle;
|
||||
panel1.Controls.Add(panel3);
|
||||
panel1.Controls.Add(panel2);
|
||||
panel1.Dock = DockStyle.Fill;
|
||||
panel1.Location = new Point(0, 0);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new Size(600, 445);
|
||||
panel1.TabIndex = 0;
|
||||
//
|
||||
// panel3
|
||||
//
|
||||
panel3.Controls.Add(label6);
|
||||
panel3.Controls.Add(cbxDetectType);
|
||||
panel3.Controls.Add(label1);
|
||||
panel3.Controls.Add(tbDetectName);
|
||||
panel3.Controls.Add(btnPreOpen);
|
||||
panel3.Controls.Add(tbModelpath);
|
||||
panel3.Controls.Add(button3);
|
||||
panel3.Controls.Add(switchEnable);
|
||||
panel3.Controls.Add(label8);
|
||||
panel3.Controls.Add(label10);
|
||||
panel3.Controls.Add(sthPic);
|
||||
panel3.Controls.Add(sthSaveNGPic);
|
||||
panel3.Controls.Add(label7);
|
||||
panel3.Controls.Add(label9);
|
||||
panel3.Controls.Add(swSaveOKPic);
|
||||
panel3.Dock = DockStyle.Fill;
|
||||
panel3.Location = new Point(0, 0);
|
||||
panel3.Name = "panel3";
|
||||
panel3.Size = new Size(598, 206);
|
||||
panel3.TabIndex = 41;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
label6.Location = new Point(3, 15);
|
||||
label6.Name = "label6";
|
||||
label6.Size = new Size(58, 23);
|
||||
label6.TabIndex = 25;
|
||||
label6.Text = "检测名称";
|
||||
//
|
||||
// cbxDetectType
|
||||
//
|
||||
cbxDetectType.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
cbxDetectType.Location = new Point(341, 7);
|
||||
cbxDetectType.Name = "cbxDetectType";
|
||||
cbxDetectType.Size = new Size(226, 31);
|
||||
cbxDetectType.TabIndex = 40;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.Location = new Point(3, 44);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(73, 23);
|
||||
label1.TabIndex = 9;
|
||||
label1.Text = "模型路径";
|
||||
//
|
||||
// tbDetectName
|
||||
//
|
||||
tbDetectName.Location = new Point(82, 7);
|
||||
tbDetectName.Name = "tbDetectName";
|
||||
tbDetectName.Size = new Size(249, 31);
|
||||
tbDetectName.TabIndex = 39;
|
||||
//
|
||||
// btnPreOpen
|
||||
//
|
||||
btnPreOpen.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
btnPreOpen.Location = new Point(507, 36);
|
||||
btnPreOpen.MinimumSize = new Size(20, 0);
|
||||
btnPreOpen.Name = "btnPreOpen";
|
||||
btnPreOpen.Size = new Size(60, 31);
|
||||
btnPreOpen.TabIndex = 22;
|
||||
btnPreOpen.Text = "...";
|
||||
//
|
||||
// tbModelpath
|
||||
//
|
||||
tbModelpath.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbModelpath.Location = new Point(82, 36);
|
||||
tbModelpath.Name = "tbModelpath";
|
||||
tbModelpath.Size = new Size(415, 31);
|
||||
tbModelpath.TabIndex = 38;
|
||||
//
|
||||
// button3
|
||||
//
|
||||
button3.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
button3.Location = new Point(385, 73);
|
||||
button3.Name = "button3";
|
||||
button3.Size = new Size(182, 34);
|
||||
button3.TabIndex = 37;
|
||||
button3.Text = "查看文件夹";
|
||||
//
|
||||
// switchEnable
|
||||
//
|
||||
switchEnable.Location = new Point(82, 84);
|
||||
switchEnable.Name = "switchEnable";
|
||||
switchEnable.Size = new Size(60, 23);
|
||||
switchEnable.TabIndex = 27;
|
||||
switchEnable.Text = "switch1";
|
||||
//
|
||||
// label8
|
||||
//
|
||||
label8.Location = new Point(3, 84);
|
||||
label8.Name = "label8";
|
||||
label8.Size = new Size(58, 23);
|
||||
label8.TabIndex = 28;
|
||||
label8.Text = "模型启用";
|
||||
//
|
||||
// label10
|
||||
//
|
||||
label10.Location = new Point(176, 113);
|
||||
label10.Name = "label10";
|
||||
label10.Size = new Size(73, 23);
|
||||
label10.TabIndex = 34;
|
||||
label10.Text = "保存NG原图";
|
||||
//
|
||||
// sthPic
|
||||
//
|
||||
sthPic.Location = new Point(263, 84);
|
||||
sthPic.Name = "sthPic";
|
||||
sthPic.Size = new Size(60, 23);
|
||||
sthPic.TabIndex = 29;
|
||||
sthPic.Text = "switch2";
|
||||
//
|
||||
// sthSaveNGPic
|
||||
//
|
||||
sthSaveNGPic.Location = new Point(263, 113);
|
||||
sthSaveNGPic.Name = "sthSaveNGPic";
|
||||
sthSaveNGPic.Size = new Size(60, 23);
|
||||
sthSaveNGPic.TabIndex = 33;
|
||||
sthSaveNGPic.Text = "switch4";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
label7.Location = new Point(184, 84);
|
||||
label7.Name = "label7";
|
||||
label7.Size = new Size(58, 23);
|
||||
label7.TabIndex = 30;
|
||||
label7.Text = "数据保存";
|
||||
//
|
||||
// label9
|
||||
//
|
||||
label9.Location = new Point(3, 113);
|
||||
label9.Name = "label9";
|
||||
label9.Size = new Size(73, 23);
|
||||
label9.TabIndex = 32;
|
||||
label9.Text = "保存OK原图";
|
||||
//
|
||||
// swSaveOKPic
|
||||
//
|
||||
swSaveOKPic.Location = new Point(82, 113);
|
||||
swSaveOKPic.Name = "swSaveOKPic";
|
||||
swSaveOKPic.Size = new Size(60, 23);
|
||||
swSaveOKPic.TabIndex = 31;
|
||||
swSaveOKPic.Text = "switch3";
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
panel2.Controls.Add(label2);
|
||||
panel2.Controls.Add(buttonDEL);
|
||||
panel2.Controls.Add(table_base);
|
||||
panel2.Controls.Add(buttonADD);
|
||||
panel2.Dock = DockStyle.Bottom;
|
||||
panel2.Location = new Point(0, 206);
|
||||
panel2.Name = "panel2";
|
||||
panel2.Size = new Size(598, 237);
|
||||
panel2.TabIndex = 35;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.Location = new Point(3, 3);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new Size(58, 23);
|
||||
label2.TabIndex = 29;
|
||||
label2.Text = "模型参数";
|
||||
//
|
||||
// buttonDEL
|
||||
//
|
||||
buttonDEL.Location = new Point(93, 28);
|
||||
buttonDEL.Name = "buttonDEL";
|
||||
buttonDEL.Size = new Size(84, 34);
|
||||
buttonDEL.TabIndex = 24;
|
||||
buttonDEL.Text = "删除";
|
||||
//
|
||||
// table_base
|
||||
//
|
||||
table_base.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
table_base.Location = new Point(0, 68);
|
||||
table_base.Name = "table_base";
|
||||
table_base.Size = new Size(598, 169);
|
||||
table_base.TabIndex = 22;
|
||||
table_base.Text = "table1";
|
||||
//
|
||||
// buttonADD
|
||||
//
|
||||
buttonADD.Location = new Point(3, 28);
|
||||
buttonADD.Name = "buttonADD";
|
||||
buttonADD.Size = new Size(84, 34);
|
||||
buttonADD.TabIndex = 23;
|
||||
buttonADD.Text = "新增";
|
||||
//
|
||||
// DetectConfigControl
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 17F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
Controls.Add(panel1);
|
||||
Name = "DetectConfigControl";
|
||||
Size = new Size(600, 445);
|
||||
panel1.ResumeLayout(false);
|
||||
panel3.ResumeLayout(false);
|
||||
panel2.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Panel panel1;
|
||||
private AntdUI.Label label1;
|
||||
private AntdUI.Label label6;
|
||||
private AntdUI.Button btnPreOpen;
|
||||
private AntdUI.Label label7;
|
||||
private AntdUI.Switch sthPic;
|
||||
private AntdUI.Label label8;
|
||||
private AntdUI.Switch switchEnable;
|
||||
private AntdUI.Label label10;
|
||||
private AntdUI.Switch sthSaveNGPic;
|
||||
private AntdUI.Label label9;
|
||||
private AntdUI.Switch swSaveOKPic;
|
||||
private Panel panel2;
|
||||
private AntdUI.Button buttonDEL;
|
||||
private AntdUI.Table table_base;
|
||||
private AntdUI.Button buttonADD;
|
||||
private AntdUI.Button button3;
|
||||
private AntdUI.Input tbDetectName;
|
||||
private AntdUI.Input tbModelpath;
|
||||
private AntdUI.Label label2;
|
||||
private AntdUI.Select cbxDetectType;
|
||||
private Panel panel3;
|
||||
}
|
||||
}
|
@ -1,403 +0,0 @@
|
||||
using AntdUI;
|
||||
using AntdUIDemo.Views.Table;
|
||||
using DH.Commons.Enums;
|
||||
using DH.Devices.Vision;
|
||||
using DHSoftware.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using DH.Devices.Vision;
|
||||
using DH.Commons.Base;
|
||||
|
||||
namespace DHSoftware.Views
|
||||
{
|
||||
public partial class DetectConfigControl : UserControl
|
||||
{
|
||||
|
||||
private DetectionConfig _currentConfig = new DetectionConfig();
|
||||
private readonly string _configName;
|
||||
List<KeyValuePair<string, int>> MLModelTypes = GetFilteredEnumDescriptionsAndValues<ModelType>();
|
||||
|
||||
public static List<KeyValuePair<string, int>> GetFilteredEnumDescriptionsAndValues<T>() where T : Enum
|
||||
{
|
||||
return Enum.GetValues(typeof(T))
|
||||
.Cast<T>()
|
||||
.Select(e =>
|
||||
{
|
||||
// 获取枚举的 Description 属性,如果没有,则使用枚举的名称
|
||||
var description = e.GetType()
|
||||
.GetField(e.ToString())
|
||||
?.GetCustomAttribute<DescriptionAttribute>()
|
||||
?.Description ?? e.ToString();
|
||||
|
||||
// 返回枚举的描述和对应的整数值
|
||||
return new KeyValuePair<string, int>(description, Convert.ToInt32(e));
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
List<KeyValuePair<string, int>> resultStates = GetFilteredEnumDescriptionsAndValues<ResultState>();
|
||||
// 获取枚举的描述和对应的值,只筛选出 OK 和 NG
|
||||
public static List<KeyValuePair<string, int>> GetFilteredEnumDescriptionsAndValuesres<T>() where T : Enum
|
||||
{
|
||||
return Enum.GetValues(typeof(T))
|
||||
.Cast<T>()
|
||||
.Where(e => e.Equals(ResultState.OK) || e.Equals(ResultState.DetectNG)) // 只保留 OK 和 NG
|
||||
.Select(e =>
|
||||
{
|
||||
// 通过反射获取 DescriptionAttribute 描述,如果没有描述,则使用枚举项名称
|
||||
var description = e.GetType()
|
||||
.GetField(e.ToString())
|
||||
?.GetCustomAttribute<DescriptionAttribute>()
|
||||
?.Description ?? e.ToString(); // 如果没有 DescriptionAttribute,则使用枚举名称
|
||||
|
||||
// 返回描述和值的键值对
|
||||
return new KeyValuePair<string, int>(description, Convert.ToInt32(e));
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
|
||||
DetectionConfig Detection = new DetectionConfig();
|
||||
AntList<DefectRow> antList;
|
||||
public AntdUI.Window _window;
|
||||
DefectRow curUser;
|
||||
public DetectConfigControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
InitTableColumns();
|
||||
//InitData();
|
||||
BindEventHandler();
|
||||
foreach (var item in MLModelTypes)
|
||||
{
|
||||
cbxDetectType.Items.Add(item.Key);
|
||||
}
|
||||
cbxDetectType.SelectedIndex = (int)Detection.ModelType - 1;
|
||||
tbDetectName.Text = Detection.Name;
|
||||
|
||||
}
|
||||
|
||||
private void InitTableColumns()
|
||||
{
|
||||
table_base.Columns = new ColumnCollection() {
|
||||
new ColumnCheck("Selected"){Fixed = true},
|
||||
new Column("LabelDescription", "标签名", ColumnAlign.Center)
|
||||
{
|
||||
Width="120",
|
||||
//设置树节点,名称需和User里的User[]名称保持一致
|
||||
KeyTree = "Users"
|
||||
},
|
||||
new ColumnSwitch("IsEnable", "是否启用", ColumnAlign.Center){
|
||||
//支持点击回调
|
||||
//Call= (value,record, i_row, i_col) =>{
|
||||
// //执行耗时操作
|
||||
// Thread.Sleep(10);
|
||||
// // AntdUI.Message.info(window, value.ToString(),autoClose:1);
|
||||
// return value;
|
||||
//}
|
||||
},
|
||||
new Column("ScoreMinValue", "最小得分",ColumnAlign.Center),
|
||||
new Column("ScoreMaxValue", "最大得分",ColumnAlign.Center),
|
||||
|
||||
new Column("AreaMinValue", "最小面积",ColumnAlign.Center),
|
||||
new Column("AreaMaxValue", "最大面积",ColumnAlign.Center),
|
||||
//new Column("CellBadge", "徽标",ColumnAlign.Center),
|
||||
//new Column("CellText", "富文本")
|
||||
//{
|
||||
// ColAlign = ColumnAlign.Center,//支持表头位置单独设置
|
||||
//},
|
||||
//new Column("CellProgress", "进度条",ColumnAlign.Center),
|
||||
//new Column("CellDivider", "分割线",ColumnAlign.Center),
|
||||
//new Column("CellLinks", "链接", ColumnAlign.Center)
|
||||
//{
|
||||
// Fixed = true,//冻结列
|
||||
//},
|
||||
};
|
||||
}
|
||||
|
||||
private void InitData()
|
||||
{
|
||||
antList = new AntList<DefectRow>();
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
antList.Add(new DefectRow
|
||||
{
|
||||
LabelDescription = "张三",
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
table_base.Binding(antList);
|
||||
|
||||
//设置行禁用
|
||||
// table_base.SetRowEnable(0, false, true);
|
||||
}
|
||||
|
||||
|
||||
private void BindEventHandler()
|
||||
{
|
||||
buttonADD.Click += ButtonADD_Click;
|
||||
buttonDEL.Click += ButtonDEL_Click;
|
||||
|
||||
|
||||
table_base.CellClick += Table_base_CellClick;
|
||||
table_base.CellButtonClick += Table_base_CellButtonClick;
|
||||
}
|
||||
|
||||
|
||||
private AntdUI.Table.CellStyleInfo Table_base_SetRowStyle(object sender, TableSetRowStyleEventArgs e)
|
||||
{
|
||||
if (e.RowIndex % 2 == 0)
|
||||
{
|
||||
return new AntdUI.Table.CellStyleInfo
|
||||
{
|
||||
BackColor = AntdUI.Style.Db.ErrorBg,
|
||||
};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void ButtonADD_Click(object sender, EventArgs e)
|
||||
{
|
||||
DefectRow useradd = new DefectRow()
|
||||
{
|
||||
LabelDescription="xinquexian",
|
||||
IsEnable=true,
|
||||
ScoreMinValue=0.3,
|
||||
ScoreMaxValue=1,
|
||||
AreaMinValue=1,
|
||||
AreaMaxValue=999999999,
|
||||
|
||||
};
|
||||
var form = new DefectRowEdit(_window, useradd) { Size = new Size(700, 500) };
|
||||
AntdUI.Modal.open(new AntdUI.Modal.Config(_window, "", form, TType.None)
|
||||
{
|
||||
BtnHeight = 0,
|
||||
});
|
||||
if (form.submit)
|
||||
{
|
||||
antList.Add(useradd);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void Table_base_CellClick(object sender, TableClickEventArgs e)
|
||||
{
|
||||
var record = e.Record;
|
||||
if (record is DefectRow user)
|
||||
{
|
||||
curUser = user;
|
||||
//判断是否右键
|
||||
if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
if (antList.Count == 0) return;
|
||||
AntdUI.ContextMenuStrip.open(new AntdUI.ContextMenuStrip.Config(table_base,
|
||||
(item) =>
|
||||
{
|
||||
if (item.Text == "开启")
|
||||
{
|
||||
user.IsEnable = true;
|
||||
}
|
||||
else if (item.Text == "关闭")
|
||||
{
|
||||
user.IsEnable = false;
|
||||
}
|
||||
else if (item.Text == "编辑")
|
||||
{
|
||||
var form = new DefectRowEdit(_window, user) { Size = new Size(500, 300) };
|
||||
AntdUI.Drawer.open(new AntdUI.Drawer.Config(_window, form)
|
||||
{
|
||||
OnLoad = () =>
|
||||
{
|
||||
AntdUI.Message.info(_window, "进入编辑", autoClose: 1);
|
||||
},
|
||||
OnClose = () =>
|
||||
{
|
||||
AntdUI.Message.info(_window, "结束编辑", autoClose: 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (item.Text == "删除")
|
||||
{
|
||||
var result = Modal.open(_window, "删除警告!", "确认要删除选择的数据吗?", TType.Warn);
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
//父元素没有勾选或者子元素也没有勾选,则删除当前行
|
||||
bool delCurrent = !antList.Any(x => x.Selected /*|| (x.?.Any(u => u.Selected) ?? false)*/);
|
||||
|
||||
if (delCurrent)
|
||||
{
|
||||
//删除当前行,先判断是否父元素,再判断是否子元素,只支持一层子元素,需实现嵌套查询
|
||||
for (int i = 0; i < antList.Count; i++)
|
||||
{
|
||||
if (antList[i] == user)
|
||||
{
|
||||
antList.RemoveAt(i);
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// antList[i].Users = antList[i].Users?.Where(x => x != user).ToArray();
|
||||
//}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 使用反转for循环删除主列表中选中的项
|
||||
for (int i = antList.Count - 1; i >= 0; i--)
|
||||
{
|
||||
// 1.删除选中的主列表项
|
||||
if (antList[i].Selected)
|
||||
{
|
||||
antList.RemoveAt(i);
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// // 删除子列表中选中的项
|
||||
// antList[i].Users = antList[i].Users?.Where(childUser => !childUser.Selected).ToArray();
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else if (item.Text == "查看图片")
|
||||
{
|
||||
//查看其他来源的高清图片
|
||||
Preview.open(new Preview.Config(_window, Properties.Resources.head2));
|
||||
}
|
||||
else
|
||||
AntdUI.Message.info(_window, item.Text, autoClose: 1);
|
||||
},
|
||||
new IContextMenuStripItem[] {
|
||||
//根据行数据动态修改右键菜单
|
||||
user.IsEnable? new ContextMenuStripItem("关闭")
|
||||
{
|
||||
IconSvg = "CloseOutlined"
|
||||
}:new ContextMenuStripItem("开启")
|
||||
{
|
||||
IconSvg = "CheckOutlined"
|
||||
},
|
||||
new AntdUI.ContextMenuStripItem("编辑"){
|
||||
IconSvg = "EditOutlined",
|
||||
},
|
||||
new AntdUI.ContextMenuStripItem("删除"){
|
||||
IconSvg = "DeleteOutlined"
|
||||
},
|
||||
new ContextMenuStripItem("查看图片")
|
||||
{
|
||||
IconSvg = "FundViewOutlined"
|
||||
},
|
||||
new ContextMenuStripItemDivider(),
|
||||
new AntdUI.ContextMenuStripItem("详情"){
|
||||
Sub = new IContextMenuStripItem[]{ new AntdUI.ContextMenuStripItem("打印", "Ctrl + P") { },
|
||||
new AntdUI.ContextMenuStripItem("另存为", "Ctrl + S") { } },
|
||||
IconSvg = "<svg t=\"1725101601993\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1414\" width=\"200\" height=\"200\"><path d=\"M450.23 831.7c-164.87 0-316.85-108.51-366.94-269.68-30.4-97.82-20.9-201.62 26.76-292.29s127.79-157.35 225.6-187.75c97.83-30.42 201.61-20.9 292.29 26.76 90.67 47.67 157.35 127.79 187.75 225.61 35.78 115.12 16.24 237.58-53.6 335.99a383.494 383.494 0 0 1-43 50.66c-15.04 14.89-39.34 14.78-54.23-0.29-14.9-15.05-14.77-39.34 0.29-54.23a307.844 307.844 0 0 0 34.39-40.52c55.9-78.76 71.54-176.75 42.92-268.84-50.21-161.54-222.49-252.1-384.03-201.9-78.26 24.32-142.35 77.67-180.48 150.2-38.14 72.53-45.74 155.57-21.42 233.83 44.58 143.44 190.03 234.7 338.26 212.42 20.98-3.14 40.48 11.26 43.64 32.2 3.16 20.95-11.26 40.48-32.2 43.64a377.753 377.753 0 0 1-56 4.19z\" p-id=\"1415\"></path><path d=\"M919.84 959.5c-9.81 0-19.63-3.74-27.11-11.24L666.75 722.29c-14.98-14.97-14.98-39.25 0-54.23 14.97-14.98 39.26-14.98 54.23 0l225.97 225.97c14.98 14.97 14.98 39.25 0 54.23-7.48 7.5-17.3 11.24-27.11 11.24z\" p-id=\"1416\"></path></svg>",
|
||||
}
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//表格内部按钮事件
|
||||
private void Table_base_CellButtonClick(object sender, TableButtonEventArgs e)
|
||||
{
|
||||
var buttontext = e.Btn.Text;
|
||||
|
||||
if (e.Record is DefectRow user)
|
||||
{
|
||||
curUser = user;
|
||||
switch (buttontext)
|
||||
{
|
||||
//暂不支持进入整行编辑,只支持指定单元格编辑,推荐使用弹窗或抽屉编辑整行数据
|
||||
case "编辑":
|
||||
var form = new DefectRowEdit(_window, user) { Size = new Size(500, 300) };
|
||||
AntdUI.Drawer.open(new AntdUI.Drawer.Config(_window, form)
|
||||
{
|
||||
OnLoad = () =>
|
||||
{
|
||||
AntdUI.Message.info(_window, "进入编辑", autoClose: 1);
|
||||
},
|
||||
OnClose = () =>
|
||||
{
|
||||
AntdUI.Message.info(_window, "结束编辑", autoClose: 1);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "删除":
|
||||
var result = Modal.open(_window, "删除警告!", "确认要删除选择的数据吗?", TType.Warn);
|
||||
if (result == DialogResult.OK)
|
||||
antList.Remove(user);
|
||||
break;
|
||||
case "AntdUI":
|
||||
//超链接内容
|
||||
// AntdUI.Message.info(_window, user.CellLinks.FirstOrDefault().Id, autoClose: 1);
|
||||
break;
|
||||
case "查看图片":
|
||||
//使用clone可以防止table中的image被修改
|
||||
// Preview.open(new Preview.Config(window, (Image)curUser.CellImages[0].Image.Clone()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonDEL_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (antList.Count == 0 || !antList.Any(x => x.Selected))
|
||||
{
|
||||
bool isSubSelected = false;
|
||||
//// 判断子元素是否勾选
|
||||
//for (int i = 0; i < antList.Count; i++)
|
||||
//{
|
||||
// if (antList[i].Users != null && antList[i].Users.Any(x => x.Selected))
|
||||
// {
|
||||
// isSubSelected = true;
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
if (!isSubSelected)
|
||||
{
|
||||
AntdUI.Message.warn(_window, "请选择要删除的行!", autoClose: 3);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var result = Modal.open(_window, "删除警告!", "确认要删除选择的数据吗?", TType.Warn);
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
// 使用反转for循环删除主列表中选中的项
|
||||
for (int i = antList.Count - 1; i >= 0; i--)
|
||||
{
|
||||
// 删除选中的主列表项
|
||||
if (antList[i].Selected)
|
||||
{
|
||||
antList.RemoveAt(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 删除子列表中选中的项
|
||||
// antList[i].Users = antList[i].Users?.Where(user => !user.Selected).ToArray();
|
||||
}
|
||||
}
|
||||
// 提示删除完成
|
||||
// AntdUI.Message.success(this.w, "删除成功!", autoClose: 3);
|
||||
MessageBox.Show("删除成功!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
16
DHSoftware/Views/DetectControl.Designer.cs
generated
16
DHSoftware/Views/DetectControl.Designer.cs
generated
@ -3,14 +3,14 @@
|
||||
partial class DetectControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
@ -95,6 +95,7 @@
|
||||
tabs1.Pages.Add(tabPage1);
|
||||
tabs1.Pages.Add(tabPage2);
|
||||
tabs1.Pages.Add(tabPage3);
|
||||
tabs1.SelectedIndex = 1;
|
||||
tabs1.Size = new Size(915, 609);
|
||||
tabs1.Style = styleLine1;
|
||||
tabs1.TabIndex = 1;
|
||||
@ -252,9 +253,9 @@
|
||||
//
|
||||
label1.Location = new Point(110, 89);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(75, 23);
|
||||
label1.Size = new Size(86, 23);
|
||||
label1.TabIndex = 0;
|
||||
label1.Text = "模型路径";
|
||||
label1.Text = "预处理路径";
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
@ -285,7 +286,7 @@
|
||||
tabPage2.Controls.Add(label7);
|
||||
tabPage2.Controls.Add(iptDetectPath);
|
||||
tabPage2.Controls.Add(label8);
|
||||
tabPage2.Location = new Point(-909, -575);
|
||||
tabPage2.Location = new Point(3, 31);
|
||||
tabPage2.Name = "tabPage2";
|
||||
tabPage2.Size = new Size(909, 575);
|
||||
tabPage2.TabIndex = 1;
|
||||
@ -608,6 +609,7 @@
|
||||
Controls.Add(tabs1);
|
||||
Name = "DetectControl";
|
||||
Size = new Size(915, 609);
|
||||
Load += DetectControl_Load;
|
||||
tabs1.ResumeLayout(false);
|
||||
tabPage1.ResumeLayout(false);
|
||||
tabPage2.ResumeLayout(false);
|
||||
|
@ -15,17 +15,120 @@ namespace DHSoftware.Views
|
||||
{
|
||||
Window window;
|
||||
DetectionConfig detectionConfig;
|
||||
public DetectControl(Window _window,DetectionConfig _detection)
|
||||
public DetectControl(Window _window, DetectionConfig _detection)
|
||||
{
|
||||
window = _window;
|
||||
detectionConfig = _detection;
|
||||
InitializeComponent();
|
||||
//this.detectionConfig = detectionConfig;
|
||||
//初始化表格列头
|
||||
InitTableColumns();
|
||||
InitData();
|
||||
BindEventHandler();
|
||||
}
|
||||
foreach (var item in MLModelTypes)
|
||||
{
|
||||
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()
|
||||
{
|
||||
//预处理
|
||||
@ -41,6 +144,9 @@ namespace DHSoftware.Views
|
||||
//中处理
|
||||
btnPath2.Click += BtnPath2_Click;
|
||||
btnCorrelatedCamera.Click += BtnCorrelatedCamera_Click;
|
||||
|
||||
|
||||
|
||||
btnPic.Click += BtnPic_Click;
|
||||
btnLableAdd.Click += BtnLableAdd_Click;
|
||||
btnLableDelete.Click += BtnLableDelete_Click;
|
||||
@ -106,6 +212,8 @@ namespace DHSoftware.Views
|
||||
OnClose = () =>
|
||||
{
|
||||
AntdUI.Message.info(window, "结束编辑", autoClose: 1);
|
||||
|
||||
UpdatePreTreatCollectsFromSizeTable();
|
||||
}
|
||||
});
|
||||
break;
|
||||
@ -143,7 +251,7 @@ namespace DHSoftware.Views
|
||||
MessageBox.Show("未定义的测量类型!");
|
||||
break;
|
||||
}
|
||||
|
||||
UpdatePreTreatCollectsFromSizeTable();
|
||||
//使用clone可以防止table中的image被修改
|
||||
//Preview.open(new Preview.Config(window, (Image)SizeParamLable.CellImages[0].Image.Clone()));
|
||||
break;
|
||||
@ -489,6 +597,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()
|
||||
{
|
||||
@ -573,7 +719,7 @@ namespace DHSoftware.Views
|
||||
//2
|
||||
sthDetectStatus.DataBindings.Add("Checked", detectionConfig, "IsEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
|
||||
sthStation.DataBindings.Add("Checked", detectionConfig, "IsAddStation", true, DataSourceUpdateMode.OnPropertyChanged);
|
||||
stDetectType.DataBindings.Add("Text", detectionConfig, "ModelType",true, DataSourceUpdateMode.OnPropertyChanged);
|
||||
stDetectType.DataBindings.Add("Text", detectionConfig, "ModelType", true, DataSourceUpdateMode.OnPropertyChanged);
|
||||
iptConfidence.DataBindings.Add("Text", detectionConfig, "ModelconfThreshold", true, DataSourceUpdateMode.OnPropertyChanged);
|
||||
iptDetectPath.DataBindings.Add("Text", detectionConfig, "ModelPath", true, DataSourceUpdateMode.OnPropertyChanged);
|
||||
sthOKOriginal.DataBindings.Add("Checked", detectionConfig, "SaveOKOriginal", true, DataSourceUpdateMode.OnPropertyChanged);
|
||||
@ -613,14 +759,16 @@ namespace DHSoftware.Views
|
||||
|
||||
SizeTable.Columns = new ColumnCollection() {
|
||||
new ColumnCheck("Selected"){Fixed = true},
|
||||
new ColumnSwitch("IsEnable", "是否启用", ColumnAlign.Center),
|
||||
new Column("PreName", "测量名称",ColumnAlign.Center),
|
||||
new Column("PreType", "测量类型", ColumnAlign.Center),
|
||||
new Column("PrePix", "阈值", ColumnAlign.Center),
|
||||
new Column("ResultShow", "输入参数", ColumnAlign.Center),
|
||||
new Column("OutResultShow", "输出参数", ColumnAlign.Center),
|
||||
new Column("CellLinks", "操作", ColumnAlign.Center)
|
||||
new ColumnSwitch("IsEnable", "是否启用") {Width = "10%" },
|
||||
new Column("PreName", "测量名称") { Width = "15%" },
|
||||
new Column("PreType", "测量类型") { Width = "10%" },
|
||||
new Column("PrePix", "阈值") { Width = "5%" },
|
||||
new Column("ResultShow", "输入参数") { Width = "15%" },
|
||||
new Column("OutResultShow", "输出参数") { Width = "15%" },
|
||||
new Column("CellLinks", "操作") { Width = "30%" }
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void btnPath_Click(object? sender, EventArgs e)
|
||||
@ -644,16 +792,6 @@ namespace DHSoftware.Views
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
8
DHSoftware/Views/DetectionLableEdit.Designer.cs
generated
8
DHSoftware/Views/DetectionLableEdit.Designer.cs
generated
@ -3,14 +3,14 @@
|
||||
partial class DetectionLableEdit
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
|
2
DHSoftware/Views/FrmLog.Designer.cs
generated
2
DHSoftware/Views/FrmLog.Designer.cs
generated
@ -55,7 +55,7 @@
|
||||
this.tsmiClearLog.Name = "tsmiClearLog";
|
||||
this.tsmiClearLog.Size = new System.Drawing.Size(124, 22);
|
||||
this.tsmiClearLog.Text = "清空日志";
|
||||
this.tsmiClearLog.Click += new System.EventHandler(this.tsmiClearLog_Click);
|
||||
// this.tsmiClearLog.Click += new System.EventHandler(this.tsmiClearLog_Click);
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
|
@ -30,8 +30,11 @@ namespace DHSoftware.Views
|
||||
#region 常量配置
|
||||
private const string SOURCE_PROCESS = "流程";
|
||||
private const int LOG_NUM_LIMIT = 2000;
|
||||
private const int BATCH_SIZE = 50;
|
||||
private const int PROCESS_INTERVAL = 100;
|
||||
// private const int BATCH_SIZE = 50;
|
||||
// 调整常量配置
|
||||
private const int BATCH_SIZE = 100; // 从50提升到100
|
||||
private const int PROCESS_INTERVAL = 200; // 从100ms调整到200ms
|
||||
// private const int PROCESS_INTERVAL = 100;
|
||||
private const int FIRST_COL_WIDTH = 120;
|
||||
#endregion
|
||||
|
||||
@ -253,10 +256,16 @@ namespace DHSoftware.Views
|
||||
|
||||
private void AutoScrollIfNeeded()
|
||||
{
|
||||
if (lvLog.Items.Count > 0 /*&& chkAutoScroll.Checked*/)
|
||||
try
|
||||
{
|
||||
lvLog.EnsureVisible(lvLog.Items.Count - 1);
|
||||
if (lvLog.Items.Count > 0 /*&& chkAutoScroll.Checked*/)
|
||||
{
|
||||
lvLog.EnsureVisible(lvLog.Items.Count - 1);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void UpdateLayout()
|
||||
|
107
DHSoftware/Views/GlobalControl.Designer.cs
generated
107
DHSoftware/Views/GlobalControl.Designer.cs
generated
@ -28,7 +28,7 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AntdUI.Tabs.StyleLine styleLine1 = new AntdUI.Tabs.StyleLine();
|
||||
AntdUI.Tabs.StyleLine styleLine2 = new AntdUI.Tabs.StyleLine();
|
||||
tabs1 = new AntdUI.Tabs();
|
||||
tabPage6 = new AntdUI.TabPage();
|
||||
tabPage1 = new AntdUI.TabPage();
|
||||
@ -56,7 +56,16 @@
|
||||
panel5 = new AntdUI.Panel();
|
||||
btnStopResetDelete = new AntdUI.Button();
|
||||
btnStopResetAdd = new AntdUI.Button();
|
||||
panel6 = new AntdUI.Panel();
|
||||
panel7 = new AntdUI.Panel();
|
||||
uiLabel1 = new Sunny.UI.UILabel();
|
||||
swhEnableVibrator = new AntdUI.Switch();
|
||||
swhEnableBelt = new AntdUI.Switch();
|
||||
uiLabel2 = new Sunny.UI.UILabel();
|
||||
uiLabel3 = new Sunny.UI.UILabel();
|
||||
iptClearTime = new AntdUI.Input();
|
||||
tabs1.SuspendLayout();
|
||||
tabPage6.SuspendLayout();
|
||||
tabPage1.SuspendLayout();
|
||||
panel1.SuspendLayout();
|
||||
tabPage2.SuspendLayout();
|
||||
@ -67,6 +76,7 @@
|
||||
panel4.SuspendLayout();
|
||||
tabPage5.SuspendLayout();
|
||||
panel5.SuspendLayout();
|
||||
panel6.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// tabs1
|
||||
@ -81,13 +91,14 @@
|
||||
tabs1.Pages.Add(tabPage4);
|
||||
tabs1.Pages.Add(tabPage5);
|
||||
tabs1.Size = new Size(898, 530);
|
||||
tabs1.Style = styleLine1;
|
||||
tabs1.Style = styleLine2;
|
||||
tabs1.TabIndex = 26;
|
||||
tabs1.Text = "tabs1";
|
||||
tabs1.SelectedIndex = 1;
|
||||
//
|
||||
// tabPage6
|
||||
//
|
||||
tabPage6.Controls.Add(panel7);
|
||||
tabPage6.Controls.Add(panel6);
|
||||
tabPage6.Location = new Point(3, 28);
|
||||
tabPage6.Name = "tabPage6";
|
||||
tabPage6.Size = new Size(892, 499);
|
||||
@ -372,6 +383,86 @@
|
||||
btnStopResetAdd.Type = AntdUI.TTypeMini.Primary;
|
||||
btnStopResetAdd.WaveSize = 0;
|
||||
//
|
||||
// panel6
|
||||
//
|
||||
panel6.Controls.Add(iptClearTime);
|
||||
panel6.Controls.Add(uiLabel3);
|
||||
panel6.Controls.Add(swhEnableBelt);
|
||||
panel6.Controls.Add(uiLabel2);
|
||||
panel6.Controls.Add(swhEnableVibrator);
|
||||
panel6.Controls.Add(uiLabel1);
|
||||
panel6.Dock = DockStyle.Left;
|
||||
panel6.Location = new Point(0, 0);
|
||||
panel6.Name = "panel6";
|
||||
panel6.Size = new Size(427, 499);
|
||||
panel6.TabIndex = 0;
|
||||
panel6.Text = "panel6";
|
||||
//
|
||||
// panel7
|
||||
//
|
||||
panel7.Dock = DockStyle.Fill;
|
||||
panel7.Location = new Point(427, 0);
|
||||
panel7.Name = "panel7";
|
||||
panel7.Size = new Size(465, 499);
|
||||
panel7.TabIndex = 1;
|
||||
panel7.Text = "panel7";
|
||||
//
|
||||
// uiLabel1
|
||||
//
|
||||
uiLabel1.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
uiLabel1.ForeColor = Color.FromArgb(48, 48, 48);
|
||||
uiLabel1.Location = new Point(28, 36);
|
||||
uiLabel1.Name = "uiLabel1";
|
||||
uiLabel1.Size = new Size(63, 23);
|
||||
uiLabel1.TabIndex = 0;
|
||||
uiLabel1.Text = "振动盘";
|
||||
//
|
||||
// swhEnableVibrator
|
||||
//
|
||||
swhEnableVibrator.CheckedText = "启用";
|
||||
swhEnableVibrator.Location = new Point(97, 26);
|
||||
swhEnableVibrator.Name = "swhEnableVibrator";
|
||||
swhEnableVibrator.Size = new Size(94, 33);
|
||||
swhEnableVibrator.TabIndex = 50;
|
||||
swhEnableVibrator.UnCheckedText = "关闭";
|
||||
//
|
||||
// swhEnableBelt
|
||||
//
|
||||
swhEnableBelt.CheckedText = "启用";
|
||||
swhEnableBelt.Location = new Point(97, 82);
|
||||
swhEnableBelt.Name = "swhEnableBelt";
|
||||
swhEnableBelt.Size = new Size(94, 33);
|
||||
swhEnableBelt.TabIndex = 52;
|
||||
swhEnableBelt.UnCheckedText = "关闭";
|
||||
//
|
||||
// uiLabel2
|
||||
//
|
||||
uiLabel2.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
uiLabel2.ForeColor = Color.FromArgb(48, 48, 48);
|
||||
uiLabel2.Location = new Point(28, 92);
|
||||
uiLabel2.Name = "uiLabel2";
|
||||
uiLabel2.Size = new Size(63, 23);
|
||||
uiLabel2.TabIndex = 51;
|
||||
uiLabel2.Text = "皮带";
|
||||
//
|
||||
// uiLabel3
|
||||
//
|
||||
uiLabel3.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
uiLabel3.ForeColor = Color.FromArgb(48, 48, 48);
|
||||
uiLabel3.Location = new Point(17, 142);
|
||||
uiLabel3.Name = "uiLabel3";
|
||||
uiLabel3.Size = new Size(74, 23);
|
||||
uiLabel3.TabIndex = 53;
|
||||
uiLabel3.Text = "清料时间";
|
||||
//
|
||||
// iptClearTime
|
||||
//
|
||||
iptClearTime.Location = new Point(97, 131);
|
||||
iptClearTime.Name = "iptClearTime";
|
||||
iptClearTime.Size = new Size(94, 43);
|
||||
iptClearTime.TabIndex = 54;
|
||||
iptClearTime.Text = "0";
|
||||
//
|
||||
// GlobalControl
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 17F);
|
||||
@ -380,6 +471,7 @@
|
||||
Name = "GlobalControl";
|
||||
Size = new Size(898, 530);
|
||||
tabs1.ResumeLayout(false);
|
||||
tabPage6.ResumeLayout(false);
|
||||
tabPage1.ResumeLayout(false);
|
||||
panel1.ResumeLayout(false);
|
||||
tabPage2.ResumeLayout(false);
|
||||
@ -390,6 +482,7 @@
|
||||
panel4.ResumeLayout(false);
|
||||
tabPage5.ResumeLayout(false);
|
||||
panel5.ResumeLayout(false);
|
||||
panel6.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
@ -421,5 +514,13 @@
|
||||
private AntdUI.Button btnAdd;
|
||||
private AntdUI.Button btnDelete;
|
||||
private AntdUI.TabPage tabPage6;
|
||||
private AntdUI.Panel panel7;
|
||||
private AntdUI.Panel panel6;
|
||||
private Sunny.UI.UILabel uiLabel1;
|
||||
private AntdUI.Switch swhEnableBelt;
|
||||
private Sunny.UI.UILabel uiLabel2;
|
||||
private AntdUI.Switch swhEnableVibrator;
|
||||
private Sunny.UI.UILabel uiLabel3;
|
||||
private AntdUI.Input iptClearTime;
|
||||
}
|
||||
}
|
||||
|
@ -691,7 +691,10 @@ namespace DHSoftware.Views
|
||||
private void InitData()
|
||||
{
|
||||
|
||||
|
||||
// 启用状态绑定
|
||||
swhEnableVibrator.DataBindings.Add("Checked", global, "EnableVibrator", true, DataSourceUpdateMode.OnPropertyChanged);
|
||||
swhEnableBelt.DataBindings.Add("Checked", global, "EnableBelt", true, DataSourceUpdateMode.OnPropertyChanged);
|
||||
iptClearTime.DataBindings.Add("Text", global, "ClearTime", true, DataSourceUpdateMode.OnPropertyChanged);
|
||||
|
||||
TableInitProcess.Columns = new ColumnCollection() {
|
||||
new ColumnCheck("Selected"){Fixed = true},
|
||||
|
8
DHSoftware/Views/ImageViewerControl.Designer.cs
generated
8
DHSoftware/Views/ImageViewerControl.Designer.cs
generated
@ -11,14 +11,6 @@
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
|
@ -16,54 +16,61 @@ namespace DHSoftware.Views
|
||||
private Bitmap _currentImage;
|
||||
private float _scale = 1.0f;
|
||||
private PointF _offset = PointF.Empty;
|
||||
private RectangleF _roiRect;
|
||||
private PointF _roiStart;
|
||||
private bool _isDrawing;
|
||||
private Point _dragStart;
|
||||
private bool _isDragging;
|
||||
private Pen _roiPen = new Pen(Color.Red, 2);
|
||||
private readonly object _imageLock = new object();
|
||||
#endregion
|
||||
|
||||
#region 公开属性
|
||||
#region 公开属性
|
||||
public Bitmap Image
|
||||
{
|
||||
get => _currentImage;
|
||||
get
|
||||
{
|
||||
lock (_imageLock)
|
||||
{
|
||||
return _currentImage?.Clone() as Bitmap;
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
// 记录旧状态
|
||||
var oldSize = _currentImage?.Size ?? Size.Empty;
|
||||
var oldScale = _scale;
|
||||
var oldOffset = _offset;
|
||||
Bitmap newImage = value?.Clone() as Bitmap;
|
||||
Bitmap oldImageToDispose = null;
|
||||
|
||||
_currentImage?.Dispose();
|
||||
_currentImage = value;
|
||||
|
||||
if (_currentImage != null)
|
||||
lock (_imageLock)
|
||||
{
|
||||
if (_currentImage.Size != oldSize)
|
||||
// 交换图像引用
|
||||
oldImageToDispose = _currentImage;
|
||||
_currentImage = newImage;
|
||||
|
||||
if (_currentImage != null)
|
||||
{
|
||||
// 尺寸不同时:重置ROI、自动适配
|
||||
_roiRect = RectangleF.Empty;
|
||||
AutoFit();
|
||||
}
|
||||
else
|
||||
{
|
||||
// 尺寸相同时:保留缩放和偏移
|
||||
_scale = oldScale;
|
||||
_offset = oldOffset;
|
||||
ClampOffset();
|
||||
if (oldImageToDispose?.Size != _currentImage.Size)
|
||||
{
|
||||
AutoFit();
|
||||
}
|
||||
else
|
||||
{
|
||||
ClampOffset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pictureBox.Invalidate();
|
||||
// 在锁外安全释放旧图像
|
||||
if (oldImageToDispose != null)
|
||||
{
|
||||
// 使用BeginInvoke确保在UI线程释放资源
|
||||
BeginInvoke(new Action(() =>
|
||||
{
|
||||
oldImageToDispose.Dispose();
|
||||
oldImageToDispose = null;
|
||||
}));
|
||||
}
|
||||
|
||||
SafeInvalidate();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public RectangleF CurrentROI => _roiRect;
|
||||
#endregion
|
||||
|
||||
public ImageViewerControl()
|
||||
{
|
||||
InitializeComponents();
|
||||
@ -73,15 +80,13 @@ namespace DHSoftware.Views
|
||||
#region 初始化
|
||||
private void InitializeComponents()
|
||||
{
|
||||
// 主显示区域
|
||||
pictureBox = new PictureBox
|
||||
{
|
||||
Dock = DockStyle.Fill,
|
||||
BackColor = Color.DarkGray,
|
||||
Cursor = Cursors.Cross
|
||||
Cursor = Cursors.Hand
|
||||
};
|
||||
|
||||
// 状态栏
|
||||
statusLabel = new Label
|
||||
{
|
||||
Dock = DockStyle.Bottom,
|
||||
@ -91,7 +96,6 @@ namespace DHSoftware.Views
|
||||
Font = new Font("Consolas", 10)
|
||||
};
|
||||
|
||||
// 事件绑定
|
||||
pictureBox.MouseDown += PictureBox_MouseDown;
|
||||
pictureBox.MouseMove += PictureBox_MouseMove;
|
||||
pictureBox.MouseUp += PictureBox_MouseUp;
|
||||
@ -106,8 +110,8 @@ namespace DHSoftware.Views
|
||||
{
|
||||
typeof(PictureBox).GetMethod("SetStyle",
|
||||
System.Reflection.BindingFlags.NonPublic |
|
||||
System.Reflection.BindingFlags.Instance)
|
||||
?.Invoke(pictureBox, new object[] {
|
||||
System.Reflection.BindingFlags.Instance)?
|
||||
.Invoke(pictureBox, new object[] {
|
||||
ControlStyles.OptimizedDoubleBuffer |
|
||||
ControlStyles.AllPaintingInWmPaint,
|
||||
true
|
||||
@ -118,189 +122,225 @@ namespace DHSoftware.Views
|
||||
#region 核心功能
|
||||
private void AutoFit()
|
||||
{
|
||||
if (_currentImage == null) return;
|
||||
lock (_imageLock)
|
||||
{
|
||||
if (_currentImage == null) return;
|
||||
|
||||
const float marginRatio = 0.1f;
|
||||
float marginWidth = Width * marginRatio;
|
||||
float marginHeight = Height * marginRatio;
|
||||
const float marginRatio = 0.1f;
|
||||
float marginWidth = Width * marginRatio;
|
||||
float marginHeight = Height * marginRatio;
|
||||
|
||||
_scale = Math.Min(
|
||||
(Width - marginWidth * 2) / _currentImage.Width,
|
||||
(Height - marginHeight * 2) / _currentImage.Height
|
||||
);
|
||||
_scale = Math.Min(
|
||||
(Width - marginWidth * 2) / _currentImage.Width,
|
||||
(Height - marginHeight * 2) / _currentImage.Height
|
||||
);
|
||||
|
||||
_offset.X = marginWidth + (Width - marginWidth * 2 - _currentImage.Width * _scale) / 2;
|
||||
_offset.Y = marginHeight + (Height - marginHeight * 2 - _currentImage.Height * _scale) / 2;
|
||||
_offset.X = marginWidth + (Width - marginWidth * 2 - _currentImage.Width * _scale) / 2;
|
||||
_offset.Y = marginHeight + (Height - marginHeight * 2 - _currentImage.Height * _scale) / 2;
|
||||
|
||||
ClampOffset();
|
||||
}
|
||||
}
|
||||
|
||||
private void PictureBox_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
if (_currentImage == null) return;
|
||||
Bitmap drawImage = null;
|
||||
RectangleF destRect;
|
||||
float scale;
|
||||
PointF offset;
|
||||
|
||||
// 绘制图像
|
||||
var destRect = new RectangleF(
|
||||
_offset.X,
|
||||
_offset.Y,
|
||||
_currentImage.Width * _scale,
|
||||
_currentImage.Height * _scale);
|
||||
|
||||
e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||
e.Graphics.DrawImage(_currentImage, destRect);
|
||||
|
||||
// 绘制ROI
|
||||
if (!_roiRect.IsEmpty)
|
||||
// 创建临时绘图参数
|
||||
lock (_imageLock)
|
||||
{
|
||||
var displayRect = new RectangleF(
|
||||
_roiRect.X * _scale + _offset.X,
|
||||
_roiRect.Y * _scale + _offset.Y,
|
||||
_roiRect.Width * _scale,
|
||||
_roiRect.Height * _scale);
|
||||
if (_currentImage == null) return;
|
||||
|
||||
using (var pen = new Pen(_roiPen.Color, _roiPen.Width / _scale))
|
||||
{
|
||||
e.Graphics.DrawRectangle(pen,
|
||||
displayRect.X,
|
||||
displayRect.Y,
|
||||
displayRect.Width,
|
||||
displayRect.Height);
|
||||
}
|
||||
// 创建绘图副本
|
||||
drawImage = _currentImage.Clone() as Bitmap;
|
||||
scale = _scale;
|
||||
offset = _offset;
|
||||
|
||||
destRect = new RectangleF(
|
||||
offset.X,
|
||||
offset.Y,
|
||||
drawImage.Width * scale,
|
||||
drawImage.Height * scale);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||
e.Graphics.DrawImage(drawImage, destRect);
|
||||
}
|
||||
finally
|
||||
{
|
||||
drawImage?.Dispose();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 鼠标事件
|
||||
#region 鼠标交互(左键拖动)
|
||||
private void PictureBox_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left && _currentImage != null)
|
||||
if (InvokeRequired) return;
|
||||
|
||||
lock (_imageLock)
|
||||
{
|
||||
_roiStart = ClampCoordinates(ConvertToImageCoords(e.Location));
|
||||
_isDrawing = true;
|
||||
}
|
||||
else if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
_dragStart = e.Location;
|
||||
_isDragging = true;
|
||||
if (_currentImage == null) return;
|
||||
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
_dragStart = e.Location;
|
||||
_isDragging = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void PictureBox_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (_isDragging)
|
||||
{
|
||||
_offset.X += e.X - _dragStart.X;
|
||||
_offset.Y += e.Y - _dragStart.Y;
|
||||
_dragStart = e.Location;
|
||||
ClampOffset();
|
||||
pictureBox.Invalidate();
|
||||
}
|
||||
else if (_isDrawing && _currentImage != null)
|
||||
{
|
||||
PointF current = ClampCoordinates(ConvertToImageCoords(e.Location));
|
||||
_roiRect = new RectangleF(
|
||||
Math.Min(_roiStart.X, current.X),
|
||||
Math.Min(_roiStart.Y, current.Y),
|
||||
Math.Abs(_roiStart.X - current.X),
|
||||
Math.Abs(_roiStart.Y - current.Y)
|
||||
);
|
||||
pictureBox.Invalidate();
|
||||
}
|
||||
if (InvokeRequired) return;
|
||||
|
||||
UpdateStatus(e.Location);
|
||||
lock (_imageLock)
|
||||
{
|
||||
if (_currentImage == null) return;
|
||||
|
||||
if (_isDragging)
|
||||
{
|
||||
_offset.X += e.X - _dragStart.X;
|
||||
_offset.Y += e.Y - _dragStart.Y;
|
||||
_dragStart = e.Location;
|
||||
ClampOffset();
|
||||
SafeInvalidate();
|
||||
}
|
||||
|
||||
UpdateStatus(e.Location);
|
||||
}
|
||||
}
|
||||
|
||||
private void PictureBox_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
_isDragging = false;
|
||||
_isDrawing = false;
|
||||
lock (_imageLock)
|
||||
{
|
||||
_isDragging = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void PictureBox_MouseWheel(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (_currentImage == null) return;
|
||||
if (InvokeRequired) return;
|
||||
|
||||
PointF mousePos = e.Location;
|
||||
PointF imgPosBefore = ConvertToImageCoords(mousePos);
|
||||
lock (_imageLock)
|
||||
{
|
||||
if (_currentImage == null) return;
|
||||
|
||||
if (imgPosBefore.X < 0 || imgPosBefore.X > _currentImage.Width ||
|
||||
imgPosBefore.Y < 0 || imgPosBefore.Y > _currentImage.Height) return;
|
||||
PointF imgPos = ConvertToImageCoords(e.Location);
|
||||
if (imgPos.X < 0 || imgPos.X > _currentImage.Width ||
|
||||
imgPos.Y < 0 || imgPos.Y > _currentImage.Height)
|
||||
return;
|
||||
|
||||
float zoom = e.Delta > 0 ? 1.1f : 0.9f;
|
||||
float newScale = Math.Clamp(_scale * zoom, 0.1f, 10f);
|
||||
float zoom = e.Delta > 0 ? 1.1f : 0.9f;
|
||||
float newScale = Math.Clamp(_scale * zoom, 0.1f, 10f);
|
||||
|
||||
_offset.X = mousePos.X - imgPosBefore.X * newScale;
|
||||
_offset.Y = mousePos.Y - imgPosBefore.Y * newScale;
|
||||
_offset.X = e.Location.X - imgPos.X * newScale;
|
||||
_offset.Y = e.Location.Y - imgPos.Y * newScale;
|
||||
|
||||
_scale = newScale;
|
||||
ClampOffset();
|
||||
pictureBox.Invalidate();
|
||||
_scale = newScale;
|
||||
ClampOffset();
|
||||
SafeInvalidate();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 辅助方法
|
||||
private PointF ConvertToImageCoords(PointF mousePos)
|
||||
private PointF ConvertToImageCoords(Point mousePos)
|
||||
{
|
||||
return new PointF(
|
||||
(mousePos.X - _offset.X) / _scale,
|
||||
(mousePos.Y - _offset.Y) / _scale);
|
||||
}
|
||||
|
||||
private PointF ClampCoordinates(PointF point)
|
||||
{
|
||||
return new PointF(
|
||||
Math.Max(0, Math.Min(_currentImage.Width, point.X)),
|
||||
Math.Max(0, Math.Min(_currentImage.Height, point.Y)));
|
||||
lock (_imageLock)
|
||||
{
|
||||
if (_currentImage == null) return PointF.Empty;
|
||||
return new PointF(
|
||||
(mousePos.X - _offset.X) / _scale,
|
||||
(mousePos.Y - _offset.Y) / _scale);
|
||||
}
|
||||
}
|
||||
|
||||
private void ClampOffset()
|
||||
{
|
||||
if (_currentImage == null) return;
|
||||
lock (_imageLock)
|
||||
{
|
||||
if (_currentImage == null) return;
|
||||
|
||||
float imgWidth = _currentImage.Width * _scale;
|
||||
float imgHeight = _currentImage.Height * _scale;
|
||||
float imgWidth = _currentImage.Width * _scale;
|
||||
float imgHeight = _currentImage.Height * _scale;
|
||||
|
||||
if (imgWidth <= Width)
|
||||
{
|
||||
_offset.X = Math.Clamp(_offset.X, 0, Width - imgWidth);
|
||||
}
|
||||
else
|
||||
{
|
||||
_offset.X = Math.Clamp(_offset.X, Width - imgWidth, 0);
|
||||
}
|
||||
_offset.X = Math.Clamp(_offset.X,
|
||||
imgWidth > Width ? Width - imgWidth : 0,
|
||||
imgWidth > Width ? 0 : Width - imgWidth);
|
||||
|
||||
if (imgHeight <= Height)
|
||||
{
|
||||
_offset.Y = Math.Clamp(_offset.Y, 0, Height - imgHeight);
|
||||
}
|
||||
else
|
||||
{
|
||||
_offset.Y = Math.Clamp(_offset.Y, Height - imgHeight, 0);
|
||||
_offset.Y = Math.Clamp(_offset.Y,
|
||||
imgHeight > Height ? Height - imgHeight : 0,
|
||||
imgHeight > Height ? 0 : Height - imgHeight);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateStatus(Point mousePos)
|
||||
{
|
||||
if (_currentImage == null) return;
|
||||
if (InvokeRequired)
|
||||
{
|
||||
BeginInvoke(new Action<Point>(UpdateStatus), mousePos);
|
||||
return;
|
||||
}
|
||||
|
||||
PointF imgPos = ConvertToImageCoords(mousePos);
|
||||
bool inImage = imgPos.X >= 0 && imgPos.X <= _currentImage.Width &&
|
||||
imgPos.Y >= 0 && imgPos.Y <= _currentImage.Height;
|
||||
lock (_imageLock)
|
||||
{
|
||||
if (_currentImage == null)
|
||||
{
|
||||
statusLabel.Text = "无有效图像";
|
||||
return;
|
||||
}
|
||||
|
||||
string roiInfo = _roiRect.IsEmpty ?
|
||||
"未选择区域" :
|
||||
$"选区: X={_roiRect.X:0} Y={_roiRect.Y:0} {_roiRect.Width:0}x{_roiRect.Height:0}";
|
||||
PointF imgPos = ConvertToImageCoords(mousePos);
|
||||
bool inImage = imgPos.X >= 0 && imgPos.X <= _currentImage.Width &&
|
||||
imgPos.Y >= 0 && imgPos.Y <= _currentImage.Height;
|
||||
|
||||
statusLabel.Text = inImage ?
|
||||
$"坐标: ({imgPos.X:0}, {imgPos.Y:0}) | 缩放: {_scale * 100:0}% | {roiInfo}" :
|
||||
$"图像尺寸: {_currentImage.Width}x{_currentImage.Height} | 缩放: {_scale * 100:0}% | {roiInfo}";
|
||||
statusLabel.Text = inImage ?
|
||||
$"坐标: ({imgPos.X:F1}, {imgPos.Y:F1}) | 缩放: {_scale * 100:0}%" :
|
||||
$"图像尺寸: {_currentImage.Width}x{_currentImage.Height} | 缩放: {_scale * 100:0}%";
|
||||
}
|
||||
}
|
||||
|
||||
public void ClearROI()
|
||||
private void SafeInvalidate()
|
||||
{
|
||||
_roiRect = RectangleF.Empty;
|
||||
pictureBox.Invalidate(); // 触发重绘
|
||||
UpdateStatus(Point.Empty); // 更新状态栏
|
||||
if (InvokeRequired)
|
||||
{
|
||||
BeginInvoke(new Action(pictureBox.Invalidate));
|
||||
}
|
||||
else
|
||||
{
|
||||
pictureBox.Invalidate();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public Bitmap GetCurrentSnapshot()
|
||||
{
|
||||
lock (_imageLock)
|
||||
{
|
||||
// 返回深拷贝防止原始图像被修改
|
||||
return _currentImage?.Clone() as Bitmap;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
lock (_imageLock)
|
||||
{
|
||||
_currentImage?.Dispose();
|
||||
_currentImage = null;
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
}
|
||||
}
|
8
DHSoftware/Views/PreTreatEdit.Designer.cs
generated
8
DHSoftware/Views/PreTreatEdit.Designer.cs
generated
@ -3,14 +3,14 @@
|
||||
partial class PreTreatEdit
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// 必需的设计器变量
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// 清理所有正在使用的资源
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false </param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// 使用代码编辑器修改此方法的内容
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user