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; namespace DHSoftware.Views { public partial class UserDetetion : UserControl { //根据检测配置 将对应的相机配置、中处理预处理、尺寸测量 public UserDetetion(int parentWidth, int parentHeight) { InitializeComponent(); AntdUI.CollapseItem group1 = new CollapseItem(); group1.Height = parentHeight / 3; group1.Text = "相机配置"; AntdUI.CollapseItem group2 = new CollapseItem(); group2.Text = "预处理中处理"; group2.Height = parentHeight -300; AntdUI.CollapseItem group3 = new CollapseItem(); group3.Text = "尺寸测量"; group3.Height = parentHeight/3; // 父容器(如 Panel)设置自动滚动 System.Windows.Forms.Panel panel = new System.Windows.Forms.Panel { Dock = DockStyle.Fill, AutoScroll = true // 关键:启用滚动条 }; // 父容器(如 Panel)设置自动滚动 System.Windows.Forms.FlowLayoutPanel panel2 = new System.Windows.Forms.FlowLayoutPanel { Dock = DockStyle.Fill, AutoScroll = true // 关键:启用滚动条 }; // 父容器(如 Panel)设置自动滚动 System.Windows.Forms.Panel panel3 = new System.Windows.Forms.Panel { Dock = DockStyle.Fill, AutoScroll = true // 关键:启用滚动条 }; CameraConfigControl camConfigFrm = new CameraConfigControl(); camConfigFrm.Dock = DockStyle.Fill; panel.Controls.Add(camConfigFrm); 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); group1.Controls.Add(panel); group2.Controls.Add(panel2); group3.Controls.Add(panel3); //collapse1.Items.Add(group1); collapse1.Items.Add(group1); collapse1.Items.Add(group2); collapse1.Items.Add(group3); } } }