mirror of
https://github.com/eggplantlwj/VisionEdit.git
synced 2026-03-30 04:28:38 +08:00
添加Log窗体,添加工具类及Job类
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,23 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
|
||||
namespace VisionEdit
|
||||
{
|
||||
public class DockPanelOperate
|
||||
{
|
||||
private string m_DockPath { get; set; } = string.Empty;
|
||||
|
||||
public DockPanelOperate()
|
||||
{
|
||||
m_DockPath = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "DockPanel.config");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
9
VisionEdit/FormLib/FormImageWindow.Designer.cs
generated
9
VisionEdit/FormLib/FormImageWindow.Designer.cs
generated
@@ -38,14 +38,16 @@
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.panel1.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 32);
|
||||
this.panel1.Location = new System.Drawing.Point(0, 28);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(899, 546);
|
||||
this.panel1.Size = new System.Drawing.Size(899, 552);
|
||||
this.panel1.TabIndex = 0;
|
||||
//
|
||||
// comboBox1
|
||||
//
|
||||
this.comboBox1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.comboBox1.FormattingEnabled = true;
|
||||
this.comboBox1.Location = new System.Drawing.Point(0, 0);
|
||||
@@ -60,6 +62,7 @@
|
||||
this.ClientSize = new System.Drawing.Size(899, 580);
|
||||
this.Controls.Add(this.comboBox1);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.Name = "FormImageWindow";
|
||||
this.Text = "图像显示";
|
||||
this.Load += new System.EventHandler(this.FormImageWindow_Load);
|
||||
|
||||
62
VisionEdit/FormLib/FormLog.Designer.cs
generated
Normal file
62
VisionEdit/FormLib/FormLog.Designer.cs
generated
Normal file
@@ -0,0 +1,62 @@
|
||||
namespace VisionEdit.FormLib
|
||||
{
|
||||
partial class FormLog
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
this.lbLog = new System.Windows.Forms.ListBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lbLog
|
||||
//
|
||||
this.lbLog.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lbLog.FormattingEnabled = true;
|
||||
this.lbLog.ItemHeight = 12;
|
||||
this.lbLog.Location = new System.Drawing.Point(0, 0);
|
||||
this.lbLog.Name = "lbLog";
|
||||
this.lbLog.Size = new System.Drawing.Size(885, 256);
|
||||
this.lbLog.TabIndex = 0;
|
||||
//
|
||||
// FormLog
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(885, 256);
|
||||
this.Controls.Add(this.lbLog);
|
||||
this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Name = "FormLog";
|
||||
this.Text = "日志";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ListBox lbLog;
|
||||
}
|
||||
}
|
||||
32
VisionEdit/FormLib/FormLog.cs
Normal file
32
VisionEdit/FormLib/FormLog.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
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 WeifenLuo.WinFormsUI.Docking;
|
||||
|
||||
namespace VisionEdit.FormLib
|
||||
{
|
||||
public partial class FormLog : DockContent
|
||||
{
|
||||
public FormLog()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void ShowLog(string Mes)
|
||||
{
|
||||
this.Invoke((MethodInvoker)delegate
|
||||
{
|
||||
if (lbLog.Items.Count > 200) lbLog.Items.Clear();
|
||||
string time = DateTime.Now.ToString("HH:mm:ss.fff");
|
||||
lbLog.Items.Add(time + " "+ Mes);
|
||||
lbLog.SelectedIndex = lbLog.Items.Count - 1;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
120
VisionEdit/FormLib/FormLog.resx
Normal file
120
VisionEdit/FormLib/FormLog.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>
|
||||
160
VisionEdit/FormLib/FormToolBox.Designer.cs
generated
160
VisionEdit/FormLib/FormToolBox.Designer.cs
generated
@@ -29,99 +29,85 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("流程");
|
||||
System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("Halcon窗口");
|
||||
System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("Basler");
|
||||
System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("HIKVision");
|
||||
System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("获取图像", new System.Windows.Forms.TreeNode[] {
|
||||
treeNode2,
|
||||
treeNode3,
|
||||
treeNode4});
|
||||
System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("滤波");
|
||||
System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("平滑");
|
||||
System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("去噪");
|
||||
System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("图像预处理", new System.Windows.Forms.TreeNode[] {
|
||||
treeNode6,
|
||||
treeNode7,
|
||||
treeNode8});
|
||||
System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("形状匹配");
|
||||
System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("可变形匹配");
|
||||
System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("灰度匹配");
|
||||
System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("匹配", new System.Windows.Forms.TreeNode[] {
|
||||
treeNode10,
|
||||
treeNode11,
|
||||
treeNode12});
|
||||
System.Windows.Forms.TreeNode treeNode14 = new System.Windows.Forms.TreeNode("流程");
|
||||
System.Windows.Forms.TreeNode treeNode15 = new System.Windows.Forms.TreeNode("Halcon窗口");
|
||||
System.Windows.Forms.TreeNode treeNode16 = new System.Windows.Forms.TreeNode("Basler");
|
||||
System.Windows.Forms.TreeNode treeNode17 = new System.Windows.Forms.TreeNode("HIKVision");
|
||||
System.Windows.Forms.TreeNode treeNode18 = new System.Windows.Forms.TreeNode("获取图像", new System.Windows.Forms.TreeNode[] {
|
||||
treeNode15,
|
||||
treeNode16,
|
||||
treeNode17});
|
||||
System.Windows.Forms.TreeNode treeNode19 = new System.Windows.Forms.TreeNode("滤波");
|
||||
System.Windows.Forms.TreeNode treeNode20 = new System.Windows.Forms.TreeNode("平滑");
|
||||
System.Windows.Forms.TreeNode treeNode21 = new System.Windows.Forms.TreeNode("去噪");
|
||||
System.Windows.Forms.TreeNode treeNode22 = new System.Windows.Forms.TreeNode("图像预处理", new System.Windows.Forms.TreeNode[] {
|
||||
treeNode19,
|
||||
treeNode20,
|
||||
treeNode21});
|
||||
System.Windows.Forms.TreeNode treeNode23 = new System.Windows.Forms.TreeNode("形状匹配");
|
||||
System.Windows.Forms.TreeNode treeNode24 = new System.Windows.Forms.TreeNode("可变形匹配");
|
||||
System.Windows.Forms.TreeNode treeNode25 = new System.Windows.Forms.TreeNode("灰度匹配");
|
||||
System.Windows.Forms.TreeNode treeNode26 = new System.Windows.Forms.TreeNode("匹配", new System.Windows.Forms.TreeNode[] {
|
||||
treeNode23,
|
||||
treeNode24,
|
||||
treeNode25});
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormToolBox));
|
||||
this.tvw_ToolBox = new System.Windows.Forms.TreeView();
|
||||
this.richTextBoxEx1 = new DevComponents.DotNetBar.Controls.RichTextBoxEx();
|
||||
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
|
||||
this.richTextBoxEx1 = new DevComponents.DotNetBar.Controls.RichTextBoxEx();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tvw_ToolBox
|
||||
//
|
||||
this.tvw_ToolBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
this.tvw_ToolBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tvw_ToolBox.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.tvw_ToolBox.ImageIndex = 4;
|
||||
this.tvw_ToolBox.ImageList = this.imageList1;
|
||||
this.tvw_ToolBox.Indent = 32;
|
||||
this.tvw_ToolBox.Location = new System.Drawing.Point(3, 4);
|
||||
this.tvw_ToolBox.Location = new System.Drawing.Point(0, 4);
|
||||
this.tvw_ToolBox.Name = "tvw_ToolBox";
|
||||
treeNode1.ImageIndex = 1;
|
||||
treeNode1.Name = "NodeJob";
|
||||
treeNode1.Text = "流程";
|
||||
treeNode2.ImageIndex = 3;
|
||||
treeNode2.Name = "节点1";
|
||||
treeNode2.Text = "Halcon窗口";
|
||||
treeNode3.ImageKey = "图像.png";
|
||||
treeNode3.Name = "节点2";
|
||||
treeNode3.Text = "Basler";
|
||||
treeNode4.ImageKey = "图像.png";
|
||||
treeNode4.Name = "节点3";
|
||||
treeNode4.Text = "HIKVision";
|
||||
treeNode5.ImageIndex = 4;
|
||||
treeNode5.Name = "节点0";
|
||||
treeNode5.Text = "获取图像";
|
||||
treeNode6.Name = "节点5";
|
||||
treeNode6.Text = "滤波";
|
||||
treeNode7.Name = "节点6";
|
||||
treeNode7.Text = "平滑";
|
||||
treeNode8.Name = "节点7";
|
||||
treeNode8.Text = "去噪";
|
||||
treeNode9.Name = "节点4";
|
||||
treeNode9.Text = "图像预处理";
|
||||
treeNode10.Name = "节点9";
|
||||
treeNode10.Text = "形状匹配";
|
||||
treeNode11.Name = "节点10";
|
||||
treeNode11.Text = "可变形匹配";
|
||||
treeNode12.Name = "节点11";
|
||||
treeNode12.Text = "灰度匹配";
|
||||
treeNode13.Name = "节点8";
|
||||
treeNode13.Text = "匹配";
|
||||
treeNode14.ImageIndex = 1;
|
||||
treeNode14.Name = "NodeJob";
|
||||
treeNode14.Text = "流程";
|
||||
treeNode15.ImageIndex = 3;
|
||||
treeNode15.Name = "节点1";
|
||||
treeNode15.Text = "Halcon窗口";
|
||||
treeNode16.ImageKey = "图像.png";
|
||||
treeNode16.Name = "节点2";
|
||||
treeNode16.Text = "Basler";
|
||||
treeNode17.ImageKey = "图像.png";
|
||||
treeNode17.Name = "节点3";
|
||||
treeNode17.Text = "HIKVision";
|
||||
treeNode18.ImageIndex = 4;
|
||||
treeNode18.Name = "节点0";
|
||||
treeNode18.Text = "获取图像";
|
||||
treeNode19.Name = "节点5";
|
||||
treeNode19.Text = "滤波";
|
||||
treeNode20.Name = "节点6";
|
||||
treeNode20.Text = "平滑";
|
||||
treeNode21.Name = "节点7";
|
||||
treeNode21.Text = "去噪";
|
||||
treeNode22.Name = "节点4";
|
||||
treeNode22.Text = "图像预处理";
|
||||
treeNode23.Name = "节点9";
|
||||
treeNode23.Text = "形状匹配";
|
||||
treeNode24.Name = "节点10";
|
||||
treeNode24.Text = "可变形匹配";
|
||||
treeNode25.Name = "节点11";
|
||||
treeNode25.Text = "灰度匹配";
|
||||
treeNode26.Name = "节点8";
|
||||
treeNode26.Text = "匹配";
|
||||
this.tvw_ToolBox.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
|
||||
treeNode1,
|
||||
treeNode5,
|
||||
treeNode9,
|
||||
treeNode13});
|
||||
this.tvw_ToolBox.SelectedImageIndex = 0;
|
||||
this.tvw_ToolBox.Size = new System.Drawing.Size(353, 578);
|
||||
treeNode14,
|
||||
treeNode18,
|
||||
treeNode22,
|
||||
treeNode26});
|
||||
this.tvw_ToolBox.SelectedImageIndex = 4;
|
||||
this.tvw_ToolBox.Size = new System.Drawing.Size(367, 545);
|
||||
this.tvw_ToolBox.TabIndex = 1;
|
||||
//
|
||||
// richTextBoxEx1
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.richTextBoxEx1.BackgroundStyle.Class = "RichTextBoxBorder";
|
||||
this.richTextBoxEx1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.richTextBoxEx1.Location = new System.Drawing.Point(0, 583);
|
||||
this.richTextBoxEx1.Name = "richTextBoxEx1";
|
||||
this.richTextBoxEx1.Rtf = "{\\rtf1\\ansi\\deff0{\\fonttbl{\\f0\\fnil\\fcharset134 \\\'cb\\\'ce\\\'cc\\\'e5;}}\r\n\\viewkind4\\u" +
|
||||
"c1\\pard\\lang2052\\f0\\fs18 richTextBoxEx1\\par\r\n}\r\n";
|
||||
this.richTextBoxEx1.Size = new System.Drawing.Size(356, 61);
|
||||
this.richTextBoxEx1.TabIndex = 2;
|
||||
this.richTextBoxEx1.Text = "richTextBoxEx1";
|
||||
//
|
||||
// imageList1
|
||||
//
|
||||
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
|
||||
@@ -132,13 +118,31 @@
|
||||
this.imageList1.Images.SetKeyName(3, "图像.png");
|
||||
this.imageList1.Images.SetKeyName(4, "文件夹.png");
|
||||
//
|
||||
// richTextBoxEx1
|
||||
//
|
||||
this.richTextBoxEx1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
//
|
||||
//
|
||||
//
|
||||
this.richTextBoxEx1.BackgroundStyle.Class = "RichTextBoxBorder";
|
||||
this.richTextBoxEx1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.richTextBoxEx1.Location = new System.Drawing.Point(0, 548);
|
||||
this.richTextBoxEx1.Name = "richTextBoxEx1";
|
||||
this.richTextBoxEx1.Rtf = "{\\rtf1\\ansi\\deff0{\\fonttbl{\\f0\\fnil\\fcharset134 \\\'cb\\\'ce\\\'cc\\\'e5;}}\r\n\\viewkind4\\u" +
|
||||
"c1\\pard\\lang2052\\f0\\fs18 richTextBoxEx1\\par\r\n}\r\n";
|
||||
this.richTextBoxEx1.Size = new System.Drawing.Size(367, 96);
|
||||
this.richTextBoxEx1.TabIndex = 2;
|
||||
this.richTextBoxEx1.Text = "richTextBoxEx1";
|
||||
//
|
||||
// FormToolBox
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(356, 642);
|
||||
this.ClientSize = new System.Drawing.Size(367, 642);
|
||||
this.Controls.Add(this.richTextBoxEx1);
|
||||
this.Controls.Add(this.tvw_ToolBox);
|
||||
this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "FormToolBox";
|
||||
this.Text = "工具箱";
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADi
|
||||
EAAAAk1TRnQBSQFMAgEBBQEAAQgBAAEIAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
EAAAAk1TRnQBSQFMAgEBBQEAARABAAEQAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABgAMAAUADAAEBAQABCAYAASAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
@@ -156,31 +156,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
|
||||
|
||||
193
VisionEdit/FormMain.Designer.cs
generated
193
VisionEdit/FormMain.Designer.cs
generated
@@ -30,21 +30,21 @@
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain));
|
||||
WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin();
|
||||
WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin1 = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin();
|
||||
WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient1 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin();
|
||||
WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient2 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient3 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient4 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient5 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient3 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient6 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient7 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin6 = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin();
|
||||
WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin6 = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin();
|
||||
WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient16 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient36 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin6 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin();
|
||||
WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient6 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient37 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient17 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient38 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient6 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient39 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient40 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient18 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient41 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
|
||||
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient42 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
|
||||
this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl();
|
||||
this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel();
|
||||
this.ribbonBar2 = new DevComponents.DotNetBar.RibbonBar();
|
||||
@@ -84,9 +84,15 @@
|
||||
this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
|
||||
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
|
||||
this.dockPanel1 = new WeifenLuo.WinFormsUI.Docking.DockPanel();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.lbPermission = new System.Windows.Forms.Label();
|
||||
this.lbTime = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.ribbonControl1.SuspendLayout();
|
||||
this.ribbonPanel3.SuspendLayout();
|
||||
this.ribbonPanel1.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// ribbonControl1
|
||||
@@ -583,64 +589,118 @@
|
||||
//
|
||||
// dockPanel1
|
||||
//
|
||||
this.dockPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.dockPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.dockPanel1.Location = new System.Drawing.Point(0, 154);
|
||||
this.dockPanel1.Name = "dockPanel1";
|
||||
this.dockPanel1.Size = new System.Drawing.Size(1140, 481);
|
||||
dockPanelGradient1.EndColor = System.Drawing.SystemColors.ControlLight;
|
||||
dockPanelGradient1.StartColor = System.Drawing.SystemColors.ControlLight;
|
||||
autoHideStripSkin1.DockStripGradient = dockPanelGradient1;
|
||||
tabGradient1.EndColor = System.Drawing.SystemColors.Control;
|
||||
tabGradient1.StartColor = System.Drawing.SystemColors.Control;
|
||||
tabGradient1.TextColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||
autoHideStripSkin1.TabGradient = tabGradient1;
|
||||
autoHideStripSkin1.TextFont = new System.Drawing.Font("Microsoft YaHei UI", 9F);
|
||||
dockPanelSkin1.AutoHideStripSkin = autoHideStripSkin1;
|
||||
tabGradient2.EndColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
tabGradient2.StartColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
tabGradient2.TextColor = System.Drawing.SystemColors.ControlText;
|
||||
dockPaneStripGradient1.ActiveTabGradient = tabGradient2;
|
||||
dockPanelGradient2.EndColor = System.Drawing.SystemColors.Control;
|
||||
dockPanelGradient2.StartColor = System.Drawing.SystemColors.Control;
|
||||
dockPaneStripGradient1.DockStripGradient = dockPanelGradient2;
|
||||
tabGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
|
||||
tabGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
|
||||
tabGradient3.TextColor = System.Drawing.SystemColors.ControlText;
|
||||
dockPaneStripGradient1.InactiveTabGradient = tabGradient3;
|
||||
dockPaneStripSkin1.DocumentGradient = dockPaneStripGradient1;
|
||||
dockPaneStripSkin1.TextFont = new System.Drawing.Font("Microsoft YaHei UI", 9F);
|
||||
tabGradient4.EndColor = System.Drawing.SystemColors.ActiveCaption;
|
||||
tabGradient4.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
|
||||
tabGradient4.StartColor = System.Drawing.SystemColors.GradientActiveCaption;
|
||||
tabGradient4.TextColor = System.Drawing.SystemColors.ActiveCaptionText;
|
||||
dockPaneStripToolWindowGradient1.ActiveCaptionGradient = tabGradient4;
|
||||
tabGradient5.EndColor = System.Drawing.SystemColors.Control;
|
||||
tabGradient5.StartColor = System.Drawing.SystemColors.Control;
|
||||
tabGradient5.TextColor = System.Drawing.SystemColors.ControlText;
|
||||
dockPaneStripToolWindowGradient1.ActiveTabGradient = tabGradient5;
|
||||
dockPanelGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
|
||||
dockPanelGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
|
||||
dockPaneStripToolWindowGradient1.DockStripGradient = dockPanelGradient3;
|
||||
tabGradient6.EndColor = System.Drawing.SystemColors.InactiveCaption;
|
||||
tabGradient6.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
|
||||
tabGradient6.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;
|
||||
tabGradient6.TextColor = System.Drawing.SystemColors.InactiveCaptionText;
|
||||
dockPaneStripToolWindowGradient1.InactiveCaptionGradient = tabGradient6;
|
||||
tabGradient7.EndColor = System.Drawing.Color.Transparent;
|
||||
tabGradient7.StartColor = System.Drawing.Color.Transparent;
|
||||
tabGradient7.TextColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||
dockPaneStripToolWindowGradient1.InactiveTabGradient = tabGradient7;
|
||||
dockPaneStripSkin1.ToolWindowGradient = dockPaneStripToolWindowGradient1;
|
||||
dockPanelSkin1.DockPaneStripSkin = dockPaneStripSkin1;
|
||||
this.dockPanel1.Skin = dockPanelSkin1;
|
||||
this.dockPanel1.Size = new System.Drawing.Size(1137, 459);
|
||||
dockPanelGradient16.EndColor = System.Drawing.SystemColors.ControlLight;
|
||||
dockPanelGradient16.StartColor = System.Drawing.SystemColors.ControlLight;
|
||||
autoHideStripSkin6.DockStripGradient = dockPanelGradient16;
|
||||
tabGradient36.EndColor = System.Drawing.SystemColors.Control;
|
||||
tabGradient36.StartColor = System.Drawing.SystemColors.Control;
|
||||
tabGradient36.TextColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||
autoHideStripSkin6.TabGradient = tabGradient36;
|
||||
autoHideStripSkin6.TextFont = new System.Drawing.Font("Microsoft YaHei UI", 9F);
|
||||
dockPanelSkin6.AutoHideStripSkin = autoHideStripSkin6;
|
||||
tabGradient37.EndColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
tabGradient37.StartColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
tabGradient37.TextColor = System.Drawing.SystemColors.ControlText;
|
||||
dockPaneStripGradient6.ActiveTabGradient = tabGradient37;
|
||||
dockPanelGradient17.EndColor = System.Drawing.SystemColors.Control;
|
||||
dockPanelGradient17.StartColor = System.Drawing.SystemColors.Control;
|
||||
dockPaneStripGradient6.DockStripGradient = dockPanelGradient17;
|
||||
tabGradient38.EndColor = System.Drawing.SystemColors.ControlLight;
|
||||
tabGradient38.StartColor = System.Drawing.SystemColors.ControlLight;
|
||||
tabGradient38.TextColor = System.Drawing.SystemColors.ControlText;
|
||||
dockPaneStripGradient6.InactiveTabGradient = tabGradient38;
|
||||
dockPaneStripSkin6.DocumentGradient = dockPaneStripGradient6;
|
||||
dockPaneStripSkin6.TextFont = new System.Drawing.Font("Microsoft YaHei UI", 9F);
|
||||
tabGradient39.EndColor = System.Drawing.SystemColors.ActiveCaption;
|
||||
tabGradient39.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
|
||||
tabGradient39.StartColor = System.Drawing.SystemColors.GradientActiveCaption;
|
||||
tabGradient39.TextColor = System.Drawing.SystemColors.ActiveCaptionText;
|
||||
dockPaneStripToolWindowGradient6.ActiveCaptionGradient = tabGradient39;
|
||||
tabGradient40.EndColor = System.Drawing.SystemColors.Control;
|
||||
tabGradient40.StartColor = System.Drawing.SystemColors.Control;
|
||||
tabGradient40.TextColor = System.Drawing.SystemColors.ControlText;
|
||||
dockPaneStripToolWindowGradient6.ActiveTabGradient = tabGradient40;
|
||||
dockPanelGradient18.EndColor = System.Drawing.SystemColors.ControlLight;
|
||||
dockPanelGradient18.StartColor = System.Drawing.SystemColors.ControlLight;
|
||||
dockPaneStripToolWindowGradient6.DockStripGradient = dockPanelGradient18;
|
||||
tabGradient41.EndColor = System.Drawing.SystemColors.InactiveCaption;
|
||||
tabGradient41.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
|
||||
tabGradient41.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;
|
||||
tabGradient41.TextColor = System.Drawing.SystemColors.InactiveCaptionText;
|
||||
dockPaneStripToolWindowGradient6.InactiveCaptionGradient = tabGradient41;
|
||||
tabGradient42.EndColor = System.Drawing.Color.Transparent;
|
||||
tabGradient42.StartColor = System.Drawing.Color.Transparent;
|
||||
tabGradient42.TextColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||
dockPaneStripToolWindowGradient6.InactiveTabGradient = tabGradient42;
|
||||
dockPaneStripSkin6.ToolWindowGradient = dockPaneStripToolWindowGradient6;
|
||||
dockPanelSkin6.DockPaneStripSkin = dockPaneStripSkin6;
|
||||
this.dockPanel1.Skin = dockPanelSkin6;
|
||||
this.dockPanel1.TabIndex = 1;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.panel1.BackColor = System.Drawing.Color.White;
|
||||
this.panel1.Controls.Add(this.label1);
|
||||
this.panel1.Controls.Add(this.lbPermission);
|
||||
this.panel1.Controls.Add(this.lbTime);
|
||||
this.panel1.Location = new System.Drawing.Point(0, 612);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(1140, 22);
|
||||
this.panel1.TabIndex = 4;
|
||||
//
|
||||
// lbPermission
|
||||
//
|
||||
this.lbPermission.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lbPermission.AutoSize = true;
|
||||
this.lbPermission.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.lbPermission.Location = new System.Drawing.Point(966, 4);
|
||||
this.lbPermission.Name = "lbPermission";
|
||||
this.lbPermission.Size = new System.Drawing.Size(38, 16);
|
||||
this.lbPermission.TabIndex = 1;
|
||||
this.lbPermission.Text = "未登录";
|
||||
//
|
||||
// lbTime
|
||||
//
|
||||
this.lbTime.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lbTime.AutoSize = true;
|
||||
this.lbTime.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.lbTime.Location = new System.Drawing.Point(1019, 4);
|
||||
this.lbTime.Name = "lbTime";
|
||||
this.lbTime.Size = new System.Drawing.Size(41, 16);
|
||||
this.lbTime.TabIndex = 2;
|
||||
this.lbTime.Text = "lbTime";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label1.Location = new System.Drawing.Point(913, 4);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(50, 16);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "当前登录:";
|
||||
//
|
||||
// timer1
|
||||
//
|
||||
this.timer1.Enabled = true;
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// FormMain
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.ControlDark;
|
||||
this.ClientSize = new System.Drawing.Size(1140, 635);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.dockPanel1);
|
||||
this.Controls.Add(this.ribbonControl1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
@@ -655,6 +715,8 @@
|
||||
this.ribbonControl1.PerformLayout();
|
||||
this.ribbonPanel3.ResumeLayout(false);
|
||||
this.ribbonPanel1.ResumeLayout(false);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -700,6 +762,11 @@
|
||||
private DevComponents.DotNetBar.ButtonItem btnOpenJob;
|
||||
private DevComponents.DotNetBar.ButtonItem btnSaveJob;
|
||||
private WeifenLuo.WinFormsUI.Docking.DockPanel dockPanel1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label lbPermission;
|
||||
private System.Windows.Forms.Label lbTime;
|
||||
private System.Windows.Forms.Timer timer1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace VisionEdit
|
||||
public FormImageWindow myFormImageWindow = new FormImageWindow();
|
||||
public FormJobManage myFormJobManage = new FormJobManage();
|
||||
public FormToolBox myFormToolBox = new FormToolBox();
|
||||
public FormLog myFormLog = new FormLog();
|
||||
#endregion
|
||||
|
||||
public FormMain()
|
||||
@@ -52,6 +53,7 @@ namespace VisionEdit
|
||||
myFormToolBox.Show(this.dockPanel1, DockState.DockLeft);
|
||||
myFormJobManage.Show(this.dockPanel1, DockState.DockRight);
|
||||
myFormImageWindow.Show(this.dockPanel1, DockState.Document);
|
||||
myFormLog.Show(this.dockPanel1, DockState.DockBottom);
|
||||
}
|
||||
|
||||
#region 按照配置文件初始化Dockpanel
|
||||
@@ -71,6 +73,10 @@ namespace VisionEdit
|
||||
{
|
||||
return myFormJobManage;
|
||||
}
|
||||
if (persistString == typeof(FormLog).ToString())
|
||||
{
|
||||
return myFormLog;
|
||||
}
|
||||
if (persistString == typeof(FormImageWindow).ToString())
|
||||
{
|
||||
return myFormImageWindow;
|
||||
@@ -84,19 +90,28 @@ namespace VisionEdit
|
||||
//配置文件不存在或配置文件有问题时 按系统默认规则加载子窗体
|
||||
myFormToolBox.Show(this.dockPanel1, DockState.DockLeft);
|
||||
myFormJobManage.Show(this.dockPanel1, DockState.DockRight);
|
||||
myFormLog.Show(this.dockPanel1, DockState.DockBottom);
|
||||
myFormImageWindow.Show(this.dockPanel1, DockState.Document);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 关闭时保存当前panel配置
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if(File.Exists(m_DockPath))
|
||||
{
|
||||
dockPanel1.SaveAsXml(this.m_DockPath);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
this.lbTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
58
VisionEdit/Interface/EnumList.cs
Normal file
58
VisionEdit/Interface/EnumList.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VisionEdit
|
||||
{
|
||||
public enum ToolType
|
||||
{
|
||||
None,
|
||||
Job,
|
||||
HalconInterface,
|
||||
SDK_Basler,
|
||||
SDK_Congex,
|
||||
SDK_PointGray,
|
||||
SDK_IMAVision,
|
||||
SDK_MindVision,
|
||||
SDK_HIKVision,
|
||||
ShapeMatch,
|
||||
EyeHandCalibration,
|
||||
CircleCalibration,
|
||||
SubImage,
|
||||
BlobAnalyse,
|
||||
FindLine,
|
||||
FindCircle,
|
||||
CreateROI,
|
||||
CreatePosition,
|
||||
CoorTrans,
|
||||
OCR,
|
||||
Barcode,
|
||||
RegionFeature,
|
||||
RegionOperation,
|
||||
QRCode,
|
||||
KeyenceSR1000,
|
||||
DownCamAlign,
|
||||
ColorToRGB,
|
||||
DistancePL,
|
||||
DistanceSS,
|
||||
LLPoint,
|
||||
CodeEdit,
|
||||
Label,
|
||||
Logic,
|
||||
Output,
|
||||
CreateLine,
|
||||
}
|
||||
|
||||
public enum DataType
|
||||
{
|
||||
String,
|
||||
Region,
|
||||
Image,
|
||||
Point,
|
||||
Line,
|
||||
Circle,
|
||||
Pose,
|
||||
}
|
||||
}
|
||||
62
VisionEdit/Interface/ToolInfoInterface.cs
Normal file
62
VisionEdit/Interface/ToolInfoInterface.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VisionEdit
|
||||
{
|
||||
public abstract class IToolInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 工具是否启用
|
||||
/// </summary>
|
||||
public bool enable { get; set; }
|
||||
/// <summary>
|
||||
/// 工具名称
|
||||
/// </summary>
|
||||
public string toolName { get; set; }
|
||||
/// <summary>
|
||||
/// 工具类型
|
||||
/// </summary>
|
||||
public ToolType toolType { get; set; }
|
||||
/// <summary>
|
||||
/// 工具对象
|
||||
/// </summary>
|
||||
public object tool { get; set; }
|
||||
/// <summary>
|
||||
/// 工具描述信息
|
||||
/// </summary>
|
||||
public string toolTipInfo { get; set; }
|
||||
/// <summary>
|
||||
/// 工具输入字典集合
|
||||
/// </summary>
|
||||
public List<ToolIO> toolInput { get; set; }
|
||||
/// <summary>
|
||||
/// 工具输出字典集合
|
||||
/// </summary>
|
||||
public List<ToolIO> toolOutput { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 工具的输入输出类
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ToolIO
|
||||
{
|
||||
|
||||
public string IOName;
|
||||
public object value;
|
||||
public DataType ioType;
|
||||
|
||||
public ToolIO() { }
|
||||
public ToolIO(string IOName1, object value1, DataType ioType1)
|
||||
{
|
||||
this.IOName = IOName1;
|
||||
this.value = value1;
|
||||
this.ioType = ioType1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
77
VisionEdit/Interface/VisionJobInterface.cs
Normal file
77
VisionEdit/Interface/VisionJobInterface.cs
Normal file
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using HalconDotNet;
|
||||
|
||||
namespace VisionEdit
|
||||
{
|
||||
[Serializable]
|
||||
public abstract class IVisionJob
|
||||
{
|
||||
/// <summary>
|
||||
/// Job名
|
||||
/// </summary>
|
||||
public string JobName { get; set; }
|
||||
/// <summary>
|
||||
/// 需要连线的节点对,不停的画连线,注意键值对中第一个为连线的结束节点,第二个为起始节点,一个输出可能连接多个输入,而键值对中的键不能重复,
|
||||
/// 所以把源作为值,输入作为键
|
||||
/// </summary>
|
||||
public Dictionary<TreeNode, TreeNode> D_itemAndSource { get; set; }
|
||||
/// <summary>
|
||||
/// 流程运行结果图像
|
||||
/// </summary>
|
||||
public HObject jobResultImage { get; set; }
|
||||
/// <summary>
|
||||
/// 流程树中节点的最大长度
|
||||
/// </summary>
|
||||
public int maxLength { get; set; }
|
||||
/// <summary>
|
||||
/// 工具对象集合
|
||||
/// </summary>
|
||||
public List<IToolInfo> L_toolList { get; set; }
|
||||
/// <summary>
|
||||
/// 正在绘制输入输出指向线
|
||||
/// </summary>
|
||||
public bool isDrawing { get; set; }
|
||||
/// <summary>
|
||||
/// 记录本工具执行完的耗时,用于计算各工具耗时
|
||||
/// </summary>
|
||||
public double recordElapseTime { get; set; }
|
||||
/// <summary>
|
||||
/// 标准图像字典,用于存储标准图像路径和图像对象
|
||||
/// </summary>
|
||||
public Dictionary<string, HObject> D_standardImage { get; set; }
|
||||
/// <summary>
|
||||
/// 记录起始节点和此节点的列坐标值
|
||||
/// </summary>
|
||||
public Dictionary<TreeNode, Color> startNodeAndColor { get; set; }
|
||||
/// <summary>
|
||||
/// 记录前面的划线所跨越的列段,
|
||||
/// </summary>
|
||||
public Dictionary<int, Dictionary<TreeNode, TreeNode>> list { get; set; }
|
||||
/// <summary>
|
||||
/// 每一个列坐标值对应一种颜色
|
||||
/// </summary>
|
||||
public Dictionary<int, Color> colValueAndColor { get; set; }
|
||||
/// <summary>
|
||||
/// 输入输出指向线的颜色数组
|
||||
/// </summary>
|
||||
public Color[] color { get; set; } = new Color[] { Color.Blue, Color.Orange, Color.Black, Color.Red, Color.Green,
|
||||
Color.Brown, Color.Blue, Color.Black, Color.Red, Color.Green, Color.Orange, Color.Brown, Color.Blue, Color.Black,
|
||||
Color.Red, Color.Green, Color.Orange, Color.Brown, Color.Blue, Color.Black, Color.Red, Color.Green, Color.Orange,
|
||||
Color.Brown, Color.Blue, Color.Black, Color.Red, Color.Green, Color.Orange, Color.Brown};
|
||||
/// <summary>
|
||||
/// 流程编辑时的右击菜单
|
||||
/// </summary>
|
||||
public ContextMenuStrip rightClickMenu { get; set; }
|
||||
/// <summary>
|
||||
/// 在空白除右击菜单
|
||||
/// </summary>
|
||||
public ContextMenuStrip rightClickMenuAtBlank { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
74
VisionEdit/ToolInfo.cs
Normal file
74
VisionEdit/ToolInfo.cs
Normal file
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VisionEdit
|
||||
{
|
||||
public class ToolInfo:IToolInfo
|
||||
{
|
||||
public ToolInfo()
|
||||
{
|
||||
enable = true;
|
||||
toolType = ToolType.None;
|
||||
toolName = string.Empty;
|
||||
tool = new object();
|
||||
toolInput = new List<ToolIO>();
|
||||
toolOutput = new List<ToolIO>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 以IO名获取IO对象
|
||||
/// </summary>
|
||||
/// <param name="IOName"></param>
|
||||
/// <returns></returns>
|
||||
public ToolIO GetInput(string IOName)
|
||||
{
|
||||
for (int i = 0; i < toolInput.Count; i++)
|
||||
{
|
||||
if (toolInput[i].IOName == IOName)
|
||||
return toolInput[i];
|
||||
}
|
||||
return new ToolIO();
|
||||
}
|
||||
/// <summary>
|
||||
/// 以IO名获取IO对象
|
||||
/// </summary>
|
||||
/// <param name="IOName"></param>
|
||||
/// <returns></returns>
|
||||
public ToolIO GetOutput(string IOName)
|
||||
{
|
||||
for (int i = 0; i < toolOutput.Count; i++)
|
||||
{
|
||||
if (toolOutput[i].IOName == IOName)
|
||||
return toolOutput[i];
|
||||
}
|
||||
return new ToolIO();
|
||||
}
|
||||
/// <summary>
|
||||
/// 移除工具输入项
|
||||
/// </summary>
|
||||
/// <param name="IOName"></param>
|
||||
public void RemoveInputIO(string IOName)
|
||||
{
|
||||
for (int i = 0; i < toolInput.Count; i++)
|
||||
{
|
||||
if (toolInput[i].IOName == toolName)
|
||||
toolInput.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 移除工具输出项
|
||||
/// </summary>
|
||||
/// <param name="IOName"></param>
|
||||
public void RemoveOutputIO(string IOName)
|
||||
{
|
||||
for (int i = 0; i < toolOutput.Count; i++)
|
||||
{
|
||||
if (toolOutput[i].IOName == toolName)
|
||||
toolOutput.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,10 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DevComponents.DotNetBar2, Version=14.0.0.15, Culture=neutral, PublicKeyToken=c39c3242a43eee2b, processorArchitecture=MSIL" />
|
||||
<Reference Include="halcondotnet, Version=19.5.0.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\MVTec\HALCON-19.05-Progress\bin\dotnet20\halcondotnet.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@@ -51,7 +55,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AppConfig.cs" />
|
||||
<Compile Include="DockPanelOperate.cs" />
|
||||
<Compile Include="FormLib\FormImageWindow.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -64,6 +67,12 @@
|
||||
<Compile Include="FormLib\FormJobManage.Designer.cs">
|
||||
<DependentUpon>FormJobManage.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FormLib\FormLog.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormLib\FormLog.Designer.cs">
|
||||
<DependentUpon>FormLog.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FormLib\FormToolBox.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -77,14 +86,22 @@
|
||||
<DependentUpon>FormMain.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="GlobalParams.cs" />
|
||||
<Compile Include="Interface\EnumList.cs" />
|
||||
<Compile Include="ToolInfo.cs" />
|
||||
<Compile Include="Interface\ToolInfoInterface.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Interface\VisionJobInterface.cs" />
|
||||
<Compile Include="VisionJob.cs" />
|
||||
<EmbeddedResource Include="FormLib\FormImageWindow.resx">
|
||||
<DependentUpon>FormImageWindow.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FormLib\FormJobManage.resx">
|
||||
<DependentUpon>FormJobManage.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FormLib\FormLog.resx">
|
||||
<DependentUpon>FormLog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FormLib\FormToolBox.resx">
|
||||
<DependentUpon>FormToolBox.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
198
VisionEdit/VisionJob.cs
Normal file
198
VisionEdit/VisionJob.cs
Normal file
@@ -0,0 +1,198 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using HalconDotNet;
|
||||
using VisionEdit.FormLib;
|
||||
|
||||
namespace VisionEdit
|
||||
{
|
||||
public class VisionJob : IVisionJob
|
||||
{
|
||||
public TreeView tvwOnWorkJob = new TreeView();
|
||||
FormLog myFormLog = null;
|
||||
|
||||
public VisionJob(TreeView inputTreeView, FormLog inputFormLog)
|
||||
{
|
||||
tvwOnWorkJob = inputTreeView;
|
||||
this.myFormLog = inputFormLog;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 拖动工具节点
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
internal void TvwJobItemDrag(object sender, ItemDragEventArgs e)//左键拖动
|
||||
{
|
||||
try
|
||||
{
|
||||
if (((TreeView)sender).SelectedNode != null)
|
||||
{
|
||||
if (((TreeView)sender).SelectedNode.Level == 1) //输入输出不允许拖动
|
||||
{
|
||||
tvwOnWorkJob.DoDragDrop(e.Item, DragDropEffects.Move);
|
||||
}
|
||||
|
||||
else if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
tvwOnWorkJob.DoDragDrop(e.Item, DragDropEffects.Move);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
myFormLog.ShowLog("拖动节点出错,描述: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 节点拖动
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
internal void TvwJob_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (e.Data.GetDataPresent("System.Windows.Forms.TreeNode"))
|
||||
{
|
||||
e.Effect = DragDropEffects.Move;
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Effect = DragDropEffects.None;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
myFormLog.ShowLog("节点拖动出错,描述: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 释放被拖动的节点
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
internal void TvwJob_DragDrop(object sender, DragEventArgs e)//拖动
|
||||
{
|
||||
try
|
||||
{
|
||||
//获得拖放中的节点
|
||||
TreeNode moveNode = (TreeNode)e.Data.GetData("System.Windows.Forms.TreeNode");
|
||||
//根据鼠标坐标确定要移动到的目标节点
|
||||
Point pt;
|
||||
TreeNode targeNode; // 目标节点
|
||||
pt = ((TreeView)(sender)).PointToClient(new System.Drawing.Point(e.X, e.Y));
|
||||
targeNode = tvwOnWorkJob.GetNodeAt(pt);
|
||||
//如果目标节点无子节点则添加为同级节点,反之添加到下级节点的未端
|
||||
|
||||
if (moveNode == targeNode) //若是把自己拖放到自己,不可,返回
|
||||
return;
|
||||
|
||||
if (targeNode == null) //目标节点为null,就是把节点拖到了空白区域,不可,直接返回
|
||||
return;
|
||||
|
||||
if (moveNode.Level == 1 && targeNode.Level == 1 && moveNode.Parent == targeNode.Parent) //都是输入输出节点,内部拖动排序
|
||||
{
|
||||
moveNode.Remove();
|
||||
targeNode.Parent.Nodes.Insert(targeNode.Index, moveNode);
|
||||
return;
|
||||
}
|
||||
|
||||
if (moveNode.Level == 0) // 被拖动的是子节点,也就是工具节点
|
||||
{
|
||||
if (targeNode.Level == 0)
|
||||
{
|
||||
moveNode.Remove();
|
||||
tvwOnWorkJob.Nodes.Insert(targeNode.Index, moveNode);
|
||||
|
||||
ToolInfo temp = new ToolInfo();
|
||||
for (int i = 0; i < L_toolList.Count; i++)
|
||||
{
|
||||
if (L_toolList[i].toolName == moveNode.Text)
|
||||
{
|
||||
temp = (ToolInfo)L_toolList[i];
|
||||
L_toolList.RemoveAt(i);
|
||||
L_toolList.Insert(targeNode.Index - 2, temp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
moveNode.Remove();
|
||||
tvwOnWorkJob.Nodes.Insert(targeNode.Parent.Index + 1, moveNode);
|
||||
|
||||
ToolInfo temp = new ToolInfo();
|
||||
for (int i = 0; i < L_toolList.Count; i++)
|
||||
{
|
||||
if (L_toolList[i].toolName == moveNode.Text)
|
||||
{
|
||||
temp = (ToolInfo)L_toolList[i];
|
||||
L_toolList.RemoveAt(i);
|
||||
L_toolList.Insert(targeNode.Parent.Index, temp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else //被拖动的是输入输出节点
|
||||
{
|
||||
if (targeNode.Level == 0 && GetToolInfoByToolName(jobName, targeNode.Text).toolType == ToolType.Output)
|
||||
{
|
||||
string result = moveNode.Parent.Text + " . -->" + moveNode.Text.Substring(3);
|
||||
GetToolInfoByToolName(jobName, targeNode.Text).input.Add(new ToolIO("<--" + result, "", DataType.String));
|
||||
TreeNode node = targeNode.Nodes.Add("", "<--" + result, 26, 26);
|
||||
node.ForeColor = Color.DarkMagenta;
|
||||
D_itemAndSource.Add(node, moveNode);
|
||||
targeNode.Expand();
|
||||
DrawLine();
|
||||
return;
|
||||
}
|
||||
else if (targeNode.Level == 0)
|
||||
return;
|
||||
|
||||
//连线前首先要判断被拖动节点是否为输出项,目标节点是否为输入项
|
||||
if (moveNode.Text.Substring(0, 3) != "-->" || targeNode.Text.Substring(0, 3) != "<--")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//连线前要判断被拖动节点和目标节点的数据类型是否一致
|
||||
if ((DataType)moveNode.Tag != (DataType)targeNode.Tag)
|
||||
{
|
||||
// Frm_Main.Instance.OutputMsg("被拖动节点和目标节点数据类型不一致,不可关联", Color.Red);
|
||||
return;
|
||||
}
|
||||
|
||||
string input = targeNode.Text;
|
||||
if (input.Contains("《")) //表示已经连接了源
|
||||
input = Regex.Split(input, "《")[0];
|
||||
else //第一次连接源就需要添加到输入输出集合
|
||||
D_itemAndSource.Add(targeNode, moveNode);
|
||||
GetToolInfoByToolName(jobName, targeNode.Parent.Text).GetInput(input.Substring(3)).value = "《- " + moveNode.Parent.Text + " . " + moveNode.Text.Substring(3);
|
||||
targeNode.Text = input + "《- " + moveNode.Parent.Text + " . " + moveNode.Text.Substring(3);
|
||||
DrawLine();
|
||||
|
||||
//移除拖放的节点
|
||||
if (moveNode.Level == 0)
|
||||
moveNode.Remove();
|
||||
}
|
||||
//更新当前拖动的节点选择
|
||||
tvwOnWorkJob.SelectedNode = moveNode;
|
||||
//展开目标节点,便于显示拖放效果
|
||||
targeNode.Expand();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
VisionEdit/obj/Debug/VisionEdit.FormLib.FormLog.resources
Normal file
BIN
VisionEdit/obj/Debug/VisionEdit.FormLib.FormLog.resources
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -18,3 +18,4 @@ F:\VSCode\VisionEditTest\VisionEdit\bin\Debug\HalconWindowTest.exe
|
||||
F:\VSCode\VisionEditTest\VisionEdit\bin\Debug\halcondotnet.dll
|
||||
F:\VSCode\VisionEditTest\VisionEdit\bin\Debug\HalconWindowTest.pdb
|
||||
F:\VSCode\VisionEditTest\VisionEdit\bin\Debug\halcondotnet.xml
|
||||
F:\VSCode\VisionEditTest\VisionEdit\obj\Debug\VisionEdit.FormLib.FormLog.resources
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user