* UILoginForm:更新回车按钮事件执行两次的问题
This commit is contained in:
parent
b39c27753e
commit
72ab4b487e
BIN
Bin/SunnyUI.dll
BIN
Bin/SunnyUI.dll
Binary file not shown.
BIN
Bin/SunnyUI.pdb
BIN
Bin/SunnyUI.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
5
SunnyUI.Demo/Charts/FPieChart.Designer.cs
generated
5
SunnyUI.Demo/Charts/FPieChart.Designer.cs
generated
@ -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";
|
||||
|
@ -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()
|
||||
|
@ -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();
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -70,7 +70,6 @@ namespace Sunny.UI
|
||||
{
|
||||
if (e.KeyData == Keys.Enter)
|
||||
{
|
||||
base.OnKeyDown(e);
|
||||
EnterKeyPress?.Invoke(this, e);
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ namespace Sunny.UI
|
||||
|
||||
private void UILoginForm_Enter(object sender, EventArgs e)
|
||||
{
|
||||
btnLogin.PerformClick();
|
||||
//btnLogin.PerformClick();
|
||||
}
|
||||
|
||||
public string UserName
|
||||
|
Loading…
x
Reference in New Issue
Block a user