* UILoginForm: 增加可选择显示时激活的控件
This commit is contained in:
parent
70a187702f
commit
0a7e7a0f41
@ -36,6 +36,14 @@ namespace Sunny.UI
|
||||
|
||||
public delegate void OnZoomScaleRectChanged(object sender, Rectangle info);
|
||||
|
||||
public enum UILoginFormFocusControl
|
||||
{
|
||||
UserName,
|
||||
Password,
|
||||
ButtonLogin,
|
||||
ButtonCancel
|
||||
}
|
||||
|
||||
public class UIPageEventArgs : EventArgs
|
||||
{
|
||||
public UIPage Page { get; set; }
|
||||
|
330
SunnyUI/Forms/UILoginForm.Designer.cs
generated
330
SunnyUI/Forms/UILoginForm.Designer.cs
generated
@ -28,205 +28,197 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.uiAvatar1 = new Sunny.UI.UIAvatar();
|
||||
this.uiLine1 = new Sunny.UI.UILine();
|
||||
this.edtUser = new Sunny.UI.UITextBox();
|
||||
this.edtPassword = new Sunny.UI.UITextBox();
|
||||
this.btnLogin = new Sunny.UI.UISymbolButton();
|
||||
this.btnCancel = new Sunny.UI.UISymbolButton();
|
||||
this.lblTitle = new Sunny.UI.UILabel();
|
||||
this.lblSubText = new Sunny.UI.UILabel();
|
||||
this.uiPanel1 = new Sunny.UI.UIPanel();
|
||||
this.uiPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
uiAvatar1 = new UIAvatar();
|
||||
uiLine1 = new UILine();
|
||||
edtUser = new UITextBox();
|
||||
edtPassword = new UITextBox();
|
||||
btnLogin = new UISymbolButton();
|
||||
btnCancel = new UISymbolButton();
|
||||
lblTitle = new UILabel();
|
||||
lblSubText = new UILabel();
|
||||
uiPanel1 = new UIPanel();
|
||||
uiPanel1.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// uiAvatar1
|
||||
//
|
||||
this.uiAvatar1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.uiAvatar1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.uiAvatar1.Location = new System.Drawing.Point(65, 16);
|
||||
this.uiAvatar1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.uiAvatar1.Name = "uiAvatar1";
|
||||
this.uiAvatar1.Size = new System.Drawing.Size(60, 60);
|
||||
this.uiAvatar1.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.uiAvatar1.TabIndex = 4;
|
||||
this.uiAvatar1.Text = "uiAvatar1";
|
||||
this.uiAvatar1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
||||
uiAvatar1.BackColor = System.Drawing.Color.Transparent;
|
||||
uiAvatar1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
uiAvatar1.Location = new System.Drawing.Point(65, 16);
|
||||
uiAvatar1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
uiAvatar1.Name = "uiAvatar1";
|
||||
uiAvatar1.Size = new System.Drawing.Size(60, 60);
|
||||
uiAvatar1.Style = UIStyle.Custom;
|
||||
uiAvatar1.TabIndex = 4;
|
||||
uiAvatar1.Text = "uiAvatar1";
|
||||
//
|
||||
// uiLine1
|
||||
//
|
||||
this.uiLine1.BackColor = System.Drawing.Color.White;
|
||||
this.uiLine1.FillColor = System.Drawing.Color.White;
|
||||
this.uiLine1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.uiLine1.Location = new System.Drawing.Point(4, 85);
|
||||
this.uiLine1.MinimumSize = new System.Drawing.Size(2, 2);
|
||||
this.uiLine1.Name = "uiLine1";
|
||||
this.uiLine1.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
|
||||
this.uiLine1.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
|
||||
this.uiLine1.Size = new System.Drawing.Size(182, 28);
|
||||
this.uiLine1.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.uiLine1.StyleCustomMode = true;
|
||||
this.uiLine1.TabIndex = 5;
|
||||
this.uiLine1.Text = "用户登录";
|
||||
this.uiLine1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
||||
uiLine1.BackColor = System.Drawing.Color.White;
|
||||
uiLine1.FillColor = System.Drawing.Color.White;
|
||||
uiLine1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
uiLine1.LineColor2 = System.Drawing.Color.FromArgb(80, 160, 255);
|
||||
uiLine1.Location = new System.Drawing.Point(4, 85);
|
||||
uiLine1.MinimumSize = new System.Drawing.Size(2, 2);
|
||||
uiLine1.Name = "uiLine1";
|
||||
uiLine1.RadiusSides = UICornerRadiusSides.None;
|
||||
uiLine1.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
|
||||
uiLine1.Size = new System.Drawing.Size(182, 28);
|
||||
uiLine1.Style = UIStyle.Custom;
|
||||
uiLine1.StyleCustomMode = true;
|
||||
uiLine1.TabIndex = 5;
|
||||
uiLine1.Text = "用户登录";
|
||||
//
|
||||
// edtUser
|
||||
//
|
||||
this.edtUser.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
this.edtUser.EnterAsTab = true;
|
||||
this.edtUser.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.edtUser.Location = new System.Drawing.Point(4, 121);
|
||||
this.edtUser.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.edtUser.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.edtUser.Name = "edtUser";
|
||||
this.edtUser.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.edtUser.ShowText = false;
|
||||
this.edtUser.Size = new System.Drawing.Size(182, 29);
|
||||
this.edtUser.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.edtUser.Symbol = 61447;
|
||||
this.edtUser.SymbolSize = 22;
|
||||
this.edtUser.TabIndex = 0;
|
||||
this.edtUser.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.edtUser.Watermark = "请输入账号";
|
||||
this.edtUser.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
||||
edtUser.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
edtUser.EnterAsTab = true;
|
||||
edtUser.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
edtUser.Location = new System.Drawing.Point(4, 121);
|
||||
edtUser.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
edtUser.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
edtUser.Name = "edtUser";
|
||||
edtUser.Padding = new System.Windows.Forms.Padding(5);
|
||||
edtUser.ShowText = false;
|
||||
edtUser.Size = new System.Drawing.Size(182, 29);
|
||||
edtUser.Style = UIStyle.Custom;
|
||||
edtUser.Symbol = 61447;
|
||||
edtUser.SymbolSize = 22;
|
||||
edtUser.TabIndex = 0;
|
||||
edtUser.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
edtUser.Watermark = "请输入账号";
|
||||
//
|
||||
// edtPassword
|
||||
//
|
||||
this.edtPassword.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
this.edtPassword.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.edtPassword.Location = new System.Drawing.Point(4, 162);
|
||||
this.edtPassword.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.edtPassword.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.edtPassword.Name = "edtPassword";
|
||||
this.edtPassword.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.edtPassword.PasswordChar = '*';
|
||||
this.edtPassword.ShowText = false;
|
||||
this.edtPassword.Size = new System.Drawing.Size(182, 29);
|
||||
this.edtPassword.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.edtPassword.Symbol = 61475;
|
||||
this.edtPassword.SymbolSize = 22;
|
||||
this.edtPassword.TabIndex = 1;
|
||||
this.edtPassword.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.edtPassword.Watermark = "请输入密码";
|
||||
this.edtPassword.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
||||
this.edtPassword.DoEnter += new System.EventHandler(this.btnLogin_Click);
|
||||
edtPassword.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
edtPassword.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
edtPassword.Location = new System.Drawing.Point(4, 162);
|
||||
edtPassword.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
edtPassword.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
edtPassword.Name = "edtPassword";
|
||||
edtPassword.Padding = new System.Windows.Forms.Padding(5);
|
||||
edtPassword.PasswordChar = '*';
|
||||
edtPassword.ShowText = false;
|
||||
edtPassword.Size = new System.Drawing.Size(182, 29);
|
||||
edtPassword.Style = UIStyle.Custom;
|
||||
edtPassword.Symbol = 61475;
|
||||
edtPassword.SymbolSize = 22;
|
||||
edtPassword.TabIndex = 1;
|
||||
edtPassword.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
edtPassword.Watermark = "请输入密码";
|
||||
edtPassword.DoEnter += btnLogin_Click;
|
||||
//
|
||||
// btnLogin
|
||||
//
|
||||
this.btnLogin.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnLogin.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.btnLogin.Location = new System.Drawing.Point(4, 206);
|
||||
this.btnLogin.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.btnLogin.Name = "btnLogin";
|
||||
this.btnLogin.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
|
||||
this.btnLogin.ShowFocusColor = true;
|
||||
this.btnLogin.Size = new System.Drawing.Size(86, 29);
|
||||
this.btnLogin.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.btnLogin.TabIndex = 2;
|
||||
this.btnLogin.Text = "登录";
|
||||
this.btnLogin.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
||||
this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click);
|
||||
btnLogin.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
btnLogin.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
btnLogin.Location = new System.Drawing.Point(4, 206);
|
||||
btnLogin.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
btnLogin.Name = "btnLogin";
|
||||
btnLogin.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
|
||||
btnLogin.ShowFocusColor = true;
|
||||
btnLogin.Size = new System.Drawing.Size(86, 29);
|
||||
btnLogin.Style = UIStyle.Custom;
|
||||
btnLogin.TabIndex = 2;
|
||||
btnLogin.Text = "登录";
|
||||
btnLogin.Click += btnLogin_Click;
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnCancel.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));
|
||||
this.btnCancel.FillColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));
|
||||
this.btnCancel.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(115)))), ((int)(((byte)(115)))));
|
||||
this.btnCancel.FillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.btnCancel.FillSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.btnCancel.Location = new System.Drawing.Point(100, 206);
|
||||
this.btnCancel.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
|
||||
this.btnCancel.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));
|
||||
this.btnCancel.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(115)))), ((int)(((byte)(115)))));
|
||||
this.btnCancel.RectPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.btnCancel.RectSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.btnCancel.ShowFocusColor = true;
|
||||
this.btnCancel.Size = new System.Drawing.Size(86, 29);
|
||||
this.btnCancel.Style = Sunny.UI.UIStyle.Red;
|
||||
this.btnCancel.StyleCustomMode = true;
|
||||
this.btnCancel.Symbol = 61453;
|
||||
this.btnCancel.TabIndex = 3;
|
||||
this.btnCancel.Text = "取消";
|
||||
this.btnCancel.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
btnCancel.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
btnCancel.FillColor = System.Drawing.Color.FromArgb(230, 80, 80);
|
||||
btnCancel.FillColor2 = System.Drawing.Color.FromArgb(230, 80, 80);
|
||||
btnCancel.FillHoverColor = System.Drawing.Color.FromArgb(235, 115, 115);
|
||||
btnCancel.FillPressColor = System.Drawing.Color.FromArgb(184, 64, 64);
|
||||
btnCancel.FillSelectedColor = System.Drawing.Color.FromArgb(184, 64, 64);
|
||||
btnCancel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
btnCancel.Location = new System.Drawing.Point(100, 206);
|
||||
btnCancel.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
btnCancel.Name = "btnCancel";
|
||||
btnCancel.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
|
||||
btnCancel.RectColor = System.Drawing.Color.FromArgb(230, 80, 80);
|
||||
btnCancel.RectHoverColor = System.Drawing.Color.FromArgb(235, 115, 115);
|
||||
btnCancel.RectPressColor = System.Drawing.Color.FromArgb(184, 64, 64);
|
||||
btnCancel.RectSelectedColor = System.Drawing.Color.FromArgb(184, 64, 64);
|
||||
btnCancel.ShowFocusColor = true;
|
||||
btnCancel.Size = new System.Drawing.Size(86, 29);
|
||||
btnCancel.Style = UIStyle.Red;
|
||||
btnCancel.StyleCustomMode = true;
|
||||
btnCancel.Symbol = 61453;
|
||||
btnCancel.TabIndex = 3;
|
||||
btnCancel.Text = "取消";
|
||||
btnCancel.Click += btnCancel_Click;
|
||||
//
|
||||
// lblTitle
|
||||
//
|
||||
this.lblTitle.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lblTitle.Font = new System.Drawing.Font("微软雅黑", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.lblTitle.ForeColor = System.Drawing.Color.Navy;
|
||||
this.lblTitle.Location = new System.Drawing.Point(44, 35);
|
||||
this.lblTitle.Name = "lblTitle";
|
||||
this.lblTitle.Size = new System.Drawing.Size(694, 32);
|
||||
this.lblTitle.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.lblTitle.StyleCustomMode = true;
|
||||
this.lblTitle.TabIndex = 6;
|
||||
this.lblTitle.Text = "SunnyUI.Net";
|
||||
this.lblTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.lblTitle.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
||||
lblTitle.BackColor = System.Drawing.Color.Transparent;
|
||||
lblTitle.Font = new System.Drawing.Font("微软雅黑", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
lblTitle.ForeColor = System.Drawing.Color.Navy;
|
||||
lblTitle.Location = new System.Drawing.Point(44, 35);
|
||||
lblTitle.Name = "lblTitle";
|
||||
lblTitle.Size = new System.Drawing.Size(694, 32);
|
||||
lblTitle.Style = UIStyle.Custom;
|
||||
lblTitle.StyleCustomMode = true;
|
||||
lblTitle.TabIndex = 6;
|
||||
lblTitle.Text = "SunnyUI.Net";
|
||||
lblTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// lblSubText
|
||||
//
|
||||
this.lblSubText.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lblSubText.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lblSubText.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.lblSubText.Location = new System.Drawing.Point(426, 421);
|
||||
this.lblSubText.Name = "lblSubText";
|
||||
this.lblSubText.Size = new System.Drawing.Size(310, 26);
|
||||
this.lblSubText.TabIndex = 7;
|
||||
this.lblSubText.Text = "SunnyUI";
|
||||
this.lblSubText.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.lblSubText.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
||||
lblSubText.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||
lblSubText.BackColor = System.Drawing.Color.Transparent;
|
||||
lblSubText.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
lblSubText.Location = new System.Drawing.Point(426, 421);
|
||||
lblSubText.Name = "lblSubText";
|
||||
lblSubText.Size = new System.Drawing.Size(310, 26);
|
||||
lblSubText.TabIndex = 7;
|
||||
lblSubText.Text = "SunnyUI";
|
||||
lblSubText.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// uiPanel1
|
||||
//
|
||||
this.uiPanel1.Controls.Add(this.uiAvatar1);
|
||||
this.uiPanel1.Controls.Add(this.uiLine1);
|
||||
this.uiPanel1.Controls.Add(this.edtUser);
|
||||
this.uiPanel1.Controls.Add(this.edtPassword);
|
||||
this.uiPanel1.Controls.Add(this.btnCancel);
|
||||
this.uiPanel1.Controls.Add(this.btnLogin);
|
||||
this.uiPanel1.FillColor = System.Drawing.Color.White;
|
||||
this.uiPanel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.uiPanel1.Location = new System.Drawing.Point(433, 126);
|
||||
this.uiPanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.uiPanel1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.uiPanel1.Name = "uiPanel1";
|
||||
this.uiPanel1.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
|
||||
this.uiPanel1.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
|
||||
this.uiPanel1.Size = new System.Drawing.Size(190, 245);
|
||||
this.uiPanel1.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.uiPanel1.StyleCustomMode = true;
|
||||
this.uiPanel1.TabIndex = 9;
|
||||
this.uiPanel1.Text = null;
|
||||
this.uiPanel1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.uiPanel1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
||||
uiPanel1.Controls.Add(uiAvatar1);
|
||||
uiPanel1.Controls.Add(uiLine1);
|
||||
uiPanel1.Controls.Add(edtUser);
|
||||
uiPanel1.Controls.Add(edtPassword);
|
||||
uiPanel1.Controls.Add(btnCancel);
|
||||
uiPanel1.Controls.Add(btnLogin);
|
||||
uiPanel1.FillColor = System.Drawing.Color.White;
|
||||
uiPanel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
uiPanel1.Location = new System.Drawing.Point(433, 126);
|
||||
uiPanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
uiPanel1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
uiPanel1.Name = "uiPanel1";
|
||||
uiPanel1.RadiusSides = UICornerRadiusSides.None;
|
||||
uiPanel1.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
|
||||
uiPanel1.Size = new System.Drawing.Size(190, 245);
|
||||
uiPanel1.Style = UIStyle.Custom;
|
||||
uiPanel1.StyleCustomMode = true;
|
||||
uiPanel1.TabIndex = 9;
|
||||
uiPanel1.Text = null;
|
||||
uiPanel1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// UILoginForm
|
||||
//
|
||||
this.AllowShowTitle = false;
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.BackgroundImage = global::Sunny.UI.Properties.Resources.Login1;
|
||||
this.ClientSize = new System.Drawing.Size(750, 450);
|
||||
this.Controls.Add(this.uiPanel1);
|
||||
this.Controls.Add(this.lblSubText);
|
||||
this.Controls.Add(this.lblTitle);
|
||||
this.EscClose = true;
|
||||
this.MaximumSize = new System.Drawing.Size(750, 450);
|
||||
this.MinimumSize = new System.Drawing.Size(750, 450);
|
||||
this.Name = "UILoginForm";
|
||||
this.Padding = new System.Windows.Forms.Padding(0);
|
||||
this.ShowInTaskbar = false;
|
||||
this.ShowTitle = false;
|
||||
this.Text = "UILogin";
|
||||
this.ZoomScaleRect = new System.Drawing.Rectangle(15, 15, 750, 450);
|
||||
this.uiPanel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
AllowShowTitle = false;
|
||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
BackgroundImage = Properties.Resources.Login1;
|
||||
ClientSize = new System.Drawing.Size(750, 450);
|
||||
Controls.Add(uiPanel1);
|
||||
Controls.Add(lblSubText);
|
||||
Controls.Add(lblTitle);
|
||||
EscClose = true;
|
||||
MaximumSize = new System.Drawing.Size(750, 450);
|
||||
MinimumSize = new System.Drawing.Size(750, 450);
|
||||
Name = "UILoginForm";
|
||||
Padding = new System.Windows.Forms.Padding(0);
|
||||
ShowInTaskbar = false;
|
||||
ShowTitle = false;
|
||||
Text = "UILogin";
|
||||
ZoomScaleRect = new System.Drawing.Rectangle(15, 15, 750, 450);
|
||||
Shown += UILoginForm_Shown;
|
||||
uiPanel1.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -1,4 +1,26 @@
|
||||
using Sunny.UI.Properties;
|
||||
/******************************************************************************
|
||||
* SunnyUI 开源控件库、工具类库、扩展类库、多页面开发框架。
|
||||
* CopyRight (C) 2012-2023 ShenYongHua(沈永华).
|
||||
* QQ群:56829229 QQ:17612584 EMail:SunnyUI@QQ.Com
|
||||
*
|
||||
* Blog: https://www.cnblogs.com/yhuse
|
||||
* Gitee: https://gitee.com/yhuse/SunnyUI
|
||||
* GitHub: https://github.com/yhuse/SunnyUI
|
||||
*
|
||||
* SunnyUI.dll can be used for free under the GPL-3.0 license.
|
||||
* If you use this code, please keep this note.
|
||||
* 如果您使用此代码,请保留此说明。
|
||||
******************************************************************************
|
||||
* 文件名称: UILoginForm.cs
|
||||
* 文件说明: 登录窗体基类
|
||||
* 当前版本: V3.1
|
||||
* 创建日期: 2020-01-01
|
||||
*
|
||||
* 2020-01-01: V2.2.0 增加文件说明
|
||||
* 2023-04-19: V3.3.5 增加可选择显示时激活的控件
|
||||
******************************************************************************/
|
||||
|
||||
using Sunny.UI.Properties;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
@ -14,6 +36,29 @@ namespace Sunny.UI
|
||||
lblSubText.Text = lblSubText.Version;
|
||||
}
|
||||
|
||||
[Description("显示时激活的控件"), Category("SunnyUI")]
|
||||
[DefaultValue(UILoginFormFocusControl.UserName)]
|
||||
public UILoginFormFocusControl FocusControl { get; set; } = UILoginFormFocusControl.UserName;
|
||||
|
||||
private void UILoginForm_Shown(object sender, EventArgs e)
|
||||
{
|
||||
switch (FocusControl)
|
||||
{
|
||||
case UILoginFormFocusControl.UserName:
|
||||
edtUser.Focus();
|
||||
break;
|
||||
case UILoginFormFocusControl.Password:
|
||||
edtPassword.Focus();
|
||||
break;
|
||||
case UILoginFormFocusControl.ButtonLogin:
|
||||
btnLogin.Focus();
|
||||
break;
|
||||
case UILoginFormFocusControl.ButtonCancel:
|
||||
btnCancel.Focus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[Description("顶部标题"), Category("SunnyUI")]
|
||||
[DefaultValue("SunnyUI.Net")]
|
||||
public string Title
|
||||
|
Loading…
x
Reference in New Issue
Block a user