正在改尺寸测量
This commit is contained in:
146
DHSoftware/MainWindow.Designer.cs
generated
146
DHSoftware/MainWindow.Designer.cs
generated
@ -28,14 +28,14 @@
|
||||
/// </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();
|
||||
titlebar = new AntdUI.PageHeader();
|
||||
lbName = new AntdUI.Label();
|
||||
tabsStas = new AntdUI.Tabs();
|
||||
@ -136,16 +136,16 @@
|
||||
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";
|
||||
//
|
||||
// tabPage3
|
||||
//
|
||||
tabPage3.Controls.Add(panel7);
|
||||
tabPage3.Location = new Point(3, 3);
|
||||
tabPage3.Location = new Point(3, 28);
|
||||
tabPage3.Name = "tabPage3";
|
||||
tabPage3.Size = new Size(574, 170);
|
||||
tabPage3.Size = new Size(574, 145);
|
||||
tabPage3.TabIndex = 0;
|
||||
tabPage3.Text = "日志";
|
||||
//
|
||||
@ -154,7 +154,7 @@
|
||||
panel7.Dock = DockStyle.Fill;
|
||||
panel7.Location = new Point(0, 0);
|
||||
panel7.Name = "panel7";
|
||||
panel7.Size = new Size(574, 170);
|
||||
panel7.Size = new Size(574, 145);
|
||||
panel7.TabIndex = 2;
|
||||
//
|
||||
// tabMain
|
||||
@ -201,7 +201,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";
|
||||
//
|
||||
@ -553,67 +553,67 @@
|
||||
segmented1.Font = new Font("Microsoft YaHei UI", 9F);
|
||||
segmented1.ForeColor = Color.White;
|
||||
segmented1.Full = true;
|
||||
segmentedItem6.Badge = null;
|
||||
segmentedItem6.BadgeAlign = AntdUI.TAlignFrom.TR;
|
||||
segmentedItem6.BadgeBack = null;
|
||||
segmentedItem6.BadgeMode = false;
|
||||
segmentedItem6.BadgeOffsetX = 0;
|
||||
segmentedItem6.BadgeOffsetY = 0;
|
||||
segmentedItem6.BadgeSize = 0.6F;
|
||||
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 = "设置";
|
||||
segmented1.Items.Add(segmentedItem6);
|
||||
segmented1.Items.Add(segmentedItem7);
|
||||
segmented1.Items.Add(segmentedItem8);
|
||||
segmented1.Items.Add(segmentedItem9);
|
||||
segmented1.Items.Add(segmentedItem10);
|
||||
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 = "启动";
|
||||
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.ID = "sys-setbutton";
|
||||
segmentedItem5.Text = "设置";
|
||||
segmented1.Items.Add(segmentedItem1);
|
||||
segmented1.Items.Add(segmentedItem2);
|
||||
segmented1.Items.Add(segmentedItem3);
|
||||
segmented1.Items.Add(segmentedItem4);
|
||||
segmented1.Items.Add(segmentedItem5);
|
||||
segmented1.Location = new Point(0, 0);
|
||||
segmented1.Name = "segmented1";
|
||||
segmented1.Size = new Size(491, 83);
|
||||
|
@ -36,8 +36,11 @@ using System.Windows.Forms;
|
||||
using XKRS.UI.Device.Winform;
|
||||
using static AntdUI.Math3D;
|
||||
using static DH.Commons.Enums.EnumHelper;
|
||||
using Button = System.Windows.Forms.Button;
|
||||
using Camera = DHSoftware.Models.Camera;
|
||||
using Label = AntdUI.Label;
|
||||
using LogLevel = DH.Commons.Enums.EnumHelper.LogLevel;
|
||||
using Point = System.Drawing.Point;
|
||||
using ResultState = DH.Commons.Base.ResultState;
|
||||
using Timer = System.Threading.Timer;
|
||||
|
||||
@ -189,7 +192,15 @@ namespace DHSoftware
|
||||
SetPermission(list, this.Controls);
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetAllCameraCounts()
|
||||
{
|
||||
CameraSummaries.ForEach(camera =>
|
||||
{
|
||||
camera.OKCount = 0;
|
||||
camera.NGCount = 0;
|
||||
camera.TiggerCount = 0;
|
||||
});
|
||||
}
|
||||
private void SetPermission(List<SysPermission> list, Control.ControlCollection controls)
|
||||
{
|
||||
foreach (Control control in controls)
|
||||
@ -689,8 +700,27 @@ namespace DHSoftware
|
||||
{
|
||||
cam.OnLog -= _visionEngine_OnLog;
|
||||
cam.OnLog += _visionEngine_OnLog;
|
||||
cam.CameraConnect();
|
||||
cam.OnHImageOutput += OnCameraHImageOutput;
|
||||
|
||||
Button CamLabel = new Button();
|
||||
CamLabel.Name = cameraBase.CameraName;
|
||||
CamLabel.Text = cameraBase.CameraName; // 关键1:必须有文本
|
||||
CamLabel.AutoSize = true;
|
||||
CamLabel.Size = new System.Drawing.Size(20, 20); // 关键2:自动调整大小
|
||||
CamLabel.Location = new Point(20 + 50 * i, 12); // 关键3:明确位置
|
||||
if (cam.CameraConnect())
|
||||
CamLabel.BackColor = Color.Green; // 关键4:避免透明
|
||||
else
|
||||
CamLabel.BackColor = Color.Yellow; // 关键4:避免透明
|
||||
CamLabel.ForeColor = Color.Black; // 关键4:避免透明
|
||||
CamLabel.Font = new Font("Microsoft YaHei", 9); // 可选:字体
|
||||
|
||||
// 关键5:确保添加到父控件
|
||||
if (pageHeader1 != null && !pageHeader1.Controls.Contains(CamLabel))
|
||||
{
|
||||
pageHeader1.Controls.Add(CamLabel);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -707,7 +737,7 @@ namespace DHSoftware
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void ConnectPLC()
|
||||
{
|
||||
if (ConfigModel.PLCBaseList.Count > 0)
|
||||
@ -725,7 +755,31 @@ namespace DHSoftware
|
||||
PLC.Port = plcBase.Port;
|
||||
PLC.OnLog -= _visionEngine_OnLog;
|
||||
PLC.OnLog += _visionEngine_OnLog;
|
||||
PLC.PLCConnect();
|
||||
if(PLC.Enable)
|
||||
{
|
||||
PLC.PLCConnect();
|
||||
Button CamLabel = new Button();
|
||||
CamLabel.Name = PLC.PLCName;
|
||||
CamLabel.Text = PLC.PLCName; // 关键1:必须有文本
|
||||
CamLabel.AutoSize = true;
|
||||
CamLabel.Size = new System.Drawing.Size(20, 20); // 关键2:自动调整大小
|
||||
CamLabel.Location = new Point(20 + 50 * (i + ConfigModel.CameraBaseList.Count), 12); // 关键3:明确位置
|
||||
if (PLC.Connected)
|
||||
CamLabel.BackColor = Color.Green; // 关键4:避免透明
|
||||
else
|
||||
CamLabel.BackColor = Color.Yellow; // 关键4:避免透明
|
||||
CamLabel.ForeColor = Color.Black; // 关键4:避免透明
|
||||
//CamLabel.ForeColor = Color.Green; // 关键4:避免透明
|
||||
CamLabel.Font = new Font("Microsoft YaHei", 9); // 可选:字体
|
||||
|
||||
// 关键5:确保添加到父控件
|
||||
if (pageHeader1 != null && !pageHeader1.Controls.Contains(CamLabel))
|
||||
{
|
||||
pageHeader1.Controls.Add(CamLabel);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1125,10 +1179,13 @@ namespace DHSoftware
|
||||
// DataSavePath = string.IsNullOrEmpty(DataSavePath) ? Path.Combine(X018PLCConfig.ImgDirectory, DateTime.Now.ToString("yyyyMMdd"), BatchNO) : DataSavePath;
|
||||
|
||||
}
|
||||
|
||||
private void HandleStartButton()
|
||||
{
|
||||
InitialCameraSumsView();
|
||||
LogAsync(DateTime.Now, LogLevel.Information, "流程启动中,请稍候...");
|
||||
ResetAllCameraCounts();
|
||||
//开始流程
|
||||
StartProcess();
|
||||
LogAsync(DateTime.Now, LogLevel.Action, "流程启动完成!");
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
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
|
||||
@ -117,34 +117,34 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="segmentedItem6.IconActiveSvg" xml:space="preserve">
|
||||
<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="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">
|
||||
<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="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">
|
||||
<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="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">
|
||||
<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="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">
|
||||
<data name="segmentedItem3.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">
|
||||
<data name="segmentedItem3.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">
|
||||
<data name="segmentedItem4.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">
|
||||
<data name="segmentedItem4.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">
|
||||
<data name="segmentedItem5.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="segmentedItem5.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" />
|
||||
|
@ -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("删除成功!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
<?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>
|
5
DHSoftware/Views/DetectControl.Designer.cs
generated
5
DHSoftware/Views/DetectControl.Designer.cs
generated
@ -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;
|
||||
@ -115,7 +116,7 @@
|
||||
tabPage1.Controls.Add(label2);
|
||||
tabPage1.Controls.Add(iptPrePath);
|
||||
tabPage1.Controls.Add(label1);
|
||||
tabPage1.Location = new Point(3, 31);
|
||||
tabPage1.Location = new Point(-909, -575);
|
||||
tabPage1.Name = "tabPage1";
|
||||
tabPage1.Size = new Size(909, 575);
|
||||
tabPage1.TabIndex = 0;
|
||||
@ -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;
|
||||
|
@ -15,7 +15,7 @@ namespace DHSoftware.Views
|
||||
{
|
||||
Window window;
|
||||
DetectionConfig detectionConfig;
|
||||
public DetectControl(Window _window,DetectionConfig _detection)
|
||||
public DetectControl(Window _window, DetectionConfig _detection)
|
||||
{
|
||||
window = _window;
|
||||
detectionConfig = _detection;
|
||||
@ -230,7 +230,7 @@ namespace DHSoftware.Views
|
||||
//CellBadge = new CellBadge(SizeEnum.Circle.GetEnumDescription()),
|
||||
CellLinks = new CellLink[] {
|
||||
new CellButton(Guid.NewGuid().ToString(),"编辑",TTypeMini.Primary),
|
||||
|
||||
|
||||
new CellButton(Guid.NewGuid().ToString(),"删除",TTypeMini.Error),
|
||||
new CellButton(Guid.NewGuid().ToString(),"进行测量",TTypeMini.Primary)
|
||||
}
|
||||
@ -387,7 +387,7 @@ namespace DHSoftware.Views
|
||||
{
|
||||
PreTreatParam preParam = new PreTreatParam()
|
||||
{
|
||||
|
||||
|
||||
CellLinks = new CellLink[] {
|
||||
new CellButton(Guid.NewGuid().ToString(),"编辑",TTypeMini.Primary),
|
||||
new CellButton(Guid.NewGuid().ToString(),"删除",TTypeMini.Error),
|
||||
@ -488,8 +488,8 @@ namespace DHSoftware.Views
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void InitData()
|
||||
{
|
||||
stDetectType.Items.Clear();
|
||||
@ -501,13 +501,13 @@ namespace DHSoftware.Views
|
||||
PreOutTable.Binding(detectionConfig.OUTPreTreatParams);
|
||||
lableTable.Binding(detectionConfig.DetectionLableList);
|
||||
SizeTable.Binding(detectionConfig.SizeTreatParamList);
|
||||
|
||||
|
||||
|
||||
if (detectionConfig.PreTreatParams.Count > 0)
|
||||
{
|
||||
foreach (var item in detectionConfig.PreTreatParams)
|
||||
{
|
||||
|
||||
|
||||
item.CellLinks = new CellLink[] {
|
||||
new CellButton(Guid.NewGuid().ToString(), "编辑", TTypeMini.Primary) ,
|
||||
new CellButton(Guid.NewGuid().ToString(), "删除", TTypeMini.Error)
|
||||
@ -573,8 +573,8 @@ 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);
|
||||
iptConfidence.DataBindings.Add("Text", detectionConfig, "ModelconfThreshold", 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);
|
||||
sthNGOriginal.DataBindings.Add("Checked", detectionConfig, "SaveNGOriginal", true, DataSourceUpdateMode.OnPropertyChanged);
|
||||
@ -644,16 +644,6 @@ namespace DHSoftware.Views
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
213
DHSoftware/Views/PreTreatUserControl.Designer.cs
generated
213
DHSoftware/Views/PreTreatUserControl.Designer.cs
generated
@ -1,213 +0,0 @@
|
||||
namespace DHSoftware.Views
|
||||
{
|
||||
partial class PreTreatUserControl
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
btnPreOpen = new AntdUI.Button();
|
||||
tbxPrePath = new TextBox();
|
||||
label1 = new AntdUI.Label();
|
||||
panel1 = new Panel();
|
||||
btnOParmDel = new Panel();
|
||||
label3 = new Label();
|
||||
btnDelOParm = new AntdUI.Button();
|
||||
tbOutputParm = new AntdUI.Table();
|
||||
btnAddOParm = new AntdUI.Button();
|
||||
panel2 = new Panel();
|
||||
label2 = new Label();
|
||||
btnDelIParm = new AntdUI.Button();
|
||||
tbInputParm = new AntdUI.Table();
|
||||
btnAddIParm = new AntdUI.Button();
|
||||
panel1.SuspendLayout();
|
||||
btnOParmDel.SuspendLayout();
|
||||
panel2.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// btnPreOpen
|
||||
//
|
||||
btnPreOpen.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnPreOpen.Location = new Point(570, 17);
|
||||
btnPreOpen.Name = "btnPreOpen";
|
||||
btnPreOpen.Size = new Size(28, 23);
|
||||
btnPreOpen.TabIndex = 21;
|
||||
btnPreOpen.Text = "...";
|
||||
btnPreOpen.Click += btnPreOpen_Click;
|
||||
//
|
||||
// tbxPrePath
|
||||
//
|
||||
tbxPrePath.Location = new Point(91, 17);
|
||||
tbxPrePath.Name = "tbxPrePath";
|
||||
tbxPrePath.Size = new Size(473, 23);
|
||||
tbxPrePath.TabIndex = 20;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.Location = new Point(12, 17);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(73, 23);
|
||||
label1.TabIndex = 19;
|
||||
label1.Text = "预处理路径";
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
panel1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
panel1.BorderStyle = BorderStyle.FixedSingle;
|
||||
panel1.Controls.Add(btnOParmDel);
|
||||
panel1.Controls.Add(panel2);
|
||||
panel1.Controls.Add(label1);
|
||||
panel1.Controls.Add(btnPreOpen);
|
||||
panel1.Controls.Add(tbxPrePath);
|
||||
panel1.Location = new Point(0, 0);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new Size(633, 243);
|
||||
panel1.TabIndex = 22;
|
||||
//
|
||||
// btnOParmDel
|
||||
//
|
||||
btnOParmDel.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
btnOParmDel.Controls.Add(label3);
|
||||
btnOParmDel.Controls.Add(btnDelOParm);
|
||||
btnOParmDel.Controls.Add(tbOutputParm);
|
||||
btnOParmDel.Controls.Add(btnAddOParm);
|
||||
btnOParmDel.Location = new Point(352, 44);
|
||||
btnOParmDel.Name = "btnOParmDel";
|
||||
btnOParmDel.Size = new Size(246, 194);
|
||||
btnOParmDel.TabIndex = 26;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
label3.AutoSize = true;
|
||||
label3.Location = new Point(3, 2);
|
||||
label3.Name = "label3";
|
||||
label3.Size = new Size(56, 17);
|
||||
label3.TabIndex = 25;
|
||||
label3.Text = "输出参数";
|
||||
//
|
||||
// btnDelOParm
|
||||
//
|
||||
btnDelOParm.Location = new Point(93, 25);
|
||||
btnDelOParm.Name = "btnDelOParm";
|
||||
btnDelOParm.Size = new Size(84, 34);
|
||||
btnDelOParm.TabIndex = 24;
|
||||
btnDelOParm.Text = "删除";
|
||||
//
|
||||
// tbOutputParm
|
||||
//
|
||||
tbOutputParm.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbOutputParm.Location = new Point(3, 65);
|
||||
tbOutputParm.Name = "tbOutputParm";
|
||||
tbOutputParm.Size = new Size(240, 126);
|
||||
tbOutputParm.TabIndex = 22;
|
||||
tbOutputParm.Text = "table2";
|
||||
//
|
||||
// btnAddOParm
|
||||
//
|
||||
btnAddOParm.Location = new Point(3, 25);
|
||||
btnAddOParm.Name = "btnAddOParm";
|
||||
btnAddOParm.Size = new Size(84, 34);
|
||||
btnAddOParm.TabIndex = 23;
|
||||
btnAddOParm.Text = "新增";
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
panel2.Controls.Add(label2);
|
||||
panel2.Controls.Add(btnDelIParm);
|
||||
panel2.Controls.Add(tbInputParm);
|
||||
panel2.Controls.Add(btnAddIParm);
|
||||
panel2.Location = new Point(12, 45);
|
||||
panel2.Name = "panel2";
|
||||
panel2.Size = new Size(264, 194);
|
||||
panel2.TabIndex = 25;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.AutoSize = true;
|
||||
label2.Location = new Point(3, 5);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new Size(56, 17);
|
||||
label2.TabIndex = 25;
|
||||
label2.Text = "输入参数";
|
||||
//
|
||||
// btnDelIParm
|
||||
//
|
||||
btnDelIParm.Location = new Point(93, 25);
|
||||
btnDelIParm.Name = "btnDelIParm";
|
||||
btnDelIParm.Size = new Size(84, 34);
|
||||
btnDelIParm.TabIndex = 24;
|
||||
btnDelIParm.Text = "删除";
|
||||
//
|
||||
// tbInputParm
|
||||
//
|
||||
tbInputParm.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tbInputParm.Location = new Point(3, 65);
|
||||
tbInputParm.Name = "tbInputParm";
|
||||
tbInputParm.Size = new Size(258, 126);
|
||||
tbInputParm.TabIndex = 22;
|
||||
tbInputParm.Text = "table1";
|
||||
//
|
||||
// btnAddIParm
|
||||
//
|
||||
btnAddIParm.Location = new Point(3, 25);
|
||||
btnAddIParm.Name = "btnAddIParm";
|
||||
btnAddIParm.Size = new Size(84, 34);
|
||||
btnAddIParm.TabIndex = 23;
|
||||
btnAddIParm.Text = "新增";
|
||||
//
|
||||
// PreTreatUserControl
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 17F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
Controls.Add(panel1);
|
||||
Name = "PreTreatUserControl";
|
||||
Size = new Size(635, 243);
|
||||
panel1.ResumeLayout(false);
|
||||
panel1.PerformLayout();
|
||||
btnOParmDel.ResumeLayout(false);
|
||||
btnOParmDel.PerformLayout();
|
||||
panel2.ResumeLayout(false);
|
||||
panel2.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private AntdUI.Button btnPreOpen;
|
||||
private TextBox tbxPrePath;
|
||||
private AntdUI.Label label1;
|
||||
private Panel panel1;
|
||||
private AntdUI.Button btnDelIParm;
|
||||
private AntdUI.Button btnAddIParm;
|
||||
private AntdUI.Table tbInputParm;
|
||||
private Panel panel2;
|
||||
private Panel btnOParmDel;
|
||||
private Label label3;
|
||||
private AntdUI.Button btnDelOParm;
|
||||
private AntdUI.Table tbOutputParm;
|
||||
private AntdUI.Button btnAddOParm;
|
||||
private Label label2;
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
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 DHSoftware.Views
|
||||
{
|
||||
public partial class PreTreatUserControl : UserControl
|
||||
{
|
||||
public PreTreatUserControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btnPreOpen_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
<?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>
|
122
DHSoftware/Views/SizeControl.Designer.cs
generated
122
DHSoftware/Views/SizeControl.Designer.cs
generated
@ -28,24 +28,32 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AntdUI.Tabs.StyleLine styleLine1 = new AntdUI.Tabs.StyleLine();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SizeControl));
|
||||
AntdUI.Tabs.StyleLine styleLine1 = new AntdUI.Tabs.StyleLine();
|
||||
tabPage3 = new AntdUI.TabPage();
|
||||
tabPage4 = new AntdUI.TabPage();
|
||||
tabs1 = new AntdUI.Tabs();
|
||||
panel3 = new AntdUI.Panel();
|
||||
SizeTable = new AntdUI.Table();
|
||||
panel2 = new AntdUI.Panel();
|
||||
flowCameraPanel = new AntdUI.FlowPanel();
|
||||
btnCorrelatedCamera = new AntdUI.Button();
|
||||
label11 = new AntdUI.Label();
|
||||
panel1 = new AntdUI.Panel();
|
||||
btnSizeDel = new AntdUI.Button();
|
||||
btnSizeAdd = new AntdUI.Button();
|
||||
SizeTable = new AntdUI.Table();
|
||||
tabs1 = new AntdUI.Tabs();
|
||||
tabPage3.SuspendLayout();
|
||||
tabPage4.SuspendLayout();
|
||||
tabs1.SuspendLayout();
|
||||
panel3.SuspendLayout();
|
||||
panel2.SuspendLayout();
|
||||
panel1.SuspendLayout();
|
||||
tabs1.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// tabPage3
|
||||
//
|
||||
tabPage3.Controls.Add(tabPage4);
|
||||
tabPage3.Dock = DockStyle.None;
|
||||
tabPage3.Location = new Point(3, 31);
|
||||
tabPage3.Name = "tabPage3";
|
||||
tabPage3.Size = new Size(909, 575);
|
||||
@ -54,7 +62,8 @@
|
||||
//
|
||||
// tabPage4
|
||||
//
|
||||
tabPage4.Controls.Add(SizeTable);
|
||||
tabPage4.Controls.Add(panel3);
|
||||
tabPage4.Controls.Add(panel2);
|
||||
tabPage4.Controls.Add(panel1);
|
||||
tabPage4.Location = new Point(8, 8);
|
||||
tabPage4.Name = "tabPage4";
|
||||
@ -62,18 +71,71 @@
|
||||
tabPage4.TabIndex = 1;
|
||||
tabPage4.Text = "预处理";
|
||||
//
|
||||
// tabs1
|
||||
// panel3
|
||||
//
|
||||
tabs1.Centered = true;
|
||||
tabs1.Dock = DockStyle.Fill;
|
||||
tabs1.Font = new Font("Microsoft YaHei UI", 10.5F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
tabs1.Location = new Point(0, 0);
|
||||
tabs1.Name = "tabs1";
|
||||
tabs1.Pages.Add(tabPage3);
|
||||
tabs1.Size = new Size(915, 609);
|
||||
tabs1.Style = styleLine1;
|
||||
tabs1.TabIndex = 1;
|
||||
tabs1.Text = "tabs1";
|
||||
panel3.Controls.Add(SizeTable);
|
||||
panel3.Dock = DockStyle.Fill;
|
||||
panel3.Location = new Point(0, 87);
|
||||
panel3.Name = "panel3";
|
||||
panel3.Size = new Size(909, 488);
|
||||
panel3.TabIndex = 11;
|
||||
panel3.Text = "panel3";
|
||||
//
|
||||
// SizeTable
|
||||
//
|
||||
SizeTable.Dock = DockStyle.Fill;
|
||||
SizeTable.EmptyHeader = true;
|
||||
SizeTable.Location = new Point(0, 0);
|
||||
SizeTable.Name = "SizeTable";
|
||||
SizeTable.Size = new Size(909, 488);
|
||||
SizeTable.TabIndex = 10;
|
||||
SizeTable.Text = "table1";
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
panel2.Controls.Add(flowCameraPanel);
|
||||
panel2.Controls.Add(btnCorrelatedCamera);
|
||||
panel2.Controls.Add(label11);
|
||||
panel2.Dock = DockStyle.Top;
|
||||
panel2.Location = new Point(0, 42);
|
||||
panel2.Margin = new Padding(3, 3, 10, 3);
|
||||
panel2.Name = "panel2";
|
||||
panel2.Size = new Size(909, 45);
|
||||
panel2.TabIndex = 8;
|
||||
panel2.Text = "panel2";
|
||||
//
|
||||
// flowCameraPanel
|
||||
//
|
||||
flowCameraPanel.AutoScroll = true;
|
||||
flowCameraPanel.BackColor = SystemColors.Window;
|
||||
flowCameraPanel.Dock = DockStyle.Left;
|
||||
flowCameraPanel.Location = new Point(74, 0);
|
||||
flowCameraPanel.Name = "flowCameraPanel";
|
||||
flowCameraPanel.Size = new Size(645, 45);
|
||||
flowCameraPanel.TabIndex = 36;
|
||||
flowCameraPanel.Text = "flowPanel1";
|
||||
//
|
||||
// btnCorrelatedCamera
|
||||
//
|
||||
btnCorrelatedCamera.BorderWidth = 2F;
|
||||
btnCorrelatedCamera.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
btnCorrelatedCamera.Ghost = true;
|
||||
btnCorrelatedCamera.IconRatio = 0.8F;
|
||||
btnCorrelatedCamera.IconSvg = resources.GetString("btnCorrelatedCamera.IconSvg");
|
||||
btnCorrelatedCamera.Location = new Point(750, 2);
|
||||
btnCorrelatedCamera.Name = "btnCorrelatedCamera";
|
||||
btnCorrelatedCamera.Size = new Size(110, 40);
|
||||
btnCorrelatedCamera.TabIndex = 34;
|
||||
btnCorrelatedCamera.Text = "关联";
|
||||
//
|
||||
// label11
|
||||
//
|
||||
label11.Dock = DockStyle.Left;
|
||||
label11.Location = new Point(0, 0);
|
||||
label11.Name = "label11";
|
||||
label11.Size = new Size(74, 45);
|
||||
label11.TabIndex = 35;
|
||||
label11.Text = "关联相机";
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
@ -114,15 +176,18 @@
|
||||
btnSizeAdd.TabIndex = 11;
|
||||
btnSizeAdd.Text = "新增";
|
||||
//
|
||||
// SizeTable
|
||||
// tabs1
|
||||
//
|
||||
SizeTable.Dock = DockStyle.Fill;
|
||||
SizeTable.EmptyHeader = true;
|
||||
SizeTable.Location = new Point(0, 42);
|
||||
SizeTable.Name = "SizeTable";
|
||||
SizeTable.Size = new Size(909, 533);
|
||||
SizeTable.TabIndex = 10;
|
||||
SizeTable.Text = "table1";
|
||||
tabs1.Centered = true;
|
||||
tabs1.Dock = DockStyle.Fill;
|
||||
tabs1.Font = new Font("Microsoft YaHei UI", 10.5F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
tabs1.Location = new Point(0, 0);
|
||||
tabs1.Name = "tabs1";
|
||||
tabs1.Pages.Add(tabPage3);
|
||||
tabs1.Size = new Size(915, 609);
|
||||
tabs1.Style = styleLine1;
|
||||
tabs1.TabIndex = 1;
|
||||
tabs1.Text = "tabs1";
|
||||
//
|
||||
// SizeControl
|
||||
//
|
||||
@ -133,8 +198,10 @@
|
||||
Size = new Size(915, 609);
|
||||
tabPage3.ResumeLayout(false);
|
||||
tabPage4.ResumeLayout(false);
|
||||
tabs1.ResumeLayout(false);
|
||||
panel3.ResumeLayout(false);
|
||||
panel2.ResumeLayout(false);
|
||||
panel1.ResumeLayout(false);
|
||||
tabs1.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
@ -147,5 +214,10 @@
|
||||
private AntdUI.Panel panel1;
|
||||
private AntdUI.Button btnSizeDel;
|
||||
private AntdUI.Button btnSizeAdd;
|
||||
private AntdUI.FlowPanel flowCameraPanel;
|
||||
private AntdUI.Label label11;
|
||||
private AntdUI.Button btnCorrelatedCamera;
|
||||
private AntdUI.Panel panel2;
|
||||
private AntdUI.Panel panel3;
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,51 @@ namespace DHSoftware.Views
|
||||
btnSizeAdd.Click += BtnSizeAdd_Click;
|
||||
btnSizeDel.Click += BtnSizeDelete_Click;
|
||||
SizeTable.CellButtonClick += SizeTable_CellButtonClick;
|
||||
btnCorrelatedCamera.Click += BtnCorrelatedCamera_Click;
|
||||
}
|
||||
private void BtnCorrelatedCamera_Click(object? sender, EventArgs e)
|
||||
{
|
||||
|
||||
var form = new CorrelatedCameraEdit(window, detectionConfig.CameraCollects) { Size = new Size(500, 400) };
|
||||
AntdUI.Modal.open(new AntdUI.Modal.Config(window, "", form, TType.None)
|
||||
{
|
||||
BtnHeight = 0,
|
||||
});
|
||||
if (form.submit)
|
||||
{
|
||||
flowCameraPanel.Controls.Clear();
|
||||
if (detectionConfig.CameraCollects.Count > 0)
|
||||
{
|
||||
foreach (var item in detectionConfig.CameraCollects)
|
||||
{
|
||||
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 detectionConfig.CameraCollects)
|
||||
{
|
||||
if (item.CameraSourceId.Equals(tag.Text))
|
||||
{
|
||||
detectionConfig.CameraCollects.Remove(item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
};
|
||||
// 通过主窗口设置DPI控制添加控件保持缩放比例
|
||||
window.AutoDpi(control);
|
||||
flowCameraPanel.Controls.Add(control);
|
||||
control.BringToFront();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -75,7 +119,7 @@ namespace DHSoftware.Views
|
||||
case "3":
|
||||
case "4":
|
||||
case "5":
|
||||
FrmMain3 frmMain3 = new FrmMain3(sizeType);
|
||||
FrmMainSize frmMain3 = new FrmMainSize(sizeType, detectionConfig);
|
||||
frmMain3.ShowDialog();
|
||||
if (!string.IsNullOrEmpty(frmMain3.inputtext))
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
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
|
||||
@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnCorrelatedCamera.IconSvg" xml:space="preserve">
|
||||
<value><svg t="1741939836774" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21349" width="200" height="200"><path d="M1003.153333 404.96a52.933333 52.933333 0 0 0-42.38-20.96H896V266.666667a53.393333 53.393333 0 0 0-53.333333-53.333334H461.253333a10.573333 10.573333 0 0 1-7.54-3.126666L344.46 100.953333A52.986667 52.986667 0 0 0 306.746667 85.333333H53.333333a53.393333 53.393333 0 0 0-53.333333 53.333334v704a53.393333 53.393333 0 0 0 53.333333 53.333333h796.893334a53.453333 53.453333 0 0 0 51.453333-39.333333l110.546667-405.333334a52.953333 52.953333 0 0 0-9.073334-46.373333zM53.333333 128h253.413334a10.573333 10.573333 0 0 1 7.54 3.126667l109.253333 109.253333A52.986667 52.986667 0 0 0 461.253333 256H842.666667a10.666667 10.666667 0 0 1 10.666666 10.666667v117.333333H173.773333a53.453333 53.453333 0 0 0-51.453333 39.333333L42.666667 715.366667V138.666667a10.666667 10.666667 0 0 1 10.666666-10.666667zm917.726667 312.14l-110.546667 405.333333a10.666667 10.666667 0 0 1-10.286666 7.86H63.226667a10.666667 10.666667 0 0 1-10.286667-13.473333l110.546667-405.333333A10.666667 10.666667 0 0 1 173.773333 426.666667h787a10.666667 10.666667 0 0 1 10.286667 13.473333z" fill="#5C5C66" p-id="21350"/></svg></value>
|
||||
</data>
|
||||
<data name="btnSizeDel.IconSvg" xml:space="preserve">
|
||||
<value><svg t="1741939836774" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21349" width="200" height="200"><path d="M1003.153333 404.96a52.933333 52.933333 0 0 0-42.38-20.96H896V266.666667a53.393333 53.393333 0 0 0-53.333333-53.333334H461.253333a10.573333 10.573333 0 0 1-7.54-3.126666L344.46 100.953333A52.986667 52.986667 0 0 0 306.746667 85.333333H53.333333a53.393333 53.393333 0 0 0-53.333333 53.333334v704a53.393333 53.393333 0 0 0 53.333333 53.333333h796.893334a53.453333 53.453333 0 0 0 51.453333-39.333333l110.546667-405.333334a52.953333 52.953333 0 0 0-9.073334-46.373333zM53.333333 128h253.413334a10.573333 10.573333 0 0 1 7.54 3.126667l109.253333 109.253333A52.986667 52.986667 0 0 0 461.253333 256H842.666667a10.666667 10.666667 0 0 1 10.666666 10.666667v117.333333H173.773333a53.453333 53.453333 0 0 0-51.453333 39.333333L42.666667 715.366667V138.666667a10.666667 10.666667 0 0 1 10.666666-10.666667zm917.726667 312.14l-110.546667 405.333333a10.666667 10.666667 0 0 1-10.286666 7.86H63.226667a10.666667 10.666667 0 0 1-10.286667-13.473333l110.546667-405.333333A10.666667 10.666667 0 0 1 173.773333 426.666667h787a10.666667 10.666667 0 0 1 10.286667 13.473333z" fill="#5C5C66" p-id="21350"/></svg></value>
|
||||
</data>
|
||||
|
167
DHSoftware/Views/UserConfigFrm.Designer.cs
generated
167
DHSoftware/Views/UserConfigFrm.Designer.cs
generated
@ -1,167 +0,0 @@
|
||||
namespace DHSoftware.Views
|
||||
{
|
||||
partial class UserConfigFrm
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
AntdUI.Tabs.StyleCard styleCard1 = new AntdUI.Tabs.StyleCard();
|
||||
pnlMenu = new AntdUI.Panel();
|
||||
panel3 = new AntdUI.Panel();
|
||||
btnSave = new AntdUI.Button();
|
||||
btnAdd = new AntdUI.Button();
|
||||
menu = new AntdUI.Menu();
|
||||
panel2 = new AntdUI.Panel();
|
||||
divider1 = new AntdUI.Divider();
|
||||
tabs = new AntdUI.Tabs();
|
||||
pnlMenu.SuspendLayout();
|
||||
panel3.SuspendLayout();
|
||||
panel2.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// pnlMenu
|
||||
//
|
||||
pnlMenu.Controls.Add(panel3);
|
||||
pnlMenu.Controls.Add(menu);
|
||||
pnlMenu.Dock = DockStyle.Left;
|
||||
pnlMenu.Location = new Point(0, 0);
|
||||
pnlMenu.Name = "pnlMenu";
|
||||
pnlMenu.Size = new Size(135, 542);
|
||||
pnlMenu.TabIndex = 0;
|
||||
pnlMenu.Text = "panel1";
|
||||
//
|
||||
// panel3
|
||||
//
|
||||
panel3.Back = SystemColors.Window;
|
||||
panel3.BackColor = SystemColors.Window;
|
||||
panel3.Controls.Add(btnSave);
|
||||
panel3.Controls.Add(btnAdd);
|
||||
panel3.Dock = DockStyle.Bottom;
|
||||
panel3.Location = new Point(0, 516);
|
||||
panel3.Name = "panel3";
|
||||
panel3.Size = new Size(135, 26);
|
||||
panel3.TabIndex = 2;
|
||||
panel3.Text = "panel3";
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
btnSave.BackActive = SystemColors.Control;
|
||||
btnSave.BackColor = SystemColors.Control;
|
||||
btnSave.Dock = DockStyle.Left;
|
||||
btnSave.ForeColor = Color.Black;
|
||||
btnSave.IconRatio = 1F;
|
||||
btnSave.IconSvg = "AppstoreAddOutlined";
|
||||
btnSave.Location = new Point(35, 0);
|
||||
btnSave.Name = "btnSave";
|
||||
btnSave.Size = new Size(35, 26);
|
||||
btnSave.TabIndex = 2;
|
||||
//
|
||||
// btnAdd
|
||||
//
|
||||
btnAdd.BackActive = SystemColors.Control;
|
||||
btnAdd.BackColor = SystemColors.Control;
|
||||
btnAdd.Dock = DockStyle.Left;
|
||||
btnAdd.ForeColor = Color.Black;
|
||||
btnAdd.IconRatio = 1F;
|
||||
btnAdd.IconSvg = "AppstoreAddOutlined";
|
||||
btnAdd.Location = new Point(0, 0);
|
||||
btnAdd.Name = "btnAdd";
|
||||
btnAdd.Size = new Size(35, 26);
|
||||
btnAdd.TabIndex = 1;
|
||||
btnAdd.Click += btnAdd_Click;
|
||||
//
|
||||
// menu
|
||||
//
|
||||
menu.Dock = DockStyle.Fill;
|
||||
menu.Location = new Point(0, 0);
|
||||
menu.Name = "menu";
|
||||
menu.Size = new Size(135, 542);
|
||||
menu.TabIndex = 0;
|
||||
menu.Text = "menu1";
|
||||
menu.SelectChanged += Menu_SelectChanged;
|
||||
menu.MouseDown += Menu_MouseDown;
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
panel2.Controls.Add(divider1);
|
||||
panel2.Controls.Add(tabs);
|
||||
panel2.Dock = DockStyle.Fill;
|
||||
panel2.Location = new Point(135, 0);
|
||||
panel2.Name = "panel2";
|
||||
panel2.Size = new Size(745, 542);
|
||||
panel2.TabIndex = 1;
|
||||
panel2.Text = "panel2";
|
||||
//
|
||||
// divider1
|
||||
//
|
||||
divider1.BackColor = SystemColors.ActiveCaption;
|
||||
divider1.Dock = DockStyle.Left;
|
||||
divider1.Location = new Point(0, 0);
|
||||
divider1.Name = "divider1";
|
||||
divider1.Size = new Size(10, 542);
|
||||
divider1.TabIndex = 1;
|
||||
divider1.Text = "";
|
||||
divider1.Vertical = true;
|
||||
//
|
||||
// tabs
|
||||
//
|
||||
tabs.Dock = DockStyle.Fill;
|
||||
tabs.Location = new Point(0, 0);
|
||||
tabs.Name = "tabs";
|
||||
tabs.Size = new Size(745, 542);
|
||||
tabs.Style = styleCard1;
|
||||
tabs.TabIndex = 0;
|
||||
tabs.Text = "tabs1";
|
||||
tabs.Type = AntdUI.TabType.Card;
|
||||
tabs.SelectedIndexChanged += tabs_SelectedIndexChanged;
|
||||
//
|
||||
// UserConfigFrm
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 17F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
AutoSize = true;
|
||||
Controls.Add(panel2);
|
||||
Controls.Add(pnlMenu);
|
||||
Name = "UserConfigFrm";
|
||||
Size = new Size(880, 542);
|
||||
pnlMenu.ResumeLayout(false);
|
||||
panel3.ResumeLayout(false);
|
||||
panel2.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
private AntdUI.Tabs tabs;
|
||||
private AntdUI.Panel pnlMenu;
|
||||
private AntdUI.Panel panel2;
|
||||
private AntdUI.Menu menu;
|
||||
private AntdUI.Panel panel3;
|
||||
private AntdUI.Button btnSave;
|
||||
private AntdUI.Button btnAdd;
|
||||
private AntdUI.Divider divider1;
|
||||
// private AntdUI.Tabs tabs;
|
||||
}
|
||||
}
|
@ -1,257 +0,0 @@
|
||||
using AntdUI;
|
||||
using AntdUIDemo.Models;
|
||||
using DH.Commons.Base;
|
||||
using DH.Devices.Vision;
|
||||
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 static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
using Window = AntdUI.Window;
|
||||
|
||||
namespace DHSoftware.Views
|
||||
{
|
||||
public partial class UserConfigFrm : UserControl
|
||||
{
|
||||
public List<CameraBase> cameras = new List<CameraBase>();
|
||||
public List<DetectionConfig> detections = new List<DetectionConfig>();
|
||||
private UserControl currControl;
|
||||
private bool isUpdatingTabs = false;//用于阻止Tabs更新
|
||||
public Window Window;
|
||||
public UserConfigFrm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
LoadMenu();
|
||||
menu.Width = (int)(100 * Config.Dpi);
|
||||
|
||||
}
|
||||
private void LoadMenu(string filter = "")
|
||||
{
|
||||
menu.Items.Clear();
|
||||
|
||||
string lang = AntdUI.Localization.CurrentLanguage;
|
||||
var menuItems = DataUtil.Menu_decetion;
|
||||
//var menuIcons = DataUtil.MenuIcons_zhcn;
|
||||
//if (lang.StartsWith("en"))
|
||||
//{
|
||||
// menuItems = DataUtil.MenuItems_enus;
|
||||
// menuIcons = DataUtil.MenuIcons_enus;
|
||||
//}
|
||||
|
||||
foreach (var rootItem in menuItems)
|
||||
{
|
||||
var rootKey = rootItem.Key.ToLower();
|
||||
var rootMenu = new AntdUI.MenuItem
|
||||
{
|
||||
Text = rootItem.Key,
|
||||
//IconSvg = menuIcons.TryGetValue(rootItem.Key, out var icon) ? icon : "UnorderedListOutlined",
|
||||
};
|
||||
bool rootVisible = false; // 用于标记是否显示根节点
|
||||
|
||||
foreach (var item in rootItem.Value)
|
||||
{
|
||||
var childText = item.Text.ToLower();
|
||||
|
||||
// 如果子节点包含搜索文本
|
||||
if (childText.Contains(filter))
|
||||
{
|
||||
var menuItem = new AntdUI.MenuItem
|
||||
{
|
||||
Text = item.Text,
|
||||
IconSvg = item.IconSvg,
|
||||
Tag = item.Tag,
|
||||
};
|
||||
rootMenu.Sub.Add(menuItem);
|
||||
rootVisible = true; // 如果有子节点包含,则显示根节点
|
||||
}
|
||||
}
|
||||
|
||||
// 如果根节点包含搜索文本,或有可见的子节点,则显示根节点
|
||||
if (rootKey.Contains(filter) || rootVisible)
|
||||
{
|
||||
menu.Items.Add(rootMenu);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void SelectMenu()
|
||||
{
|
||||
if (isUpdatingTabs) return;
|
||||
var text = tabs.SelectedTab?.Text; // 使用安全导航操作符,防止 SelectedTab 为 null
|
||||
if (string.IsNullOrEmpty(text)) // 检查 text 是否为 null 或空
|
||||
{
|
||||
return; // 如果 text 为空,直接退出方法
|
||||
}
|
||||
//首页
|
||||
if (text == AntdUI.Localization.Get("home", "主页"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var rootIndex = 0;
|
||||
var subIndex = 0;
|
||||
var menuItemsCopy = menu.Items.ToList(); // 创建副本
|
||||
for (int i = 0; i < menuItemsCopy.Count; i++)
|
||||
{
|
||||
for (int j = 0; j < menuItemsCopy[i].Sub.Count; j++)
|
||||
{
|
||||
if (menuItemsCopy[i].Sub[j].Tag.ToString() == text)
|
||||
{
|
||||
rootIndex = i;
|
||||
subIndex = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
menu.SelectIndex(rootIndex, subIndex, true);
|
||||
}
|
||||
private void Menu_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
// 转换坐标到控件内部坐标系(考虑滚动条)
|
||||
Point clickPoint = new Point(e.X, e.Y + menu.ScrollBar.Value);
|
||||
|
||||
// 递归查找命中的菜单项
|
||||
MenuItem clickedItem = FindClickedItem(menu.Items, clickPoint);
|
||||
|
||||
if (clickedItem != null)
|
||||
{
|
||||
// 显示节点名称弹窗
|
||||
//MessageBox.Show($"右键点击的节点: {clickedItem.Text}");
|
||||
|
||||
var menulist = new AntdUI.IContextMenuStripItem[]
|
||||
{
|
||||
new AntdUI.ContextMenuStripItem("关联相机", "")
|
||||
{
|
||||
IconSvg = "VideoCameraAddOutlined"
|
||||
}
|
||||
};
|
||||
AntdUI.ContextMenuStrip.open(menu, it =>
|
||||
{
|
||||
if (it.Text == "关联相机")
|
||||
{
|
||||
//using (var dlg = new AddCameraWindow(cameras))
|
||||
//{
|
||||
// if (dlg.ShowDialog() == DialogResult.OK)
|
||||
// {
|
||||
// var newItem = new MenuItem(dlg.CubicleName);
|
||||
// newItem.IconSvg = "VideoCameraOutlined";
|
||||
// //// 防止重复添加
|
||||
// //if (!menu1.Items.Cast<MenuItem>().Any(m => m.Text == newItem.Text))
|
||||
// //{
|
||||
// clickedItem.Sub.Add(newItem);
|
||||
// //}
|
||||
// //else
|
||||
// //{
|
||||
// // AntdUI.Notification.warn(this, "新增失败", $"{dlg.CubicleName}已存在!", autoClose: 3, align: TAlignFrom.TR);
|
||||
// //}
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}, menulist);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private MenuItem FindClickedItem(MenuItemCollection items, Point clickPoint)
|
||||
{
|
||||
foreach (MenuItem item in items)
|
||||
{
|
||||
// 检查当前项是否可见且包含点击坐标
|
||||
if (item.Visible && item.Rect.Contains(clickPoint))
|
||||
{
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void Menu_SelectChanged(object sender, MenuSelectEventArgs e)
|
||||
{
|
||||
string name = (string)e.Value.Tag;
|
||||
|
||||
//// 清理上一个浮动按钮窗体
|
||||
//if (currControl is FloatButtonDemo floatButtonDemo)
|
||||
//{
|
||||
// floatButtonDemo.CloseFloatButtonForm();
|
||||
//}
|
||||
|
||||
// 检查是否已存在同名 TabPage
|
||||
foreach (var tab in tabs.Pages)
|
||||
{
|
||||
if (tab is AntdUI.TabPage existingTab && existingTab.Text == name)
|
||||
{
|
||||
isUpdatingTabs = true;
|
||||
tabs.SelectedTab = existingTab;
|
||||
isUpdatingTabs = false;
|
||||
currControl = existingTab.Controls.Count > 0 ? existingTab.Controls[0] as UserControl : null;
|
||||
return;
|
||||
}
|
||||
}
|
||||
int width = tabs.Width;
|
||||
int height = tabs.Height;
|
||||
// 创建新 TabPage
|
||||
UserDetetion control = new UserDetetion(Window,width, height);
|
||||
// control._windows = Window;
|
||||
switch (name)
|
||||
{
|
||||
case "工位1":
|
||||
// control =
|
||||
break;
|
||||
}
|
||||
|
||||
if (control != null)
|
||||
{
|
||||
control.Dock = DockStyle.Fill;
|
||||
// AutoDpi(control); // 如果有 DPI 适配逻辑
|
||||
|
||||
var tabPage = new AntdUI.TabPage
|
||||
{
|
||||
Dock = DockStyle.Fill,
|
||||
Text = name,
|
||||
};
|
||||
tabPage.Controls.Add(control);
|
||||
tabs.Pages.Add(tabPage);
|
||||
|
||||
isUpdatingTabs = true;
|
||||
tabs.SelectedTab = tabPage;
|
||||
isUpdatingTabs = false;
|
||||
currControl = control;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void tabs_SelectedIndexChanged(object sender, IntEventArgs e)
|
||||
{
|
||||
SelectMenu();
|
||||
}
|
||||
|
||||
private void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
//using (var dlg = new AddCubicleWindow())
|
||||
//{
|
||||
// if (dlg.ShowDialog() == DialogResult.OK)
|
||||
// {
|
||||
// var newItem = new MenuItem(dlg.CubicleName);
|
||||
// //newItem.IconSvg = "AppstoreOutlined";
|
||||
// // 防止重复添加
|
||||
// if (!menu.Items.Cast<MenuItem>().Any(m => m.Text == newItem.Text))
|
||||
// {
|
||||
// menu.Items.Add(newItem);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // AntdUI.Notification.warn(this, "新增工位失败", $"{dlg.CubicleName}已存在!", autoClose: 3, align: TAlignFrom.TR);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
<?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>
|
70
DHSoftware/Views/UserDetetion.Designer.cs
generated
70
DHSoftware/Views/UserDetetion.Designer.cs
generated
@ -1,70 +0,0 @@
|
||||
namespace DHSoftware.Views
|
||||
{
|
||||
partial class UserDetetion
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
collapse1 = new AntdUI.Collapse();
|
||||
panel1 = new Panel();
|
||||
SuspendLayout();
|
||||
//
|
||||
// collapse1
|
||||
//
|
||||
collapse1.Dock = DockStyle.Fill;
|
||||
collapse1.Location = new Point(0, 0);
|
||||
collapse1.Name = "collapse1";
|
||||
collapse1.Size = new Size(842, 568);
|
||||
collapse1.TabIndex = 0;
|
||||
collapse1.Text = "collapse1";
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
panel1.BackColor = SystemColors.GradientActiveCaption;
|
||||
panel1.Dock = DockStyle.Left;
|
||||
panel1.Location = new Point(0, 0);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new Size(2, 568);
|
||||
panel1.TabIndex = 0;
|
||||
//
|
||||
// UserDetetion
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 17F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
Controls.Add(panel1);
|
||||
Controls.Add(collapse1);
|
||||
Name = "UserDetetion";
|
||||
Size = new Size(842, 568);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private AntdUI.Collapse collapse1;
|
||||
private Panel panel1;
|
||||
//private AntdUI.Button button1;
|
||||
}
|
||||
}
|
@ -1,226 +0,0 @@
|
||||
using AntdUI;
|
||||
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 Button = AntdUI.Button;
|
||||
|
||||
namespace DHSoftware.Views
|
||||
{
|
||||
public partial class UserDetetion : UserControl
|
||||
{
|
||||
private StackPanel panel, panel2, panel3, panel4;
|
||||
public Window _windows;
|
||||
//根据检测配置 将对应的相机配置、中处理预处理、尺寸测量
|
||||
public UserDetetion(Window windows,int parentWidth, int parentHeight)
|
||||
{
|
||||
InitializeComponent();
|
||||
_windows = windows;
|
||||
AntdUI.CollapseItem group1 = new CollapseItem();
|
||||
group1.Height = parentHeight / 4;
|
||||
group1.Text = "相机配置";
|
||||
AntdUI.CollapseItem group2 = new CollapseItem();
|
||||
group2.Text = "预处理";
|
||||
group2.Height = parentHeight/4;
|
||||
|
||||
AntdUI.CollapseItem group3 = new CollapseItem();
|
||||
group3.Text = "中处理";
|
||||
group3.Height = parentHeight - 300;
|
||||
|
||||
AntdUI.CollapseItem group4 = new CollapseItem();
|
||||
group4.Text = "尺寸测量";
|
||||
group4.Height = parentHeight / 4;
|
||||
|
||||
|
||||
// 初始化内容面板
|
||||
panel = CreateScrollPanel();
|
||||
panel2 = CreateScrollPanel();
|
||||
panel3 = CreateScrollPanel();
|
||||
panel4 = CreateScrollPanel();
|
||||
|
||||
// 添加预处理控件
|
||||
var ptuc = new PreTreatUserControl { AutoScroll = true, Dock = DockStyle.Top };
|
||||
var detect = new DetectConfigControl { AutoScroll = true , Dock = DockStyle.Fill };
|
||||
detect._window = this._windows;
|
||||
|
||||
// 添加尺寸测量控件
|
||||
//var sizeFrm = new SizeControl();
|
||||
|
||||
|
||||
CameraConfigControl camConfigFrm = new CameraConfigControl();
|
||||
camConfigFrm.Dock = DockStyle.Fill;
|
||||
|
||||
|
||||
|
||||
//PreTreatUserControl ptuc = new PreTreatUserControl();
|
||||
//ptuc.AutoScroll = true;
|
||||
//panel2.Controls.Add(ptuc);
|
||||
//DetectConfigControl detect = new DetectConfigControl();
|
||||
//// detect.Dock = DockStyle.Fill;
|
||||
//detect.AutoScroll = true;
|
||||
//panel2.Controls.Add(detect);
|
||||
|
||||
|
||||
//SizeConfigControl Sizefc = new SizeConfigControl();
|
||||
//Sizefc.Dock = DockStyle.Fill;
|
||||
//panel3.Controls.Add(Sizefc);
|
||||
|
||||
|
||||
|
||||
Button btnAddCam = new Button
|
||||
{
|
||||
Width = 100,
|
||||
Height = 30,
|
||||
Text = "添加相机配置",
|
||||
//Dock=DockStyle.Bottom
|
||||
};
|
||||
Button btnDelCam = new Button
|
||||
{
|
||||
Width = 100,
|
||||
Height = 30,
|
||||
Text = "删除相机配置",
|
||||
// Dock = DockStyle.Bottom
|
||||
};
|
||||
|
||||
|
||||
Button btnAddModel = new Button
|
||||
{
|
||||
Width = 100,
|
||||
Height = 30,
|
||||
Text = "添加模型配置",
|
||||
//Dock=DockStyle.Bottom
|
||||
};
|
||||
Button btnDelModel = new Button
|
||||
{
|
||||
Width = 100,
|
||||
Height = 30,
|
||||
Text = "删除模型配置",
|
||||
// Dock = DockStyle.Bottom
|
||||
};
|
||||
|
||||
FlowLayoutPanel flow = new FlowLayoutPanel();
|
||||
flow.Dock = DockStyle.Bottom;
|
||||
flow.Controls.Add(btnAddCam);
|
||||
flow.Controls.Add(btnDelCam);
|
||||
|
||||
FlowLayoutPanel flowmodel = new FlowLayoutPanel();
|
||||
flowmodel.Dock = DockStyle.Bottom;
|
||||
flowmodel.Controls.Add(btnAddModel);
|
||||
flowmodel.Controls.Add(btnDelModel);
|
||||
btnAddCam.Click += btnAddCam_Click;
|
||||
btnDelCam.Click += btnDelCam_Click;
|
||||
btnAddModel.Click += btnAddModel_Click;
|
||||
btnDelModel.Click += btnDelModel_Click;
|
||||
|
||||
panel.Controls.Add(flow);
|
||||
panel.Controls.Add(camConfigFrm);
|
||||
|
||||
panel2.Controls.Add(ptuc);
|
||||
panel3.Controls.Add(flowmodel);
|
||||
panel3.Controls.Add(detect);
|
||||
//panel4.Controls.Add(sizeFrm);
|
||||
group1.Controls.Add(panel);
|
||||
group2.Controls.Add(panel2);
|
||||
group3.Controls.Add(panel3);
|
||||
group4.Controls.Add(panel4);
|
||||
|
||||
|
||||
//collapse1.Items.Add(group1);
|
||||
collapse1.Items.Add(group1);
|
||||
collapse1.Items.Add(group2);
|
||||
collapse1.Items.Add(group3);
|
||||
collapse1.Items.Add(group4);
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 统一事件处理
|
||||
private void CameraOperation_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (sender is Button btn)
|
||||
{
|
||||
switch (btn.Tag?.ToString())
|
||||
{
|
||||
case "Add":
|
||||
AddCameraConfig();
|
||||
break;
|
||||
case "Delete":
|
||||
DeleteCameraConfig();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 实际业务方法
|
||||
private void AddCameraConfig()
|
||||
{
|
||||
var newCamConfig = new CameraConfigControl { Dock = DockStyle.Top };
|
||||
panel.Controls.Add(newCamConfig);
|
||||
panel.ScrollControlIntoView(newCamConfig);
|
||||
}
|
||||
|
||||
private void DeleteCameraConfig()
|
||||
{
|
||||
if (panel.Controls.Count > 1)
|
||||
{
|
||||
panel.Controls.RemoveAt(panel.Controls.Count - 2);
|
||||
}
|
||||
}
|
||||
// 创建带滚动条的面板
|
||||
private StackPanel CreateScrollPanel()
|
||||
{
|
||||
return new StackPanel
|
||||
{
|
||||
Dock = DockStyle.Fill,
|
||||
Vertical = true,
|
||||
AutoScroll = true,
|
||||
Padding = new Padding(5) // 添加内边距避免内容贴边
|
||||
};
|
||||
}
|
||||
|
||||
private void btnAddCam_Click(object sender, EventArgs e)
|
||||
{
|
||||
CameraConfigControl camConfigFrm2 = new CameraConfigControl();
|
||||
camConfigFrm2.Dock = DockStyle.Fill;
|
||||
|
||||
panel.Controls.Add(camConfigFrm2);
|
||||
}
|
||||
private void btnDelCam_Click(object sender, EventArgs e)
|
||||
{
|
||||
// 遍历 panel 的 Controls,找到最后一个 CameraConfigControl 并移除
|
||||
for (int i = panel.Controls.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (panel.Controls[i] is CameraConfigControl)
|
||||
{
|
||||
panel.Controls.RemoveAt(i);
|
||||
break; // 只删除一个
|
||||
}
|
||||
}
|
||||
}
|
||||
private void btnAddModel_Click(object sender, EventArgs e)
|
||||
{
|
||||
DetectConfigControl DetectFrm = new DetectConfigControl();
|
||||
DetectFrm._window = this._windows;
|
||||
DetectFrm.Dock = DockStyle.Fill;
|
||||
|
||||
panel3.Controls.Add(DetectFrm);
|
||||
}
|
||||
private void btnDelModel_Click(object sender, EventArgs e)
|
||||
{
|
||||
// 遍历 panel 的 Controls,找到最后一个 CameraConfigControl 并移除
|
||||
for (int i = panel3.Controls.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (panel3.Controls[i] is DetectConfigControl)
|
||||
{
|
||||
panel3.Controls.RemoveAt(i);
|
||||
break; // 只删除一个
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
<?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>
|
Reference in New Issue
Block a user