* UILoginForm:更新属性说明

This commit is contained in:
Sunny 2021-06-09 14:39:33 +08:00
parent d7fd994016
commit b822a292da
9 changed files with 44 additions and 79 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -44,21 +44,24 @@
// uiAvatar1 // uiAvatar1
// //
this.uiAvatar1.BackColor = System.Drawing.Color.Transparent; this.uiAvatar1.BackColor = System.Drawing.Color.Transparent;
this.uiAvatar1.Font = new System.Drawing.Font("微软雅黑", 12F); 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.Location = new System.Drawing.Point(65, 16);
this.uiAvatar1.MinimumSize = new System.Drawing.Size(1, 1);
this.uiAvatar1.Name = "uiAvatar1"; this.uiAvatar1.Name = "uiAvatar1";
this.uiAvatar1.Size = new System.Drawing.Size(60, 60); this.uiAvatar1.Size = new System.Drawing.Size(60, 60);
this.uiAvatar1.Style = Sunny.UI.UIStyle.Custom;
this.uiAvatar1.TabIndex = 4; this.uiAvatar1.TabIndex = 4;
this.uiAvatar1.Text = "uiAvatar1"; this.uiAvatar1.Text = "uiAvatar1";
// //
// uiLine1 // uiLine1
// //
this.uiLine1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); this.uiLine1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.uiLine1.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiLine1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLine1.Location = new System.Drawing.Point(4, 97); this.uiLine1.Location = new System.Drawing.Point(4, 97);
this.uiLine1.MinimumSize = new System.Drawing.Size(2, 2); this.uiLine1.MinimumSize = new System.Drawing.Size(2, 2);
this.uiLine1.Name = "uiLine1"; this.uiLine1.Name = "uiLine1";
this.uiLine1.Size = new System.Drawing.Size(182, 2); this.uiLine1.Size = new System.Drawing.Size(182, 2);
this.uiLine1.Style = Sunny.UI.UIStyle.Custom;
this.uiLine1.TabIndex = 5; this.uiLine1.TabIndex = 5;
// //
// edtUser // edtUser
@ -66,42 +69,54 @@
this.edtUser.Cursor = System.Windows.Forms.Cursors.IBeam; this.edtUser.Cursor = System.Windows.Forms.Cursors.IBeam;
this.edtUser.EnterAsTab = true; this.edtUser.EnterAsTab = true;
this.edtUser.FillColor = System.Drawing.Color.White; this.edtUser.FillColor = System.Drawing.Color.White;
this.edtUser.Font = new System.Drawing.Font("微软雅黑", 12F); 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.Location = new System.Drawing.Point(4, 121);
this.edtUser.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.edtUser.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.edtUser.Maximum = 2147483647D; this.edtUser.Maximum = 2147483647D;
this.edtUser.Minimum = -2147483648D; this.edtUser.Minimum = -2147483648D;
this.edtUser.MinimumSize = new System.Drawing.Size(1, 1);
this.edtUser.Name = "edtUser"; this.edtUser.Name = "edtUser";
this.edtUser.Padding = new System.Windows.Forms.Padding(5); this.edtUser.Padding = new System.Windows.Forms.Padding(5);
this.edtUser.Size = new System.Drawing.Size(182, 29); 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.TabIndex = 0;
this.edtUser.Watermark = "请输入用户名"; this.edtUser.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.edtUser.Watermark = "请输入账号";
// //
// edtPassword // edtPassword
// //
this.edtPassword.Cursor = System.Windows.Forms.Cursors.IBeam; this.edtPassword.Cursor = System.Windows.Forms.Cursors.IBeam;
this.edtPassword.FillColor = System.Drawing.Color.White; this.edtPassword.FillColor = System.Drawing.Color.White;
this.edtPassword.Font = new System.Drawing.Font("微软雅黑", 12F); 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.Location = new System.Drawing.Point(4, 162);
this.edtPassword.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.edtPassword.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.edtPassword.Maximum = 2147483647D; this.edtPassword.Maximum = 2147483647D;
this.edtPassword.Minimum = -2147483648D; this.edtPassword.Minimum = -2147483648D;
this.edtPassword.MinimumSize = new System.Drawing.Size(1, 1);
this.edtPassword.Name = "edtPassword"; this.edtPassword.Name = "edtPassword";
this.edtPassword.Padding = new System.Windows.Forms.Padding(5); this.edtPassword.Padding = new System.Windows.Forms.Padding(5);
this.edtPassword.PasswordChar = '*'; this.edtPassword.PasswordChar = '*';
this.edtPassword.Size = new System.Drawing.Size(182, 29); 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.TabIndex = 1;
this.edtPassword.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.edtPassword.Watermark = "请输入密码"; this.edtPassword.Watermark = "请输入密码";
this.edtPassword.DoEnter += new System.EventHandler(this.btnLogin_Click); this.edtPassword.DoEnter += new System.EventHandler(this.btnLogin_Click);
// //
// btnLogin // btnLogin
// //
this.btnLogin.Cursor = System.Windows.Forms.Cursors.Hand; this.btnLogin.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLogin.Font = new System.Drawing.Font("微软雅黑", 12F); 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.Location = new System.Drawing.Point(4, 206);
this.btnLogin.MinimumSize = new System.Drawing.Size(1, 1);
this.btnLogin.Name = "btnLogin"; this.btnLogin.Name = "btnLogin";
this.btnLogin.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0); this.btnLogin.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
this.btnLogin.Size = new System.Drawing.Size(86, 29); this.btnLogin.Size = new System.Drawing.Size(86, 29);
this.btnLogin.Style = Sunny.UI.UIStyle.Custom;
this.btnLogin.TabIndex = 2; this.btnLogin.TabIndex = 2;
this.btnLogin.Text = "登录"; this.btnLogin.Text = "登录";
this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click); this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click);
@ -113,8 +128,9 @@
this.btnCancel.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(127)))), ((int)(((byte)(128))))); this.btnCancel.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(127)))), ((int)(((byte)(128)))));
this.btnCancel.FillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89))))); this.btnCancel.FillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89)))));
this.btnCancel.FillSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89))))); this.btnCancel.FillSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89)))));
this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 12F); 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.Location = new System.Drawing.Point(100, 206);
this.btnCancel.MinimumSize = new System.Drawing.Size(1, 1);
this.btnCancel.Name = "btnCancel"; this.btnCancel.Name = "btnCancel";
this.btnCancel.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0); 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.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));
@ -132,7 +148,7 @@
// lblTitle // lblTitle
// //
this.lblTitle.BackColor = System.Drawing.Color.Transparent; this.lblTitle.BackColor = System.Drawing.Color.Transparent;
this.lblTitle.Font = new System.Drawing.Font("微软雅黑", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 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.ForeColor = System.Drawing.Color.Navy;
this.lblTitle.Location = new System.Drawing.Point(44, 35); this.lblTitle.Location = new System.Drawing.Point(44, 35);
this.lblTitle.Name = "lblTitle"; this.lblTitle.Name = "lblTitle";
@ -147,7 +163,7 @@
// //
this.lblSubText.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 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.BackColor = System.Drawing.Color.Transparent;
this.lblSubText.Font = new System.Drawing.Font("微软雅黑", 12F); 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.Location = new System.Drawing.Point(426, 421);
this.lblSubText.Name = "lblSubText"; this.lblSubText.Name = "lblSubText";
this.lblSubText.Size = new System.Drawing.Size(310, 26); this.lblSubText.Size = new System.Drawing.Size(310, 26);
@ -159,10 +175,11 @@
// //
this.uiLabel1.AutoSize = true; this.uiLabel1.AutoSize = true;
this.uiLabel1.BackColor = System.Drawing.Color.Transparent; this.uiLabel1.BackColor = System.Drawing.Color.Transparent;
this.uiLabel1.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiLabel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel1.Location = new System.Drawing.Point(58, 85); this.uiLabel1.Location = new System.Drawing.Point(58, 85);
this.uiLabel1.Name = "uiLabel1"; this.uiLabel1.Name = "uiLabel1";
this.uiLabel1.Size = new System.Drawing.Size(74, 21); this.uiLabel1.Size = new System.Drawing.Size(74, 21);
this.uiLabel1.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel1.TabIndex = 8; this.uiLabel1.TabIndex = 8;
this.uiLabel1.Text = "用户登录"; this.uiLabel1.Text = "用户登录";
this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -177,9 +194,10 @@
this.uiPanel1.Controls.Add(this.btnCancel); this.uiPanel1.Controls.Add(this.btnCancel);
this.uiPanel1.Controls.Add(this.btnLogin); this.uiPanel1.Controls.Add(this.btnLogin);
this.uiPanel1.FillColor = System.Drawing.Color.White; this.uiPanel1.FillColor = System.Drawing.Color.White;
this.uiPanel1.Font = new System.Drawing.Font("微软雅黑", 12F); 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.Location = new System.Drawing.Point(433, 126);
this.uiPanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); 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.Name = "uiPanel1";
this.uiPanel1.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.uiPanel1.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.uiPanel1.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None; this.uiPanel1.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
@ -188,10 +206,11 @@
this.uiPanel1.StyleCustomMode = true; this.uiPanel1.StyleCustomMode = true;
this.uiPanel1.TabIndex = 9; this.uiPanel1.TabIndex = 9;
this.uiPanel1.Text = null; this.uiPanel1.Text = null;
this.uiPanel1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
// //
// UILoginForm // UILoginForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F); this.AllowShowTitle = false;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackgroundImage = global::Sunny.UI.Properties.Resources.Login1; this.BackgroundImage = global::Sunny.UI.Properties.Resources.Login1;
this.ClientSize = new System.Drawing.Size(750, 450); this.ClientSize = new System.Drawing.Size(750, 450);
@ -205,7 +224,6 @@
this.ShowInTaskbar = false; this.ShowInTaskbar = false;
this.ShowTitle = false; this.ShowTitle = false;
this.Text = "UILogin"; this.Text = "UILogin";
this.Enter += new System.EventHandler(this.UILoginForm_Enter);
this.uiPanel1.ResumeLayout(false); this.uiPanel1.ResumeLayout(false);
this.uiPanel1.PerformLayout(); this.uiPanel1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);

View File

@ -14,12 +14,16 @@ namespace Sunny.UI
lblSubText.Text = lblSubText.Version; lblSubText.Text = lblSubText.Version;
} }
[Description("顶部标题"), Category("SunnyUI")]
[DefaultValue(null)]
public string Title public string Title
{ {
get => lblTitle.Text; get => lblTitle.Text;
set => lblTitle.Text = value; set => lblTitle.Text = value;
} }
[Description("底部说明"), Category("SunnyUI")]
[DefaultValue(null)]
public string SubText public string SubText
{ {
get => lblSubText.Text; get => lblSubText.Text;
@ -29,6 +33,7 @@ namespace Sunny.UI
private UILoginImage loginImage; private UILoginImage loginImage;
[DefaultValue(UILoginImage.Login1)] [DefaultValue(UILoginImage.Login1)]
[Description("背景图片"), Category("SunnyUI")]
public UILoginImage LoginImage public UILoginImage LoginImage
{ {
get => loginImage; get => loginImage;
@ -79,8 +84,10 @@ namespace Sunny.UI
} }
} }
[Description("确认按钮事件"), Category("SunnyUI")]
public event EventHandler ButtonLoginClick; public event EventHandler ButtonLoginClick;
[Description("取消按钮事件"), Category("SunnyUI")]
public event EventHandler ButtonCancelClick; public event EventHandler ButtonCancelClick;
[DefaultValue(false), Browsable(false)] [DefaultValue(false), Browsable(false)]
@ -88,19 +95,19 @@ namespace Sunny.UI
public delegate bool OnLoginHandle(string userName, string password); public delegate bool OnLoginHandle(string userName, string password);
[Description("登录校验事件"), Category("SunnyUI")]
public event OnLoginHandle OnLogin; public event OnLoginHandle OnLogin;
private void UILoginForm_Enter(object sender, EventArgs e) [DefaultValue(null)]
{ [Description("账号"), Category("SunnyUI")]
//btnLogin.PerformClick();
}
public string UserName public string UserName
{ {
get => edtUser.Text; get => edtUser.Text;
set => edtUser.Text = value; set => edtUser.Text = value;
} }
[DefaultValue(null)]
[Description("密码"), Category("SunnyUI")]
public string Password public string Password
{ {
get => edtPassword.Text; get => edtPassword.Text;

View File

@ -1,64 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <root>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">