diff --git a/Bin/net40/SunnyUI.Demo.exe b/Bin/net40/SunnyUI.Demo.exe index b24a3a6e..93602133 100644 Binary files a/Bin/net40/SunnyUI.Demo.exe and b/Bin/net40/SunnyUI.Demo.exe differ diff --git a/Bin/net40/SunnyUI.dll b/Bin/net40/SunnyUI.dll index 1e6cefcd..2329aa8d 100644 Binary files a/Bin/net40/SunnyUI.dll and b/Bin/net40/SunnyUI.dll differ diff --git a/SunnyUI/Forms/UIMessageForm.Designer.cs b/SunnyUI/Forms/UIMessageForm.Designer.cs index 50f001af..7b2c917a 100644 --- a/SunnyUI/Forms/UIMessageForm.Designer.cs +++ b/SunnyUI/Forms/UIMessageForm.Designer.cs @@ -37,9 +37,10 @@ // this.btnCancel.BackColor = System.Drawing.Color.Transparent; this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 12F); + this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.btnCancel.Location = new System.Drawing.Point(224, 220); this.btnCancel.Margin = new System.Windows.Forms.Padding(0); + this.btnCancel.MinimumSize = new System.Drawing.Size(1, 1); this.btnCancel.Name = "btnCancel"; this.btnCancel.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.btnCancel.RectSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top))); @@ -55,9 +56,10 @@ // this.btnOK.BackColor = System.Drawing.Color.Transparent; this.btnOK.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnOK.Font = new System.Drawing.Font("微软雅黑", 12F); + this.btnOK.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.btnOK.Location = new System.Drawing.Point(2, 220); this.btnOK.Margin = new System.Windows.Forms.Padding(0); + this.btnOK.MinimumSize = new System.Drawing.Size(1, 1); this.btnOK.Name = "btnOK"; this.btnOK.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.btnOK.RectSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((System.Windows.Forms.ToolStripStatusLabelBorderSides.Top | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right))); @@ -84,17 +86,16 @@ // // UIMessageForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(450, 270); this.Controls.Add(this.lbMsg); this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnOK); + this.EscClose = true; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "UIMessageForm"; this.Padding = new System.Windows.Forms.Padding(1, 35, 1, 3); - this.ShowIcon = false; this.ShowInTaskbar = false; this.Text = "UIMsgBox"; this.ResumeLayout(false); diff --git a/SunnyUI/Forms/UIMessageForm.cs b/SunnyUI/Forms/UIMessageForm.cs index adf3e313..e0af5fcf 100644 --- a/SunnyUI/Forms/UIMessageForm.cs +++ b/SunnyUI/Forms/UIMessageForm.cs @@ -17,6 +17,7 @@ * 创建日期: 2020-01-01 * * 2020-01-01: V2.2.0 增加文件说明 + * 2021-11-09: V3.0.8 多个按钮显示时增加FocusLine ******************************************************************************/ using System; @@ -101,6 +102,8 @@ namespace Sunny.UI public override void SetStyleColor(UIBaseStyle uiColor) { base.SetStyleColor(uiColor); + + if (btnOK != null) { btnOK.FillColor = BackColor; @@ -139,6 +142,7 @@ namespace Sunny.UI Text = title; lbMsg.Text = message; ShowCancel = showCancel; + btnOK.ShowFocusLine = btnCancel.ShowFocusLine = showCancel; } } } \ No newline at end of file diff --git a/SunnyUI/Forms/UIMessageForm.resx b/SunnyUI/Forms/UIMessageForm.resx index 1af7de15..f298a7be 100644 --- a/SunnyUI/Forms/UIMessageForm.resx +++ b/SunnyUI/Forms/UIMessageForm.resx @@ -1,64 +1,4 @@ - - - +