From 72cf329ce1c456222fcc5276bb65e67cbf6760f0 Mon Sep 17 00:00:00 2001
From: C3204 <zhengyabo@lanpucloud.cn>
Date: 星期四, 22 一月 2026 14:52:39 +0800
Subject: [PATCH] 优化主界面显示为行列矩阵形式,实现鼠标左键双击对应窗体最大化,再次双击恢复之前布局。
---
LB_VisionControl/UserHSmartWindowControl.Designer.cs | 36 ++++++++++++++++++++----------------
1 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/LB_VisionControl/UserHSmartWindowControl.Designer.cs b/LB_VisionControl/UserHSmartWindowControl.Designer.cs
index e4cc615..5ab5f65 100644
--- a/LB_VisionControl/UserHSmartWindowControl.Designer.cs
+++ b/LB_VisionControl/UserHSmartWindowControl.Designer.cs
@@ -44,14 +44,15 @@
//
// RightContextMenuStrip
//
+ RightContextMenuStrip.ImageScalingSize = new Size(20, 20);
RightContextMenuStrip.Items.AddRange(new ToolStripItem[] { resizeImageStripMenuItem, autoSizeStripMenuItem, mouseIndexStripMenuItem });
RightContextMenuStrip.Name = "RightContextMenuStrip";
- RightContextMenuStrip.Size = new Size(149, 70);
+ RightContextMenuStrip.Size = new Size(169, 82);
//
// resizeImageStripMenuItem
//
resizeImageStripMenuItem.Name = "resizeImageStripMenuItem";
- resizeImageStripMenuItem.Size = new Size(148, 22);
+ resizeImageStripMenuItem.Size = new Size(168, 26);
resizeImageStripMenuItem.Text = "閲嶆柊缂╂斁鍥惧儚";
resizeImageStripMenuItem.Click += resizeImageStripMenuItem_Click;
//
@@ -60,39 +61,41 @@
autoSizeStripMenuItem.Checked = true;
autoSizeStripMenuItem.CheckState = CheckState.Checked;
autoSizeStripMenuItem.Name = "autoSizeStripMenuItem";
- autoSizeStripMenuItem.Size = new Size(148, 22);
+ autoSizeStripMenuItem.Size = new Size(168, 26);
autoSizeStripMenuItem.Text = "鍥惧儚鑷姩閫傚簲";
autoSizeStripMenuItem.Click += autoSizeStripMenuItem_Click;
//
// mouseIndexStripMenuItem
//
mouseIndexStripMenuItem.Name = "mouseIndexStripMenuItem";
- mouseIndexStripMenuItem.Size = new Size(148, 22);
+ mouseIndexStripMenuItem.Size = new Size(168, 26);
mouseIndexStripMenuItem.Text = "榧犳爣绱㈠紩鍍忕礌";
mouseIndexStripMenuItem.Click += mouseIndexStripMenuItem_Click;
//
// BtmStatusStrip
//
+ BtmStatusStrip.ImageScalingSize = new Size(20, 20);
BtmStatusStrip.Items.AddRange(new ToolStripItem[] { StatusLabel });
- BtmStatusStrip.Location = new Point(0, 220);
+ BtmStatusStrip.Location = new Point(0, 280);
BtmStatusStrip.Name = "BtmStatusStrip";
- BtmStatusStrip.Padding = new Padding(1, 0, 16, 0);
- BtmStatusStrip.Size = new Size(274, 22);
+ BtmStatusStrip.Padding = new Padding(1, 0, 20, 0);
+ BtmStatusStrip.Size = new Size(342, 22);
BtmStatusStrip.TabIndex = 44;
BtmStatusStrip.Text = "statusStrip1";
//
// StatusLabel
//
StatusLabel.Name = "StatusLabel";
- StatusLabel.Size = new Size(0, 17);
+ StatusLabel.Size = new Size(0, 16);
//
// pnl
//
pnl.Controls.Add(hWindowControl);
pnl.Dock = DockStyle.Fill;
pnl.Location = new Point(0, 0);
+ pnl.Margin = new Padding(4);
pnl.Name = "pnl";
- pnl.Size = new Size(274, 220);
+ pnl.Size = new Size(342, 280);
pnl.TabIndex = 45;
//
// hWindowControl
@@ -104,29 +107,30 @@
hWindowControl.Dock = DockStyle.Fill;
hWindowControl.HDoubleClickToFitContent = true;
hWindowControl.HDrawingObjectsModifier = HalconDotNet.HSmartWindowControl.DrawingObjectsModifier.None;
- hWindowControl.HImagePart = new Rectangle(0, 88, 2591, 1767);
+ hWindowControl.HImagePart = new Rectangle(-321, -152, 3233, 2247);
hWindowControl.HKeepAspectRatio = true;
hWindowControl.HMoveContent = true;
hWindowControl.HZoomContent = HalconDotNet.HSmartWindowControl.ZoomContent.WheelForwardZoomsIn;
hWindowControl.Location = new Point(0, 0);
- hWindowControl.Margin = new Padding(4);
+ hWindowControl.Margin = new Padding(5);
hWindowControl.Name = "hWindowControl";
- hWindowControl.Size = new Size(274, 220);
+ hWindowControl.Size = new Size(342, 280);
hWindowControl.TabIndex = 43;
- hWindowControl.WindowSize = new Size(274, 220);
+ hWindowControl.WindowSize = new Size(342, 280);
hWindowControl.HMouseMove += hWindowControl_HMouseMove;
hWindowControl.HMouseDown += hWindowControl_HMouseDown;
hWindowControl.HMouseUp += hWindowControl_HMouseUp;
+ hWindowControl.HMouseDoubleClick += hWindowControl_HMouseDoubleClick;
//
// UserHSmartWindowControl
//
- AutoScaleDimensions = new SizeF(96F, 96F);
+ AutoScaleDimensions = new SizeF(120F, 120F);
AutoScaleMode = AutoScaleMode.Dpi;
Controls.Add(pnl);
Controls.Add(BtmStatusStrip);
- Margin = new Padding(4);
+ Margin = new Padding(5);
Name = "UserHSmartWindowControl";
- Size = new Size(274, 242);
+ Size = new Size(342, 302);
Load += UserHSmartWindowControl_Load;
SizeChanged += UserHSmartWindowControl_SizeChanged;
MouseWheel += UserHSmartWindowControl_HMouseWheel;
--
Gitblit v1.9.3