From 84a67b8541e5d26d3eb79adde960488226adbd0e Mon Sep 17 00:00:00 2001 From: lg <999544862qq.com> Date: 星期六, 31 八月 2024 10:32:14 +0800 Subject: [PATCH] 优化,删除了用不到的命名空间 --- DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs index 0274d05..3c91c68 100644 --- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs +++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs @@ -7,12 +7,11 @@ using System.Net; using System.Reflection; using System.Text; -using System.Threading.Tasks; -using Gs.DevApp.ToolBox; using System.Resources; using System.Drawing; using Newtonsoft.Json; using Gs.DevApp.Models; +using System.Windows.Forms; namespace Gs.DevApp.ToolBox { @@ -150,5 +149,18 @@ rto.rtnData = json["rtnData"]; return rto; } + + /// <summary> + /// 璁剧疆绯荤粺瀛椾綋澶у皬锛岀洰鍓嶅苟涓嶉�氱敤 + /// </summary> + public static float GetFontSize =10; + public static void SetFont(Control control) { + float size = GetFontSize; + foreach (Control childControl in control.Controls) + { + childControl.Font = new Font(childControl.Font.FontFamily, size, childControl.Font.Style); + SetFont(childControl); + } + } } } -- Gitblit v1.9.3