//form_統一form控制項的字體
private void FrSetting_Load(object sender, EventArgs e)
{
//set font
SetFontToAllControl();
}
private void SetFontToAllControl()
{
List allControls = func.GetAllControls(this);
allControls.ForEach
(
k => k.Font = new System.Drawing.Font("標楷體", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(136)))
);
}
private void TrimToAllControl()
{
List allControls = func.GetAllControls(this);
foreach (Control ctrl in allControls)
{
ctrl.Text = ctrl.Text.Trim();
}
}
private void FrSetting_Load(object sender, EventArgs e)
{
//set font
SetFontToAllControl();
}
private void SetFontToAllControl()
{
List
allControls.ForEach
(
k => k.Font = new System.Drawing.Font("標楷體", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(136)))
);
}
private void TrimToAllControl()
{
List
foreach (Control ctrl in allControls)
{
ctrl.Text = ctrl.Text.Trim();
}
}
留言
張貼留言