diff --git a/Bin/SunnyUI.dll b/Bin/SunnyUI.dll index 39157c44..175a208f 100644 Binary files a/Bin/SunnyUI.dll and b/Bin/SunnyUI.dll differ diff --git a/Bin/SunnyUI.pdb b/Bin/SunnyUI.pdb index 70209438..92937635 100644 Binary files a/Bin/SunnyUI.pdb and b/Bin/SunnyUI.pdb differ diff --git a/SunnyUI.Demo/Bin/SunnyUI.Demo.exe b/SunnyUI.Demo/Bin/SunnyUI.Demo.exe index 3bd48f1a..9a265478 100644 Binary files a/SunnyUI.Demo/Bin/SunnyUI.Demo.exe and b/SunnyUI.Demo/Bin/SunnyUI.Demo.exe differ diff --git a/SunnyUI.Demo/Bin/SunnyUI.dll b/SunnyUI.Demo/Bin/SunnyUI.dll index 39157c44..175a208f 100644 Binary files a/SunnyUI.Demo/Bin/SunnyUI.dll and b/SunnyUI.Demo/Bin/SunnyUI.dll differ diff --git a/SunnyUI.Demo/Charts/FPieChart.Designer.cs b/SunnyUI.Demo/Charts/FPieChart.Designer.cs index 06d5d538..c0f201aa 100644 --- a/SunnyUI.Demo/Charts/FPieChart.Designer.cs +++ b/SunnyUI.Demo/Charts/FPieChart.Designer.cs @@ -68,17 +68,20 @@ this.PieChart.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); this.PieChart.Font = new System.Drawing.Font("微软雅黑", 12F); this.PieChart.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(54)))), ((int)(((byte)(54)))), ((int)(((byte)(54))))); + this.PieChart.LegendFont = new System.Drawing.Font("微软雅黑", 12F); this.PieChart.Location = new System.Drawing.Point(30, 48); this.PieChart.Name = "PieChart"; this.PieChart.Option = null; this.PieChart.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None; this.PieChart.Size = new System.Drawing.Size(670, 400); + this.PieChart.SubFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.PieChart.TabIndex = 20; this.PieChart.Text = "uiPieChart1"; // // uiImageButton1 // this.uiImageButton1.Cursor = System.Windows.Forms.Cursors.Hand; + this.uiImageButton1.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiImageButton1.Image = global::Sunny.UI.Demo.Properties.Resources.ChartDefaultStyle; this.uiImageButton1.Location = new System.Drawing.Point(30, 466); this.uiImageButton1.Name = "uiImageButton1"; @@ -92,6 +95,7 @@ // uiImageButton2 // this.uiImageButton2.Cursor = System.Windows.Forms.Cursors.Hand; + this.uiImageButton2.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiImageButton2.Image = global::Sunny.UI.Demo.Properties.Resources.ChartPlainStyle; this.uiImageButton2.Location = new System.Drawing.Point(136, 466); this.uiImageButton2.Name = "uiImageButton2"; @@ -105,6 +109,7 @@ // uiImageButton3 // this.uiImageButton3.Cursor = System.Windows.Forms.Cursors.Hand; + this.uiImageButton3.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiImageButton3.Image = global::Sunny.UI.Demo.Properties.Resources.ChartDarkStyle; this.uiImageButton3.Location = new System.Drawing.Point(242, 466); this.uiImageButton3.Name = "uiImageButton3"; diff --git a/SunnyUI.Demo/Controls/FDataGridView.cs b/SunnyUI.Demo/Controls/FDataGridView.cs index a6b7dc22..34bbd7de 100644 --- a/SunnyUI.Demo/Controls/FDataGridView.cs +++ b/SunnyUI.Demo/Controls/FDataGridView.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Windows.Forms; namespace Sunny.UI.Demo { @@ -9,11 +10,12 @@ namespace Sunny.UI.Demo InitializeComponent(); uiDataGridView1.AddColumn("Column1", "Column1", 100); - uiDataGridView1.AddColumn("Column2", "Column2").SetFixedMode(100); + uiDataGridView1.AddColumn("Column2", "Column2").SetFixedMode(1000); uiDataGridView1.AddColumn("Column3", "Column3").SetFixedMode(100); //uiDataGridView1.AddColumn("Column4", "Column4", 20); uiDataGridView1.ReadOnly = true; + uiDataGridView1.ScrollBars = ScrollBars.Both; } public override void Init() diff --git a/SunnyUI.Demo/Forms/FLogin.cs b/SunnyUI.Demo/Forms/FLogin.cs index 200ec4d3..61a6abf7 100644 --- a/SunnyUI.Demo/Forms/FLogin.cs +++ b/SunnyUI.Demo/Forms/FLogin.cs @@ -9,11 +9,12 @@ private void FLogin_ButtonLoginClick(object sender, System.EventArgs e) { - if (UserName == "admin" && Password == "admin") - { - IsLogin = true; - Close(); - } + this.ShowInfoTip("DSFSDF"); + // if (UserName == "admin" && Password == "admin") + // { + // IsLogin = true; + // Close(); + // } } } } \ No newline at end of file diff --git a/SunnyUI/Charts/UIChart.cs b/SunnyUI/Charts/UIChart.cs index 72894259..a526521b 100644 --- a/SunnyUI/Charts/UIChart.cs +++ b/SunnyUI/Charts/UIChart.cs @@ -156,6 +156,11 @@ namespace Sunny.UI protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); + if (tip != null && !tip.Font.Equals(legendFont)) + { + tip.Font = legendFont; + } + DrawOption(e.Graphics); } @@ -192,7 +197,7 @@ namespace Sunny.UI } } - public Font legendFont = UIFontColor.SubFont; + private Font legendFont = UIFontColor.SubFont; [DefaultValue(typeof(Font), "微软雅黑, 9pt")] public Font LegendFont @@ -201,6 +206,7 @@ namespace Sunny.UI set { legendFont = value; + if (tip != null) tip.Font = subFont; Invalidate(); } } @@ -299,7 +305,7 @@ namespace Sunny.UI { g.FillRoundRectangle(ChartStyle.SeriesColor[i % ChartStyle.ColorCount], (int)startleft, (int)top + 1, 18, (int)oneHeight - 2, 5); g.DrawString(data, LegendFont, ChartStyle.ForeColor, startleft + 20, top); - startleft += 20; + startleft += 22; startleft += sf.Width; } diff --git a/SunnyUI/Charts/UIDoughnutChart.cs b/SunnyUI/Charts/UIDoughnutChart.cs index dfa2defe..ea993927 100644 --- a/SunnyUI/Charts/UIDoughnutChart.cs +++ b/SunnyUI/Charts/UIDoughnutChart.cs @@ -116,7 +116,7 @@ namespace Sunny.UI else g.FillFan(color, angle.Center, angle.Inner, angle.Outer, angle.Start - 90, angle.Sweep); - Angles[pieIndex][azIndex].TextSize = g.MeasureString(Angles[pieIndex][azIndex].Text, legendFont); + Angles[pieIndex][azIndex].TextSize = g.MeasureString(Angles[pieIndex][azIndex].Text, LegendFont); if (pie.Label.Show && ActiveAzIndex == azIndex) { diff --git a/SunnyUI/Charts/UIPieChart.cs b/SunnyUI/Charts/UIPieChart.cs index 1d3e9b21..ec331e9d 100644 --- a/SunnyUI/Charts/UIPieChart.cs +++ b/SunnyUI/Charts/UIPieChart.cs @@ -129,7 +129,7 @@ namespace Sunny.UI Color color = ChartStyle.SeriesColor[azIndex % ChartStyle.ColorCount]; RectangleF rectx = new RectangleF(rect.X - 10, rect.Y - 10, rect.Width + 20, rect.Width + 20); g.FillPie(color, (ActivePieIndex == pieIndex && ActiveAzIndex == azIndex) ? rectx : rect, Angles[pieIndex][azIndex].Start - 90, Angles[pieIndex][azIndex].Sweep); - Angles[pieIndex][azIndex].TextSize = g.MeasureString(Angles[pieIndex][azIndex].Text, legendFont); + Angles[pieIndex][azIndex].TextSize = g.MeasureString(Angles[pieIndex][azIndex].Text, LegendFont); } } } diff --git a/SunnyUI/Controls/UIEdit.cs b/SunnyUI/Controls/UIEdit.cs index f2c6304a..49435009 100644 --- a/SunnyUI/Controls/UIEdit.cs +++ b/SunnyUI/Controls/UIEdit.cs @@ -70,7 +70,6 @@ namespace Sunny.UI { if (e.KeyData == Keys.Enter) { - base.OnKeyDown(e); EnterKeyPress?.Invoke(this, e); } diff --git a/SunnyUI/Forms/UILoginForm.cs b/SunnyUI/Forms/UILoginForm.cs index 7f769dea..7110fcac 100644 --- a/SunnyUI/Forms/UILoginForm.cs +++ b/SunnyUI/Forms/UILoginForm.cs @@ -91,7 +91,7 @@ namespace Sunny.UI private void UILoginForm_Enter(object sender, EventArgs e) { - btnLogin.PerformClick(); + //btnLogin.PerformClick(); } public string UserName