尺寸测量功能界面
This commit is contained in:
53
CanFly/UI/BaseFrmGuide.cs
Normal file
53
CanFly/UI/BaseFrmGuide.cs
Normal file
@ -0,0 +1,53 @@
|
||||
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 CanFly.UI
|
||||
{
|
||||
public partial class BaseFrmGuide : Form
|
||||
{
|
||||
public BaseFrmGuide()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// 处理 Panel 的大小变化事件,以动态更新控件宽度
|
||||
panelMain.SizeChanged += PanelMain_SizeChanged; ;
|
||||
}
|
||||
|
||||
|
||||
private void PanelMain_SizeChanged(object? sender, EventArgs e)
|
||||
{
|
||||
foreach (Control control in flowPanelContent.Controls)
|
||||
{
|
||||
control.Width = panelMain.Width - 6; // 根据 Panel 的宽度调整控件
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void SetTitle(string title)
|
||||
{
|
||||
this.lblTitle.Text = title;
|
||||
}
|
||||
|
||||
|
||||
public void SetLogo(Image logo)
|
||||
{
|
||||
this.pbLogo.BackgroundImage = logo;
|
||||
this.pbLogo.SizeMode = PictureBoxSizeMode.StretchImage;
|
||||
this.pbLogo.Refresh();
|
||||
}
|
||||
|
||||
private void BaseFrmGuide_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user