From 7bd31fd011331e523e8a7638876b39d49a09a473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8-=E6=98=93-=E6=9D=A8?= <64038497@qq.com> Date: Sun, 17 Jan 2021 22:46:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=AA=97=E4=BD=93=E8=A2=AB?= =?UTF-8?q?=E7=BB=A7=E6=89=BF=E6=97=B6=EF=BC=8C=E6=94=B9=E6=9B=B4=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E5=90=8E=EF=BC=8C=E6=9C=89=E4=BA=9B=E5=AD=90=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E4=B8=BB=E9=A2=98=E4=B8=8D=E6=94=B9=E5=8F=98=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Forms/UIForm.cs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/SunnyUI/Forms/UIForm.cs b/SunnyUI/Forms/UIForm.cs index 7bddc9e4..823a5ed4 100644 --- a/SunnyUI/Forms/UIForm.cs +++ b/SunnyUI/Forms/UIForm.cs @@ -41,20 +41,7 @@ namespace Sunny.UI public UIForm() { base.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);//设置最大化尺寸 - InitializeComponent(); - - if (this.Register()) - { - SetStyle(UIStyles.Style); - } - - SetStyle( - ControlStyles.UserPaint | - ControlStyles.DoubleBuffer | - ControlStyles.OptimizedDoubleBuffer | - ControlStyles.AllPaintingInWmPaint | - ControlStyles.SupportsTransparentBackColor, true); - UpdateStyles(); + InitializeComponent(); Version = UIGlobal.Version; FormBorderStyle = FormBorderStyle.None; @@ -75,7 +62,20 @@ namespace Sunny.UI { SetStyle(UIStyles.Style); } - + private void UIForm_Load(object sender, EventArgs e) + { + if (this.Register()) + { + SetStyle(UIStyles.Style); + } + SetStyle( + ControlStyles.UserPaint | + ControlStyles.DoubleBuffer | + ControlStyles.OptimizedDoubleBuffer | + ControlStyles.AllPaintingInWmPaint | + ControlStyles.SupportsTransparentBackColor, true); + UpdateStyles(); + } protected override void OnBackColorChanged(EventArgs e) { base.OnBackColorChanged(e); @@ -1551,7 +1551,7 @@ namespace Sunny.UI public void ShowSuccessNotifier(string desc, bool isDialog = false, int timeout = 2000) { UINotifierHelper.ShowNotifier(desc, UINotifierType.OK, UILocalize.SuccessTitle, false, timeout); - } + } public void ShowWarningNotifier(string desc, bool isDialog = false, int timeout = 2000) {