diff --git a/Bin/net40/SunnyUI.Demo.exe b/Bin/net40/SunnyUI.Demo.exe index 10f6a3c9..5e3853f0 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 098e130b..eaa6f934 100644 Binary files a/Bin/net40/SunnyUI.dll and b/Bin/net40/SunnyUI.dll differ diff --git a/Bin/net5.0-windows/SunnyUI.dll b/Bin/net5.0-windows/SunnyUI.dll index d6e6958f..9c87c931 100644 Binary files a/Bin/net5.0-windows/SunnyUI.dll and b/Bin/net5.0-windows/SunnyUI.dll differ diff --git a/Bin/net5.0-windows/ref/SunnyUI.dll b/Bin/net5.0-windows/ref/SunnyUI.dll index 6f8016e3..4b04521d 100644 Binary files a/Bin/net5.0-windows/ref/SunnyUI.dll and b/Bin/net5.0-windows/ref/SunnyUI.dll differ diff --git a/Bin/netcoreapp3.1/SunnyUI.dll b/Bin/netcoreapp3.1/SunnyUI.dll index 8cfc037b..78a31e19 100644 Binary files a/Bin/netcoreapp3.1/SunnyUI.dll and b/Bin/netcoreapp3.1/SunnyUI.dll differ diff --git a/SunnyUI.Demo/Controls/FDataGridView.Designer.cs b/SunnyUI.Demo/Controls/FDataGridView.Designer.cs index 3b065f08..3bb49c51 100644 --- a/SunnyUI.Demo/Controls/FDataGridView.Designer.cs +++ b/SunnyUI.Demo/Controls/FDataGridView.Designer.cs @@ -126,7 +126,7 @@ // this.uiDataGridViewFooter1.DataGridView = this.uiDataGridView1; this.uiDataGridViewFooter1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.uiDataGridViewFooter1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.uiDataGridViewFooter1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.uiDataGridViewFooter1.Location = new System.Drawing.Point(0, 351); this.uiDataGridViewFooter1.MinimumSize = new System.Drawing.Size(1, 1); this.uiDataGridViewFooter1.Name = "uiDataGridViewFooter1"; diff --git a/SunnyUI.Demo/Controls/FDataGridView.Designer.resx b/SunnyUI.Demo/Controls/FDataGridView.Designer.resx deleted file mode 100644 index 1af7de15..00000000 --- a/SunnyUI.Demo/Controls/FDataGridView.Designer.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/SunnyUI.Demo/SunnyUI.Demo.csproj b/SunnyUI.Demo/SunnyUI.Demo.csproj index 3c216373..d82f0466 100644 --- a/SunnyUI.Demo/SunnyUI.Demo.csproj +++ b/SunnyUI.Demo/SunnyUI.Demo.csproj @@ -120,7 +120,7 @@ Form - + FDataGridView.cs @@ -359,9 +359,6 @@ FContextMenuStrip.cs - - FDataGridView.Designer.cs - FDataGridView.cs diff --git a/SunnyUI/Controls/UIDataGridViewFooter.cs b/SunnyUI/Controls/UIDataGridViewFooter.cs index a34b38e0..b15f15f4 100644 --- a/SunnyUI/Controls/UIDataGridViewFooter.cs +++ b/SunnyUI/Controls/UIDataGridViewFooter.cs @@ -29,7 +29,7 @@ using System.Windows.Forms; namespace Sunny.UI { [ToolboxItem(true)] - public class UIDataGridViewFooter : UIControl + public sealed class UIDataGridViewFooter : UIControl { public UIDataGridViewFooter() { @@ -38,6 +38,7 @@ namespace Sunny.UI RadiusSides = UICornerRadiusSides.None; RectSides = ToolStripStatusLabelBorderSides.None; + Font = UIFontColor.Font; foreColor = UIFontColor.Primary; fillColor = UIColor.LightBlue; } @@ -116,6 +117,8 @@ namespace Sunny.UI if (str.IsNullOrEmpty()) continue; SizeF sf = g.MeasureString(str, Font); + + if (rect.Left == 0 && rect.Width == 0) continue; if (rect.Left == minleft && rect.Width < column.Width) { g.DrawString(str, Font, ForeColor, rect.Width - column.Width + (column.Width - sf.Width) / 2.0f, (Height - sf.Height) / 2.0f); diff --git a/SunnyUI/Controls/UIEdit.cs b/SunnyUI/Controls/UIEdit.cs index 961bf2f1..ca3a34f3 100644 --- a/SunnyUI/Controls/UIEdit.cs +++ b/SunnyUI/Controls/UIEdit.cs @@ -26,7 +26,7 @@ using System.Windows.Forms; namespace Sunny.UI { [ToolboxItem(false)] - public sealed class UIEdit : TextBox + public class UIEdit : TextBox { private bool canEmpty; private int decLength = 2; @@ -41,10 +41,10 @@ namespace Sunny.UI { //设置为单选边框 BorderStyle = BorderStyle.FixedSingle; - Font = UIFontColor.Font; - ForeColor = UIFontColor.Primary; + base.Font = UIFontColor.Font; + base.ForeColor = UIFontColor.Primary; Width = 150; - MaxLength = 32767; + base.MaxLength = 32767; } private string watermark; diff --git a/SunnyUI/Controls/UIPanel.cs b/SunnyUI/Controls/UIPanel.cs index 743db296..d4556fcf 100644 --- a/SunnyUI/Controls/UIPanel.cs +++ b/SunnyUI/Controls/UIPanel.cs @@ -44,16 +44,6 @@ namespace Sunny.UI public UIPanel() { InitializeComponent(); - - SetStyle(ControlStyles.AllPaintingInWmPaint, true); - SetStyle(ControlStyles.DoubleBuffer, true); - SetStyle(ControlStyles.Selectable, true); - SetStyle(ControlStyles.SupportsTransparentBackColor, true); - SetStyle(ControlStyles.UserPaint, true); - SetStyle(ControlStyles.OptimizedDoubleBuffer, true); - base.DoubleBuffered = true; - UpdateStyles(); - Version = UIGlobal.Version; AutoScaleMode = AutoScaleMode.None; base.Font = UIFontColor.Font;