diff --git a/Bin/net40/SunnyUI.Demo.exe b/Bin/net40/SunnyUI.Demo.exe index ba5a3c17..68a80ae9 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 c6d41eee..0d589df5 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 e988e830..c83acab5 100644 Binary files a/Bin/net5.0-windows/SunnyUI.dll and b/Bin/net5.0-windows/SunnyUI.dll differ diff --git a/Bin/netcoreapp3.1/SunnyUI.dll b/Bin/netcoreapp3.1/SunnyUI.dll index 7a087e00..77b481fe 100644 Binary files a/Bin/netcoreapp3.1/SunnyUI.dll and b/Bin/netcoreapp3.1/SunnyUI.dll differ diff --git a/SunnyUI/Charts/UILineChart.cs b/SunnyUI/Charts/UILineChart.cs index dee536cb..d5b323d8 100644 --- a/SunnyUI/Charts/UILineChart.cs +++ b/SunnyUI/Charts/UILineChart.cs @@ -197,7 +197,7 @@ namespace Sunny.UI if (Option.XAxis.AxisLabel.AutoFormat) label = XLabels[i].ToString(XScale.Format); else - label = new DateTimeInt64(XLabels[i]).ToString("F" + Option.XAxis.AxisLabel.DecimalCount); + label = XLabels[i].ToString("F" + Option.XAxis.AxisLabel.DecimalCount); } SizeF sf = g.MeasureString(label, SubFont); diff --git a/SunnyUI/Charts/UIScale.cs b/SunnyUI/Charts/UIScale.cs index dd5c1d67..cf5c30e3 100644 --- a/SunnyUI/Charts/UIScale.cs +++ b/SunnyUI/Charts/UIScale.cs @@ -21,7 +21,6 @@ using System; using System.Globalization; -using static System.Double; namespace Sunny.UI { @@ -162,9 +161,9 @@ namespace Sunny.UI double minVal = _rangeMin; double maxVal = _rangeMax; - if (IsInfinity(minVal) || IsNaN(minVal) || minVal.Equals(MaxValue)) + if (double.IsInfinity(minVal) || double.IsNaN(minVal) || minVal.Equals(double.MinValue)) minVal = 0.0; - if (IsInfinity(maxVal) || IsNaN(maxVal) || maxVal.Equals(MaxValue)) + if (double.IsInfinity(maxVal) || double.IsNaN(maxVal) || maxVal.Equals(double.MaxValue)) maxVal = 0.0; double range = maxVal - minVal; diff --git a/SunnyUI/Forms/UIForm.cs b/SunnyUI/Forms/UIForm.cs index ea71e19e..d911728f 100644 --- a/SunnyUI/Forms/UIForm.cs +++ b/SunnyUI/Forms/UIForm.cs @@ -41,7 +41,15 @@ namespace Sunny.UI public UIForm() { base.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);//设置最大化尺寸 - InitializeComponent(); + InitializeComponent(); + + SetStyle( + ControlStyles.UserPaint | + ControlStyles.DoubleBuffer | + ControlStyles.OptimizedDoubleBuffer | + ControlStyles.AllPaintingInWmPaint | + ControlStyles.SupportsTransparentBackColor, true); + UpdateStyles(); Version = UIGlobal.Version; FormBorderStyle = FormBorderStyle.None; @@ -62,20 +70,15 @@ 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); @@ -1566,7 +1569,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) { diff --git a/SunnyUI/Forms/UIForm.designer.cs b/SunnyUI/Forms/UIForm.designer.cs index 7a7cd6e2..b03b9180 100644 --- a/SunnyUI/Forms/UIForm.designer.cs +++ b/SunnyUI/Forms/UIForm.designer.cs @@ -38,7 +38,7 @@ this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); this.ClientSize = new System.Drawing.Size(800, 480); this.DoubleBuffered = true; - this.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "UIForm"; this.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0); @@ -46,6 +46,7 @@ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "UIForm"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.UIForm_FormClosing); + this.Load += new System.EventHandler(this.UIForm_Load); this.ResumeLayout(false); } diff --git a/SunnyUI/Forms/UIForm.resx b/SunnyUI/Forms/UIForm.resx index 1af7de15..f298a7be 100644 --- a/SunnyUI/Forms/UIForm.resx +++ b/SunnyUI/Forms/UIForm.resx @@ -1,64 +1,4 @@ - - - +