diff --git a/Bin/SunnyUI.dll b/Bin/SunnyUI.dll index 7973fe83..3bec3661 100644 Binary files a/Bin/SunnyUI.dll and b/Bin/SunnyUI.dll differ diff --git a/Bin/SunnyUI.pdb b/Bin/SunnyUI.pdb index c9a3eec7..4db4cf6a 100644 Binary files a/Bin/SunnyUI.pdb and b/Bin/SunnyUI.pdb differ diff --git a/SunnyUI.Demo/Bin/SunnyUI.dll b/SunnyUI.Demo/Bin/SunnyUI.dll index 7973fe83..3bec3661 100644 Binary files a/SunnyUI.Demo/Bin/SunnyUI.dll and b/SunnyUI.Demo/Bin/SunnyUI.dll differ diff --git a/SunnyUI/Forms/UIForm.cs b/SunnyUI/Forms/UIForm.cs index c8b0eea8..8e401470 100644 --- a/SunnyUI/Forms/UIForm.cs +++ b/SunnyUI/Forms/UIForm.cs @@ -1085,6 +1085,11 @@ namespace Sunny.UI public string CloseAskString { get; set; } + private void UIForm_Shown(object sender, EventArgs e) + { + SetStyle(UIStyles.Style); + } + private FormWindowState windowState = FormWindowState.Normal; public new FormWindowState WindowState diff --git a/SunnyUI/Forms/UIForm.designer.cs b/SunnyUI/Forms/UIForm.designer.cs index 0740a826..9bb41e9f 100644 --- a/SunnyUI/Forms/UIForm.designer.cs +++ b/SunnyUI/Forms/UIForm.designer.cs @@ -39,6 +39,7 @@ this.Name = "UIForm"; this.Text = "UIForm"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.UIForm_FormClosing); + this.Shown += new System.EventHandler(this.UIForm_Shown); this.ResumeLayout(false); } diff --git a/SunnyUI/Pages/UIPage.Designer.cs b/SunnyUI/Pages/UIPage.Designer.cs index 2e16d4b4..c81d4c89 100644 --- a/SunnyUI/Pages/UIPage.Designer.cs +++ b/SunnyUI/Pages/UIPage.Designer.cs @@ -34,7 +34,6 @@ // // UIPage // - this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(802, 460); this.DoubleBuffered = true; @@ -46,7 +45,7 @@ this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.Text = "UIPage"; - this.TopLevel = false; + this.Shown += new System.EventHandler(this.UIPage_Shown); this.ResumeLayout(false); } diff --git a/SunnyUI/Pages/UIPage.cs b/SunnyUI/Pages/UIPage.cs index 8c8fa9b1..9137cc10 100644 --- a/SunnyUI/Pages/UIPage.cs +++ b/SunnyUI/Pages/UIPage.cs @@ -234,5 +234,10 @@ namespace Sunny.UI AfterSetForeColor(ForeColor); _style = UIStyle.Custom; } + + private void UIPage_Shown(object sender, EventArgs e) + { + SetStyle(UIStyles.Style); + } } } \ No newline at end of file diff --git a/Updates.txt b/Updates.txt index dee4eadb..0428d0fd 100644 --- a/Updates.txt +++ b/Updates.txt @@ -3,6 +3,7 @@ 2020.06.04 + UIRichTextBox:新增 * UITextBox:完善TextBox的基本方法和函数 +* UIForm,UIPage:更改新建窗体时主题未设置的问题 2020.06.04 + UIBattery 新增