+ UILoginForm:增加登录窗体

This commit is contained in:
Sunny 2020-06-20 21:00:15 +08:00
parent dcdb3f8874
commit 4c046a2002
21 changed files with 3993 additions and 6 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -56,11 +56,17 @@
this.uiSymbolButton7 = new Sunny.UI.UISymbolButton();
this.uiSymbolButton8 = new Sunny.UI.UISymbolButton();
this.uiSymbolButton9 = new Sunny.UI.UISymbolButton();
this.uiLine8 = new Sunny.UI.UILine();
this.uiSymbolButton3 = new Sunny.UI.UISymbolButton();
this.uiSymbolButton10 = new Sunny.UI.UISymbolButton();
this.PagePanel.SuspendLayout();
this.SuspendLayout();
//
// PagePanel
//
this.PagePanel.Controls.Add(this.uiLine8);
this.PagePanel.Controls.Add(this.uiSymbolButton3);
this.PagePanel.Controls.Add(this.uiSymbolButton10);
this.PagePanel.Controls.Add(this.uiLine7);
this.PagePanel.Controls.Add(this.uiSymbolButton7);
this.PagePanel.Controls.Add(this.uiSymbolButton8);
@ -90,6 +96,7 @@
this.PagePanel.Controls.Add(this.btnSuccess);
this.PagePanel.Controls.Add(this.btnAsk);
this.PagePanel.Size = new System.Drawing.Size(800, 514);
this.PagePanel.Style = Sunny.UI.UIStyle.Blue;
//
// btnError
//
@ -418,7 +425,7 @@
this.uiLine6.Location = new System.Drawing.Point(30, 415);
this.uiLine6.MinimumSize = new System.Drawing.Size(16, 16);
this.uiLine6.Name = "uiLine6";
this.uiLine6.Size = new System.Drawing.Size(670, 20);
this.uiLine6.Size = new System.Drawing.Size(328, 20);
this.uiLine6.TabIndex = 59;
this.uiLine6.Text = "ULocalize";
this.uiLine6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -456,7 +463,7 @@
this.uiLine7.Location = new System.Drawing.Point(30, 336);
this.uiLine7.MinimumSize = new System.Drawing.Size(16, 16);
this.uiLine7.Name = "uiLine7";
this.uiLine7.Size = new System.Drawing.Size(670, 20);
this.uiLine7.Size = new System.Drawing.Size(328, 20);
this.uiLine7.TabIndex = 66;
this.uiLine7.Text = "UIMessageTip";
this.uiLine7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -524,6 +531,43 @@
this.uiSymbolButton9.Text = "Success";
this.uiSymbolButton9.Click += new System.EventHandler(this.uiSymbolButton9_Click);
//
// uiLine8
//
this.uiLine8.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiLine8.Location = new System.Drawing.Point(372, 336);
this.uiLine8.MinimumSize = new System.Drawing.Size(16, 16);
this.uiLine8.Name = "uiLine8";
this.uiLine8.Size = new System.Drawing.Size(328, 20);
this.uiLine8.TabIndex = 69;
this.uiLine8.Text = "UILoginForm";
this.uiLine8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// uiSymbolButton3
//
this.uiSymbolButton3.Cursor = System.Windows.Forms.Cursors.Hand;
this.uiSymbolButton3.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiSymbolButton3.Location = new System.Drawing.Point(486, 368);
this.uiSymbolButton3.Name = "uiSymbolButton3";
this.uiSymbolButton3.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
this.uiSymbolButton3.Size = new System.Drawing.Size(100, 35);
this.uiSymbolButton3.Symbol = 62144;
this.uiSymbolButton3.TabIndex = 68;
this.uiSymbolButton3.Text = "Login";
this.uiSymbolButton3.Click += new System.EventHandler(this.uiSymbolButton3_Click);
//
// uiSymbolButton10
//
this.uiSymbolButton10.Cursor = System.Windows.Forms.Cursors.Hand;
this.uiSymbolButton10.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiSymbolButton10.Location = new System.Drawing.Point(372, 368);
this.uiSymbolButton10.Name = "uiSymbolButton10";
this.uiSymbolButton10.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
this.uiSymbolButton10.Size = new System.Drawing.Size(100, 35);
this.uiSymbolButton10.Symbol = 61447;
this.uiSymbolButton10.TabIndex = 67;
this.uiSymbolButton10.Text = "Login";
this.uiSymbolButton10.Click += new System.EventHandler(this.uiSymbolButton10_Click);
//
// FDialogs
//
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);
@ -535,7 +579,6 @@
this.PagePanel.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
@ -568,5 +611,8 @@
private UISymbolButton uiSymbolButton7;
private UISymbolButton uiSymbolButton8;
private UISymbolButton uiSymbolButton9;
private UILine uiLine8;
private UISymbolButton uiSymbolButton3;
private UISymbolButton uiSymbolButton10;
}
}

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using Sunny.UI.Demo.Forms;
namespace Sunny.UI.Demo
{
@ -147,5 +148,38 @@ namespace Sunny.UI.Demo
{
UIMessageTip.ShowError("轻便消息提示框 - 错误");
}
private void uiSymbolButton10_Click(object sender, EventArgs e)
{
FLogin frm = new FLogin();
frm.ShowDialog();
if (frm.IsLogin)
{
UIMessageTip.ShowOk("登录成功");
}
frm.Dispose();
}
private void uiSymbolButton3_Click(object sender, EventArgs e)
{
UILoginForm frm = new UILoginForm();
frm.Text = "SunnyUI.Net Login Form";
frm.SubText = "SunnyUI.Net V2.2.5";
frm.OnLogin += Frm_OnLogin;
frm.LoginImage = UILoginForm.UILoginImage.Login2;
frm.ShowDialog();
if (frm.IsLogin)
{
UIMessageTip.ShowOk("登录成功");
}
frm.Dispose();
}
private bool Frm_OnLogin(string userName, string password)
{
return userName == "admin" && password == "admin";
}
}
}

54
SunnyUI.Demo/Forms/FLogin.Designer.cs generated Normal file
View File

@ -0,0 +1,54 @@
namespace Sunny.UI.Demo.Forms
{
partial class FLogin
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FLogin));
this.SuspendLayout();
//
// lblTitle
//
this.lblTitle.Text = "SunnyUI Login Form";
//
// FLogin
//
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.ClientSize = new System.Drawing.Size(750, 450);
this.Name = "FLogin";
this.Text = "SunnyUI Login Form";
this.ButtonLoginClick += new System.EventHandler(this.FLogin_ButtonLoginClick);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
}
}

View File

@ -0,0 +1,21 @@
using System;
namespace Sunny.UI.Demo.Forms
{
public partial class FLogin : UILoginForm
{
public FLogin()
{
InitializeComponent();
}
private void FLogin_ButtonLoginClick(object sender, EventArgs e)
{
if (UserName == "admin" && Password == "admin")
{
IsLogin = true;
Close();
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -136,6 +136,12 @@
<Compile Include="Forms\FEditor.Designer.cs">
<DependentUpon>FEditor.cs</DependentUpon>
</Compile>
<Compile Include="Forms\FLogin.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\FLogin.Designer.cs">
<DependentUpon>FLogin.cs</DependentUpon>
</Compile>
<Compile Include="Forms\Frames\FAsideHeaderMainFooter.cs">
<SubType>Form</SubType>
</Compile>
@ -324,6 +330,9 @@
<EmbeddedResource Include="Forms\FEditor.resx">
<DependentUpon>FEditor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\FLogin.resx">
<DependentUpon>FLogin.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\Frames\FAsideHeaderMainFooter.resx">
<DependentUpon>FAsideHeaderMainFooter.cs</DependentUpon>
</EmbeddedResource>

View File

@ -32,8 +32,7 @@ namespace Sunny.UI
public UILine()
{
Size = new Size(360, 29);
MinimumSize = new Size(16, 16);
ShowRect = false;
MinimumSize = new Size(2, 2);
foreColor = UIStyles.Blue.LineForeColor;
fillColor = UIStyles.Blue.PlainColor;
}
@ -100,7 +99,7 @@ namespace Sunny.UI
set => SetForeColor(value);
}
protected override void OnPaintFill(Graphics g, GraphicsPath path)
protected override void OnPaintRect(Graphics g, GraphicsPath path)
{
g.Clear(fillColor);
if (Direction == LineDirection.Horizontal)

View File

@ -157,9 +157,16 @@ namespace Sunny.UI
private void EditOnKeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
DoEnter?.Invoke(sender,e);
}
KeyDown?.Invoke(sender, e);
}
public event EventHandler DoEnter;
private void EditOnKeyUp(object sender, KeyEventArgs e)
{
KeyUp?.Invoke(sender, e);

206
SunnyUI/Forms/UILoginForm.Designer.cs generated Normal file
View File

@ -0,0 +1,206 @@
namespace Sunny.UI
{
partial class UILoginForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </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.uiLabel1 = new Sunny.UI.UILabel();
this.SuspendLayout();
//
// uiAvatar1
//
this.uiAvatar1.BackColor = System.Drawing.Color.Transparent;
this.uiAvatar1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiAvatar1.Location = new System.Drawing.Point(498, 136);
this.uiAvatar1.Name = "uiAvatar1";
this.uiAvatar1.Size = new System.Drawing.Size(60, 60);
this.uiAvatar1.TabIndex = 4;
this.uiAvatar1.Text = "uiAvatar1";
//
// uiLine1
//
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.Location = new System.Drawing.Point(437, 217);
this.uiLine1.MinimumSize = new System.Drawing.Size(2, 2);
this.uiLine1.Name = "uiLine1";
this.uiLine1.Size = new System.Drawing.Size(182, 2);
this.uiLine1.TabIndex = 5;
//
// edtUser
//
this.edtUser.Cursor = System.Windows.Forms.Cursors.IBeam;
this.edtUser.EnterAsTab = true;
this.edtUser.FillColor = System.Drawing.Color.White;
this.edtUser.Font = new System.Drawing.Font("微软雅黑", 12F);
this.edtUser.Location = new System.Drawing.Point(437, 241);
this.edtUser.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.edtUser.Maximum = 2147483647D;
this.edtUser.Minimum = -2147483648D;
this.edtUser.Name = "edtUser";
this.edtUser.Padding = new System.Windows.Forms.Padding(5);
this.edtUser.Size = new System.Drawing.Size(182, 29);
this.edtUser.TabIndex = 0;
this.edtUser.Watermark = "请输入用户名";
//
// edtPassword
//
this.edtPassword.Cursor = System.Windows.Forms.Cursors.IBeam;
this.edtPassword.FillColor = System.Drawing.Color.White;
this.edtPassword.Font = new System.Drawing.Font("微软雅黑", 12F);
this.edtPassword.Location = new System.Drawing.Point(437, 282);
this.edtPassword.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.edtPassword.Maximum = 2147483647D;
this.edtPassword.Minimum = -2147483648D;
this.edtPassword.Name = "edtPassword";
this.edtPassword.Padding = new System.Windows.Forms.Padding(5);
this.edtPassword.PasswordChar = '*';
this.edtPassword.Size = new System.Drawing.Size(182, 29);
this.edtPassword.TabIndex = 1;
this.edtPassword.Watermark = "请输入密码";
this.edtPassword.DoEnter += new System.EventHandler(this.btnLogin_Click);
//
// btnLogin
//
this.btnLogin.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLogin.Font = new System.Drawing.Font("微软雅黑", 12F);
this.btnLogin.Location = new System.Drawing.Point(437, 326);
this.btnLogin.Name = "btnLogin";
this.btnLogin.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
this.btnLogin.Size = new System.Drawing.Size(86, 29);
this.btnLogin.TabIndex = 2;
this.btnLogin.Text = "登录";
this.btnLogin.Click += new System.EventHandler(this.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.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.Font = new System.Drawing.Font("微软雅黑", 12F);
this.btnCancel.Location = new System.Drawing.Point(533, 326);
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)(232)))), ((int)(((byte)(127)))), ((int)(((byte)(128)))));
this.btnCancel.RectPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89)))));
this.btnCancel.Size = new System.Drawing.Size(86, 29);
this.btnCancel.Style = Sunny.UI.UIStyle.Red;
this.btnCancel.StyleCustomMode = true;
this.btnCancel.TabIndex = 3;
this.btnCancel.Text = "取消";
this.btnCancel.Click += new System.EventHandler(this.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, ((byte)(134)));
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;
//
// 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);
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 V2.2.5";
this.lblSubText.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// uiLabel1
//
this.uiLabel1.AutoSize = true;
this.uiLabel1.BackColor = System.Drawing.Color.Transparent;
this.uiLabel1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiLabel1.Location = new System.Drawing.Point(491, 205);
this.uiLabel1.Name = "uiLabel1";
this.uiLabel1.Size = new System.Drawing.Size(74, 21);
this.uiLabel1.TabIndex = 8;
this.uiLabel1.Text = "用户登录";
this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// UILoginForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackgroundImage = global::Sunny.UI.Properties.Resources.Login1;
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.ClientSize = new System.Drawing.Size(750, 450);
this.Controls.Add(this.uiLabel1);
this.Controls.Add(this.lblSubText);
this.Controls.Add(this.lblTitle);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnLogin);
this.Controls.Add(this.edtPassword);
this.Controls.Add(this.edtUser);
this.Controls.Add(this.uiLine1);
this.Controls.Add(this.uiAvatar1);
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.Enter += new System.EventHandler(this.UILoginForm_Enter);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private UIAvatar uiAvatar1;
private UILine uiLine1;
private UITextBox edtUser;
private UITextBox edtPassword;
private UILabel lblSubText;
protected UILabel lblTitle;
private UISymbolButton btnLogin;
private UISymbolButton btnCancel;
private UILabel uiLabel1;
}
}

View File

@ -0,0 +1,104 @@
using Sunny.UI.Properties;
using System;
using System.ComponentModel;
namespace Sunny.UI
{
[DefaultProperty("Text")]
[DefaultEvent("OnLogin")]
public partial class UILoginForm : UIForm
{
public UILoginForm()
{
InitializeComponent();
}
public new string Text
{
get => lblTitle.Text;
set => lblTitle.Text = value;
}
public string SubText
{
get => lblSubText.Text;
set => lblSubText.Text = value;
}
private UILoginImage loginImage;
[DefaultValue(UILoginImage.Login1)]
public UILoginImage LoginImage
{
get => loginImage;
set
{
if (loginImage != value)
{
loginImage = value;
if (loginImage == UILoginImage.Login1)
BackgroundImage = Resources.Login1;
if (loginImage == UILoginImage.Login2)
BackgroundImage = Resources.Login2;
}
}
}
public enum UILoginImage
{
Login1,
Login2
}
private void btnCancel_Click(object sender, EventArgs e)
{
if (ButtonCancelClick != null)
ButtonCancelClick?.Invoke(sender, e);
else
Close();
}
private void btnLogin_Click(object sender, EventArgs e)
{
if (ButtonLoginClick != null)
{
ButtonLoginClick?.Invoke(sender, e);
}
else
{
IsLogin = OnLogin != null && OnLogin(edtUser.Text, edtPassword.Text);
if (IsLogin) Close();
}
}
public event EventHandler ButtonLoginClick;
public event EventHandler ButtonCancelClick;
[DefaultValue(false), Browsable(false)]
public bool IsLogin { get; protected set; }
public delegate bool OnLoginHandle(string userName, string password);
public event OnLoginHandle OnLogin;
private void UILoginForm_Enter(object sender, EventArgs e)
{
btnLogin.PerformClick();
}
public string UserName
{
get => edtUser.Text;
set => edtUser.Text = value;
}
public string Password
{
get => edtPassword.Text;
set => edtPassword.Text = value;
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -110,6 +110,26 @@ namespace Sunny.UI.Properties {
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap Login1 {
get {
object obj = ResourceManager.GetObject("Login1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap Login2 {
get {
object obj = ResourceManager.GetObject("Login2", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>

View File

@ -133,6 +133,12 @@
<data name="img_notifier" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img_notifier.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Login1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Login1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Login2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Login2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="menu" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\menu.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 KiB

View File

@ -120,6 +120,12 @@
<Compile Include="Controls\UITransparentPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\UILoginForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\UILoginForm.Designer.cs">
<DependentUpon>UILoginForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\UINotifier.cs">
<SubType>Form</SubType>
</Compile>
@ -499,6 +505,9 @@
<EmbeddedResource Include="Controls\UITitlePanel.resx">
<DependentUpon>UITitlePanel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\UILoginForm.resx">
<DependentUpon>UILoginForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\UINotifier.resx">
<DependentUpon>UINotifier.cs</DependentUpon>
</EmbeddedResource>
@ -635,6 +644,12 @@
<ItemGroup>
<None Include="Resources\colorbarIndicators.bmp" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\Login1.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\Login2.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -1,5 +1,11 @@
+ 增加; - 删除; * 修改
2020.06.20
+ UILoginForm增加登录窗体
2020.06.18
* UIBarChart完成开发
2020.06.16
+ UIBarChart新增ToolTip显示
+ UINavMenu新增TipsText气泡数字显示