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 |   67 ++++++++++-----------------------
 1 files changed, 21 insertions(+), 46 deletions(-)

diff --git a/LB_SmartVision/VisionForm.Designer.cs b/LB_SmartVision/VisionForm.Designer.cs
index d5f88d2..d07cbae 100644
--- a/LB_SmartVision/VisionForm.Designer.cs
+++ b/LB_SmartVision/VisionForm.Designer.cs
@@ -66,7 +66,6 @@
             theme_VisionForm.Padding = new Padding(12, 88, 12, 11);
             theme_VisionForm.RoundCorners = true;
             theme_VisionForm.Sizable = true;
-            theme_VisionForm.Size = new Size(1800, 1200);
             theme_VisionForm.Size = new Size(1440, 880);
             theme_VisionForm.SmartBounds = true;
             theme_VisionForm.StartPosition = FormStartPosition.WindowsDefaultLocation;
@@ -76,10 +75,9 @@
             // sc_VisionForm
             // 
             sc_VisionForm.Dock = DockStyle.Fill;
+            sc_VisionForm.FixedPanel = FixedPanel.Panel2;
             sc_VisionForm.Location = new Point(12, 88);
             sc_VisionForm.Margin = new Padding(4);
-            sc_VisionForm.FixedPanel = FixedPanel.Panel2;
-            sc_VisionForm.Location = new Point(10, 70);
             sc_VisionForm.Name = "sc_VisionForm";
             sc_VisionForm.Orientation = Orientation.Horizontal;
             // 
@@ -90,26 +88,13 @@
             // sc_VisionForm.Panel2
             // 
             sc_VisionForm.Panel2.Controls.Add(grb_Info);
-            sc_VisionForm.Size = new Size(1776, 1101);
-            sc_VisionForm.SplitterDistance = 873;
+            sc_VisionForm.Size = new Size(1416, 781);
+            sc_VisionForm.SplitterDistance = 593;
             sc_VisionForm.SplitterWidth = 5;
-            sc_VisionForm.Size = new Size(1420, 801);
-            sc_VisionForm.SplitterDistance = 618;
             sc_VisionForm.TabIndex = 1;
             // 
             // tlp_MainView
             // 
-            sc_VisionMainViewer.Dock = DockStyle.Fill;
-            sc_VisionMainViewer.Location = new Point(0, 0);
-            sc_VisionMainViewer.Margin = new Padding(4);
-            sc_VisionMainViewer.Name = "sc_VisionMainViewer";
-            sc_VisionMainViewer.Orientation = Orientation.Horizontal;
-            // 
-            // sc_VisionMainViewer.Panel1
-            // 
-            sc_VisionMainViewer.Panel1.Controls.Add(tlp_VisionMainForm);
-            // 
-            // sc_VisionMainViewer.Panel2
             tlp_MainView.ColumnCount = 1;
             tlp_MainView.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
             tlp_MainView.Controls.Add(materialTabControl, 0, 2);
@@ -117,30 +102,27 @@
             tlp_MainView.Controls.Add(materialTabSelector, 0, 0);
             tlp_MainView.Dock = DockStyle.Fill;
             tlp_MainView.Location = new Point(0, 0);
+            tlp_MainView.Margin = new Padding(2);
             tlp_MainView.Name = "tlp_MainView";
             tlp_MainView.RowCount = 3;
             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(1420, 618);
+            tlp_MainView.Size = new Size(1416, 593);
             tlp_MainView.TabIndex = 1;
             tlp_MainView.TagString = null;
             // 
-            sc_VisionMainViewer.Panel2.Controls.Add(materialTabControl);
-            sc_VisionMainViewer.Size = new Size(1776, 873);
-            sc_VisionMainViewer.SplitterDistance = 124;
-            sc_VisionMainViewer.SplitterWidth = 5;
-            sc_VisionMainViewer.TabIndex = 0;
             // materialTabControl
             // 
             materialTabControl.AccessibleRole = AccessibleRole.Sound;
             materialTabControl.Depth = 0;
             materialTabControl.Dock = DockStyle.Fill;
-            materialTabControl.Location = new Point(3, 102);
+            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(1414, 513);
+            materialTabControl.Size = new Size(1412, 490);
             materialTabControl.TabIndex = 0;
             // 
             // tlp_VisionMainOperator
@@ -161,13 +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(4, 80);
+            tlp_VisionMainOperator.Location = new Point(4, 64);
             tlp_VisionMainOperator.Margin = new Padding(4);
-            tlp_VisionMainOperator.Location = new Point(3, 63);
             tlp_VisionMainOperator.Name = "tlp_VisionMainOperator";
             tlp_VisionMainOperator.RowCount = 1;
             tlp_VisionMainOperator.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
-            tlp_VisionMainOperator.Size = new Size(1768, 41);
+            tlp_VisionMainOperator.Size = new Size(1408, 31);
             tlp_VisionMainOperator.TabIndex = 0;
             tlp_VisionMainOperator.TagString = null;
             // 
@@ -180,7 +161,7 @@
             ckb_AllowRun.Margin = new Padding(4);
             ckb_AllowRun.MinimumSize = new Size(1, 1);
             ckb_AllowRun.Name = "ckb_AllowRun";
-            ckb_AllowRun.Size = new Size(188, 33);
+            ckb_AllowRun.Size = new Size(148, 23);
             ckb_AllowRun.TabIndex = 2;
             ckb_AllowRun.Text = "杩愯妯″紡";
             // 
@@ -195,12 +176,12 @@
             btn_Login.Image = null;
             btn_Login.ImageAlign = ContentAlignment.MiddleLeft;
             btn_Login.InactiveColor = Color.FromArgb(32, 34, 37);
-            btn_Login.Location = new Point(200, 4);
+            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(188, 33);
+            btn_Login.Size = new Size(148, 23);
             btn_Login.TabIndex = 3;
             btn_Login.Text = "鐢ㄦ埛鐧诲綍";
             btn_Login.TextAlignment = StringAlignment.Center;
@@ -217,12 +198,12 @@
             btn_GlobalVar.Image = null;
             btn_GlobalVar.ImageAlign = ContentAlignment.MiddleLeft;
             btn_GlobalVar.InactiveColor = Color.FromArgb(32, 34, 37);
-            btn_GlobalVar.Location = new Point(1376, 4);
+            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(188, 33);
+            btn_GlobalVar.Size = new Size(148, 23);
             btn_GlobalVar.TabIndex = 4;
             btn_GlobalVar.Text = "鍏ㄥ眬鍙橀噺";
             btn_GlobalVar.TextAlignment = StringAlignment.Center;
@@ -236,10 +217,10 @@
             com_ProductName.EnabledCalc = true;
             com_ProductName.FormattingEnabled = true;
             com_ProductName.ItemHeight = 20;
-            com_ProductName.Location = new Point(1572, 4);
+            com_ProductName.Location = new Point(1252, 4);
             com_ProductName.Margin = new Padding(4);
             com_ProductName.Name = "com_ProductName";
-            com_ProductName.Size = new Size(192, 26);
+            com_ProductName.Size = new Size(152, 26);
             com_ProductName.TabIndex = 5;
             com_ProductName.SelectedValueChanged += com_ProductName_SelectedValueChanged;
             // 
@@ -252,8 +233,7 @@
             materialTabSelector.Margin = new Padding(4);
             materialTabSelector.MouseState = MaterialSkin.MouseState.HOVER;
             materialTabSelector.Name = "materialTabSelector";
-            materialTabSelector.Size = new Size(1768, 68);
-            materialTabSelector.Size = new Size(1414, 54);
+            materialTabSelector.Size = new Size(1408, 52);
             materialTabSelector.TabIndex = 1;
             // 
             // grb_Info
@@ -268,9 +248,7 @@
             grb_Info.MinimumSize = new Size(1, 1);
             grb_Info.Name = "grb_Info";
             grb_Info.Padding = new Padding(0, 40, 0, 0);
-            grb_Info.Size = new Size(1776, 223);
-            grb_Info.Padding = new Padding(0, 32, 0, 0);
-            grb_Info.Size = new Size(1420, 179);
+            grb_Info.Size = new Size(1416, 183);
             grb_Info.TabIndex = 1;
             grb_Info.Text = "鏃ュ織鏄剧ず鍖猴細";
             grb_Info.TextAlignment = ContentAlignment.MiddleLeft;
@@ -286,8 +264,7 @@
             rich_Info.Name = "rich_Info";
             rich_Info.Padding = new Padding(2);
             rich_Info.ShowText = false;
-            rich_Info.Size = new Size(1776, 183);
-            rich_Info.Size = new Size(1420, 147);
+            rich_Info.Size = new Size(1416, 143);
             rich_Info.TabIndex = 0;
             rich_Info.TextAlignment = ContentAlignment.MiddleLeft;
             // 
@@ -301,9 +278,8 @@
             cb_VisionForm.EnableMaximizeButton = true;
             cb_VisionForm.EnableMinimizeButton = true;
             cb_VisionForm.ForeColor = Color.FromArgb(155, 155, 155);
-            cb_VisionForm.Location = new Point(1675, 18);
+            cb_VisionForm.Location = new Point(1315, 18);
             cb_VisionForm.Margin = new Padding(4);
-            cb_VisionForm.Location = new Point(1360, 14);
             cb_VisionForm.MaximizeHoverColor = Color.FromArgb(74, 74, 74);
             cb_VisionForm.MinimizeHoverColor = Color.FromArgb(63, 63, 65);
             cb_VisionForm.Name = "cb_VisionForm";
@@ -315,7 +291,6 @@
             // 
             AutoScaleDimensions = new SizeF(120F, 120F);
             AutoScaleMode = AutoScaleMode.Dpi;
-            ClientSize = new Size(1800, 1200);
             ClientSize = new Size(1440, 880);
             Controls.Add(theme_VisionForm);
             FormBorderStyle = FormBorderStyle.None;

--
Gitblit v1.9.3