From a9bc7819f4f7e66159a93e955944728c25ba3e53 Mon Sep 17 00:00:00 2001
From: C3204 <zhengyabo@lanpucloud.cn>
Date: 星期三, 07 一月 2026 14:10:11 +0800
Subject: [PATCH] 优化相机管理和界面布局 - 在 `CreateCameraForm.cs` 中添加对 `LBCameras` 的引用,并修复相机创建逻辑。 - 调整 `VisionForm.Designer.cs` 和 `2DCameraForm.Designer.cs` 中多个控件的大小和位置,改善界面布局。 - 在 `VisionForm.cs` 中添加对 `LBCameras` 的引用以支持新相机类型。 - 注释掉 `PHM6000Sensor.cs` 和 `PHM6000Profiler.cs` 中与相机信息获取相关的 P/Invoke 方法。 - 重构 `LBCamera.cs`,添加新的相机初始化和参数设置逻辑,确保与 PHM6000 SDK 的兼容性。 - 移除 `PHM6000Camera.cs` 中与 `PHM6000Camera` 相关的代码,简化相机管理逻辑。 Merge branch 'master' of http://lanpucloud.cn:1111/r/~zhengyabo/LB_TyreAppearanceInspectionSoftware
---
LB_SmartVision/VisionForm.Designer.cs | 74 +++++++++++++++++++++---------------
1 files changed, 43 insertions(+), 31 deletions(-)
diff --git a/LB_SmartVision/VisionForm.Designer.cs b/LB_SmartVision/VisionForm.Designer.cs
index 03ab3bc..d07cbae 100644
--- a/LB_SmartVision/VisionForm.Designer.cs
+++ b/LB_SmartVision/VisionForm.Designer.cs
@@ -61,11 +61,12 @@
theme_VisionForm.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 0);
theme_VisionForm.Image = (Image)resources.GetObject("theme_VisionForm.Image");
theme_VisionForm.Location = new Point(0, 0);
+ theme_VisionForm.Margin = new Padding(4);
theme_VisionForm.Name = "theme_VisionForm";
- theme_VisionForm.Padding = new Padding(10, 70, 10, 9);
+ theme_VisionForm.Padding = new Padding(12, 88, 12, 11);
theme_VisionForm.RoundCorners = true;
theme_VisionForm.Sizable = true;
- theme_VisionForm.Size = new Size(1152, 704);
+ theme_VisionForm.Size = new Size(1440, 880);
theme_VisionForm.SmartBounds = true;
theme_VisionForm.StartPosition = FormStartPosition.WindowsDefaultLocation;
theme_VisionForm.TabIndex = 0;
@@ -75,7 +76,8 @@
//
sc_VisionForm.Dock = DockStyle.Fill;
sc_VisionForm.FixedPanel = FixedPanel.Panel2;
- sc_VisionForm.Location = new Point(10, 70);
+ sc_VisionForm.Location = new Point(12, 88);
+ sc_VisionForm.Margin = new Padding(4);
sc_VisionForm.Name = "sc_VisionForm";
sc_VisionForm.Orientation = Orientation.Horizontal;
//
@@ -86,8 +88,9 @@
// sc_VisionForm.Panel2
//
sc_VisionForm.Panel2.Controls.Add(grb_Info);
- sc_VisionForm.Size = new Size(1132, 625);
- sc_VisionForm.SplitterDistance = 478;
+ sc_VisionForm.Size = new Size(1416, 781);
+ sc_VisionForm.SplitterDistance = 593;
+ sc_VisionForm.SplitterWidth = 5;
sc_VisionForm.TabIndex = 1;
//
// tlp_MainView
@@ -102,23 +105,24 @@
tlp_MainView.Margin = new Padding(2);
tlp_MainView.Name = "tlp_MainView";
tlp_MainView.RowCount = 3;
- tlp_MainView.RowStyles.Add(new RowStyle(SizeType.Absolute, 48F));
- tlp_MainView.RowStyles.Add(new RowStyle(SizeType.Absolute, 31F));
+ tlp_MainView.RowStyles.Add(new RowStyle(SizeType.Absolute, 60F));
+ tlp_MainView.RowStyles.Add(new RowStyle(SizeType.Absolute, 39F));
tlp_MainView.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
- tlp_MainView.Size = new Size(1132, 478);
+ tlp_MainView.Size = new Size(1416, 593);
tlp_MainView.TabIndex = 1;
tlp_MainView.TagString = null;
+ //
// materialTabControl
//
materialTabControl.AccessibleRole = AccessibleRole.Sound;
materialTabControl.Depth = 0;
materialTabControl.Dock = DockStyle.Fill;
- materialTabControl.Location = new Point(2, 81);
+ materialTabControl.Location = new Point(2, 101);
materialTabControl.Margin = new Padding(2);
materialTabControl.MouseState = MaterialSkin.MouseState.HOVER;
materialTabControl.Name = "materialTabControl";
materialTabControl.SelectedIndex = 0;
- materialTabControl.Size = new Size(1128, 395);
+ materialTabControl.Size = new Size(1412, 490);
materialTabControl.TabIndex = 0;
//
// tlp_VisionMainOperator
@@ -139,11 +143,12 @@
tlp_VisionMainOperator.Controls.Add(btn_GlobalVar, 7, 0);
tlp_VisionMainOperator.Controls.Add(com_ProductName, 8, 0);
tlp_VisionMainOperator.Dock = DockStyle.Fill;
- tlp_VisionMainOperator.Location = new Point(3, 51);
+ tlp_VisionMainOperator.Location = new Point(4, 64);
+ tlp_VisionMainOperator.Margin = new Padding(4);
tlp_VisionMainOperator.Name = "tlp_VisionMainOperator";
tlp_VisionMainOperator.RowCount = 1;
tlp_VisionMainOperator.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
- tlp_VisionMainOperator.Size = new Size(1126, 25);
+ tlp_VisionMainOperator.Size = new Size(1408, 31);
tlp_VisionMainOperator.TabIndex = 0;
tlp_VisionMainOperator.TagString = null;
//
@@ -152,10 +157,11 @@
ckb_AllowRun.Dock = DockStyle.Fill;
ckb_AllowRun.Font = new Font("瀹嬩綋", 12F, FontStyle.Regular, GraphicsUnit.Point, 134);
ckb_AllowRun.ForeColor = SystemColors.Control;
- ckb_AllowRun.Location = new Point(3, 3);
+ ckb_AllowRun.Location = new Point(4, 4);
+ ckb_AllowRun.Margin = new Padding(4);
ckb_AllowRun.MinimumSize = new Size(1, 1);
ckb_AllowRun.Name = "ckb_AllowRun";
- ckb_AllowRun.Size = new Size(119, 19);
+ ckb_AllowRun.Size = new Size(148, 23);
ckb_AllowRun.TabIndex = 2;
ckb_AllowRun.Text = "杩愯妯″紡";
//
@@ -170,11 +176,12 @@
btn_Login.Image = null;
btn_Login.ImageAlign = ContentAlignment.MiddleLeft;
btn_Login.InactiveColor = Color.FromArgb(32, 34, 37);
- btn_Login.Location = new Point(128, 3);
+ btn_Login.Location = new Point(160, 4);
+ btn_Login.Margin = new Padding(4);
btn_Login.Name = "btn_Login";
btn_Login.PressedBorderColor = Color.FromArgb(165, 37, 37);
btn_Login.PressedColor = Color.FromArgb(165, 37, 37);
- btn_Login.Size = new Size(119, 19);
+ btn_Login.Size = new Size(148, 23);
btn_Login.TabIndex = 3;
btn_Login.Text = "鐢ㄦ埛鐧诲綍";
btn_Login.TextAlignment = StringAlignment.Center;
@@ -191,11 +198,12 @@
btn_GlobalVar.Image = null;
btn_GlobalVar.ImageAlign = ContentAlignment.MiddleLeft;
btn_GlobalVar.InactiveColor = Color.FromArgb(32, 34, 37);
- btn_GlobalVar.Location = new Point(878, 3);
+ btn_GlobalVar.Location = new Point(1096, 4);
+ btn_GlobalVar.Margin = new Padding(4);
btn_GlobalVar.Name = "btn_GlobalVar";
btn_GlobalVar.PressedBorderColor = Color.FromArgb(165, 37, 37);
btn_GlobalVar.PressedColor = Color.FromArgb(165, 37, 37);
- btn_GlobalVar.Size = new Size(119, 19);
+ btn_GlobalVar.Size = new Size(148, 23);
btn_GlobalVar.TabIndex = 4;
btn_GlobalVar.Text = "鍏ㄥ眬鍙橀噺";
btn_GlobalVar.TextAlignment = StringAlignment.Center;
@@ -209,9 +217,10 @@
com_ProductName.EnabledCalc = true;
com_ProductName.FormattingEnabled = true;
com_ProductName.ItemHeight = 20;
- com_ProductName.Location = new Point(1003, 3);
+ com_ProductName.Location = new Point(1252, 4);
+ com_ProductName.Margin = new Padding(4);
com_ProductName.Name = "com_ProductName";
- com_ProductName.Size = new Size(120, 26);
+ com_ProductName.Size = new Size(152, 26);
com_ProductName.TabIndex = 5;
com_ProductName.SelectedValueChanged += com_ProductName_SelectedValueChanged;
//
@@ -220,10 +229,11 @@
materialTabSelector.BaseTabControl = null;
materialTabSelector.Depth = 0;
materialTabSelector.Dock = DockStyle.Fill;
- materialTabSelector.Location = new Point(3, 3);
+ materialTabSelector.Location = new Point(4, 4);
+ materialTabSelector.Margin = new Padding(4);
materialTabSelector.MouseState = MaterialSkin.MouseState.HOVER;
materialTabSelector.Name = "materialTabSelector";
- materialTabSelector.Size = new Size(1126, 42);
+ materialTabSelector.Size = new Size(1408, 52);
materialTabSelector.TabIndex = 1;
//
// grb_Info
@@ -234,11 +244,11 @@
grb_Info.Font = new Font("瀹嬩綋", 12F, FontStyle.Regular, GraphicsUnit.Point, 134);
grb_Info.ForeColor = SystemColors.Control;
grb_Info.Location = new Point(0, 0);
- grb_Info.Margin = new Padding(4, 5, 4, 5);
+ grb_Info.Margin = new Padding(5, 6, 5, 6);
grb_Info.MinimumSize = new Size(1, 1);
grb_Info.Name = "grb_Info";
- grb_Info.Padding = new Padding(0, 32, 0, 0);
- grb_Info.Size = new Size(1132, 143);
+ grb_Info.Padding = new Padding(0, 40, 0, 0);
+ grb_Info.Size = new Size(1416, 183);
grb_Info.TabIndex = 1;
grb_Info.Text = "鏃ュ織鏄剧ず鍖猴細";
grb_Info.TextAlignment = ContentAlignment.MiddleLeft;
@@ -248,13 +258,13 @@
rich_Info.Dock = DockStyle.Fill;
rich_Info.FillColor = Color.FromArgb(32, 41, 50);
rich_Info.Font = new Font("瀹嬩綋", 12F, FontStyle.Regular, GraphicsUnit.Point, 134);
- rich_Info.Location = new Point(0, 32);
+ rich_Info.Location = new Point(0, 40);
rich_Info.Margin = new Padding(4, 5, 4, 5);
rich_Info.MinimumSize = new Size(1, 1);
rich_Info.Name = "rich_Info";
rich_Info.Padding = new Padding(2);
rich_Info.ShowText = false;
- rich_Info.Size = new Size(1132, 111);
+ rich_Info.Size = new Size(1416, 143);
rich_Info.TabIndex = 0;
rich_Info.TextAlignment = ContentAlignment.MiddleLeft;
//
@@ -268,7 +278,8 @@
cb_VisionForm.EnableMaximizeButton = true;
cb_VisionForm.EnableMinimizeButton = true;
cb_VisionForm.ForeColor = Color.FromArgb(155, 155, 155);
- cb_VisionForm.Location = new Point(1052, 18);
+ cb_VisionForm.Location = new Point(1315, 18);
+ cb_VisionForm.Margin = new Padding(4);
cb_VisionForm.MaximizeHoverColor = Color.FromArgb(74, 74, 74);
cb_VisionForm.MinimizeHoverColor = Color.FromArgb(63, 63, 65);
cb_VisionForm.Name = "cb_VisionForm";
@@ -278,13 +289,14 @@
//
// VisionForm
//
- AutoScaleDimensions = new SizeF(96F, 96F);
+ AutoScaleDimensions = new SizeF(120F, 120F);
AutoScaleMode = AutoScaleMode.Dpi;
- ClientSize = new Size(1152, 704);
+ ClientSize = new Size(1440, 880);
Controls.Add(theme_VisionForm);
FormBorderStyle = FormBorderStyle.None;
Icon = (Icon)resources.GetObject("$this.Icon");
- MinimumSize = new Size(261, 61);
+ Margin = new Padding(4);
+ MinimumSize = new Size(326, 76);
Name = "VisionForm";
Text = "杞儙澶栬瑙嗚妫�娴嬬郴缁�";
TransparencyKey = Color.Fuchsia;
--
Gitblit v1.9.3