* UIButton:增加ShowFocusColor,用来显示Focus状态

* UIInputForm:选中取消按钮时,按回车取消
This commit is contained in:
Sunny 2021-07-18 10:53:44 +08:00
parent e801c64974
commit d5627bb965
19 changed files with 124 additions and 217 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -69,14 +69,20 @@ namespace Sunny.UI
/// </summary>
[DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; }
public string TagString
{
get; set;
}
/// <summary>
/// 自定义主题风格
/// </summary>
[DefaultValue(false)]
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
public bool StyleCustomMode { get; set; }
public bool StyleCustomMode
{
get; set;
}
/// <summary>
/// 是否在设计期
@ -89,7 +95,8 @@ namespace Sunny.UI
{
return true;
}
else if (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv")
if (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv")
{
return true;
}
@ -219,7 +226,10 @@ namespace Sunny.UI
/// <summary>
/// 版本
/// </summary>
public string Version { get; }
public string Version
{
get;
}
/// <summary>
/// 设置主题样式
@ -367,9 +377,19 @@ namespace Sunny.UI
color = rectPressColor;
if (selected)
color = rectSelectedColor;
if (ShowFocusColor && Focused)
color = rectPressColor;
return Enabled ? color : rectDisableColor;
}
[Description("是否显示激活状态颜色"), Category("SunnyUI")]
[DefaultValue(false)]
public bool ShowFocusColor
{
get;
set;
}
/// <summary>
/// 获取字体颜色
/// </summary>
@ -384,6 +404,8 @@ namespace Sunny.UI
color = forePressColor;
if (selected)
color = foreSelectedColor;
if (ShowFocusColor && Focused)
color = forePressColor;
return Enabled ? color : foreDisableColor;
}
@ -401,6 +423,8 @@ namespace Sunny.UI
color = fillPressColor;
if (selected)
color = fillSelectedColor;
if (ShowFocusColor && Focused)
color = fillPressColor;
return Enabled ? color : fillDisableColor;
}

View File

@ -75,7 +75,10 @@ namespace Sunny.UI
/// </summary>
[DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; }
public string TagString
{
get; set;
}
private string text;
@ -486,7 +489,10 @@ namespace Sunny.UI
/// </summary>
[DefaultValue(false)]
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
public bool StyleCustomMode { get; set; }
public bool StyleCustomMode
{
get; set;
}
protected UIStyle _style = UIStyle.Blue;
@ -597,7 +603,10 @@ namespace Sunny.UI
public event EventHandler RectColorChanged;
public string Version { get; }
public string Version
{
get;
}
private ContentAlignment _textAlignment = ContentAlignment.MiddleCenter;

View File

@ -32,6 +32,7 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
this.Grid = new Sunny.UI.UIDataGridView();
this.Panel = new Sunny.UI.UIPanel();
this.uiSymbolButton4 = new Sunny.UI.UISymbolButton();
@ -47,6 +48,7 @@
//
this.PagePanel.Controls.Add(this.Grid);
this.PagePanel.Controls.Add(this.Panel);
this.PagePanel.Size = new System.Drawing.Size(1264, 852);
//
// Grid
//
@ -56,16 +58,16 @@
this.Grid.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F);
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.Grid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.Grid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F);
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(200)))), ((int)(((byte)(255)))));
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
@ -73,16 +75,25 @@
this.Grid.DefaultCellStyle = dataGridViewCellStyle3;
this.Grid.Dock = System.Windows.Forms.DockStyle.Fill;
this.Grid.EnableHeadersVisualStyles = false;
this.Grid.Font = new System.Drawing.Font("微软雅黑", 12F);
this.Grid.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.Grid.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.Grid.Location = new System.Drawing.Point(0, 0);
this.Grid.Name = "Grid";
dataGridViewCellStyle4.BackColor = System.Drawing.Color.White;
this.Grid.RowsDefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.Grid.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.Grid.RowHeight = 29;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.White;
this.Grid.RowsDefaultCellStyle = dataGridViewCellStyle5;
this.Grid.RowTemplate.Height = 29;
this.Grid.SelectedIndex = -1;
this.Grid.ShowGridLine = true;
this.Grid.Size = new System.Drawing.Size(800, 360);
this.Grid.Size = new System.Drawing.Size(1264, 797);
this.Grid.TabIndex = 0;
//
// Panel
@ -92,25 +103,27 @@
this.Panel.Controls.Add(this.uiSymbolButton2);
this.Panel.Controls.Add(this.uiSymbolButton1);
this.Panel.Dock = System.Windows.Forms.DockStyle.Bottom;
this.Panel.Font = new System.Drawing.Font("微软雅黑", 12F);
this.Panel.Location = new System.Drawing.Point(0, 360);
this.Panel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.Panel.Location = new System.Drawing.Point(0, 797);
this.Panel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Panel.MinimumSize = new System.Drawing.Size(1, 1);
this.Panel.Name = "Panel";
this.Panel.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.Panel.RectSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)(((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right)
| System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom)));
this.Panel.Size = new System.Drawing.Size(800, 55);
this.Panel.Size = new System.Drawing.Size(1264, 55);
this.Panel.TabIndex = 1;
this.Panel.Text = null;
this.Panel.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
//
// uiSymbolButton4
//
this.uiSymbolButton4.Cursor = System.Windows.Forms.Cursors.Hand;
this.uiSymbolButton4.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiSymbolButton4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiSymbolButton4.Location = new System.Drawing.Point(345, 10);
this.uiSymbolButton4.MinimumSize = new System.Drawing.Size(1, 1);
this.uiSymbolButton4.Name = "uiSymbolButton4";
this.uiSymbolButton4.ShowFocusColor = true;
this.uiSymbolButton4.Size = new System.Drawing.Size(100, 35);
this.uiSymbolButton4.Symbol = 61639;
this.uiSymbolButton4.TabIndex = 3;
@ -120,10 +133,11 @@
// uiSymbolButton3
//
this.uiSymbolButton3.Cursor = System.Windows.Forms.Cursors.Hand;
this.uiSymbolButton3.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiSymbolButton3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiSymbolButton3.Location = new System.Drawing.Point(235, 10);
this.uiSymbolButton3.MinimumSize = new System.Drawing.Size(1, 1);
this.uiSymbolButton3.Name = "uiSymbolButton3";
this.uiSymbolButton3.ShowFocusColor = true;
this.uiSymbolButton3.Size = new System.Drawing.Size(100, 35);
this.uiSymbolButton3.Symbol = 61544;
this.uiSymbolButton3.TabIndex = 2;
@ -132,10 +146,11 @@
// uiSymbolButton2
//
this.uiSymbolButton2.Cursor = System.Windows.Forms.Cursors.Hand;
this.uiSymbolButton2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiSymbolButton2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiSymbolButton2.Location = new System.Drawing.Point(125, 10);
this.uiSymbolButton2.MinimumSize = new System.Drawing.Size(1, 1);
this.uiSymbolButton2.Name = "uiSymbolButton2";
this.uiSymbolButton2.ShowFocusColor = true;
this.uiSymbolButton2.Size = new System.Drawing.Size(100, 35);
this.uiSymbolButton2.Symbol = 61508;
this.uiSymbolButton2.TabIndex = 1;
@ -144,10 +159,11 @@
// uiSymbolButton1
//
this.uiSymbolButton1.Cursor = System.Windows.Forms.Cursors.Hand;
this.uiSymbolButton1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiSymbolButton1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiSymbolButton1.Location = new System.Drawing.Point(15, 10);
this.uiSymbolButton1.MinimumSize = new System.Drawing.Size(1, 1);
this.uiSymbolButton1.Name = "uiSymbolButton1";
this.uiSymbolButton1.ShowFocusColor = true;
this.uiSymbolButton1.Size = new System.Drawing.Size(100, 35);
this.uiSymbolButton1.Symbol = 61543;
this.uiSymbolButton1.TabIndex = 0;
@ -156,7 +172,7 @@
// UIDataGridViewForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(800, 450);
this.ClientSize = new System.Drawing.Size(1264, 887);
this.Name = "UIDataGridViewForm";
this.Text = "FDataGridView";
this.PagePanel.ResumeLayout(false);

View File

@ -1,64 +1,4 @@
<?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.
-->
<root>
<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">

View File

@ -50,6 +50,7 @@
this.pnlBtm.Size = new System.Drawing.Size(598, 55);
this.pnlBtm.TabIndex = 1;
this.pnlBtm.Text = null;
this.pnlBtm.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnCancel
//
@ -61,6 +62,7 @@
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.ShowFocusColor = true;
this.btnCancel.Size = new System.Drawing.Size(100, 35);
this.btnCancel.Symbol = 61453;
this.btnCancel.TabIndex = 1;
@ -78,6 +80,7 @@
this.btnOK.MinimumSize = new System.Drawing.Size(1, 1);
this.btnOK.Name = "btnOK";
this.btnOK.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
this.btnOK.ShowFocusColor = true;
this.btnOK.Size = new System.Drawing.Size(100, 35);
this.btnOK.TabIndex = 0;
this.btnOK.Text = "确定";
@ -89,6 +92,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(600, 450);
this.Controls.Add(this.pnlBtm);
this.EscClose = true;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "UIEditForm";
@ -101,8 +105,8 @@
}
#endregion
private UISymbolButton btnCancel;
private UISymbolButton btnOK;
protected UIPanel pnlBtm;
protected UISymbolButton btnCancel;
protected UISymbolButton btnOK;
}
}

View File

@ -30,6 +30,7 @@
{
this.label = new Sunny.UI.UILabel();
this.edit = new Sunny.UI.UITextBox();
this.pnlBtm.SuspendLayout();
this.SuspendLayout();
//
// pnlBtm
@ -39,11 +40,19 @@
this.pnlBtm.Size = new System.Drawing.Size(471, 55);
this.pnlBtm.TabIndex = 2;
//
// btnCancel
//
this.btnCancel.Location = new System.Drawing.Point(343, 12);
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(228, 12);
//
// label
//
this.label.AutoSize = true;
this.label.BackColor = System.Drawing.Color.Transparent;
this.label.Font = new System.Drawing.Font("微软雅黑", 12F);
this.label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label.Location = new System.Drawing.Point(29, 57);
this.label.Name = "label";
this.label.Size = new System.Drawing.Size(218, 21);
@ -55,29 +64,32 @@
//
this.edit.Cursor = System.Windows.Forms.Cursors.IBeam;
this.edit.FillColor = System.Drawing.Color.White;
this.edit.Font = new System.Drawing.Font("微软雅黑", 12F);
this.edit.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.edit.Location = new System.Drawing.Point(29, 92);
this.edit.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.edit.Maximum = 2147483647D;
this.edit.Minimum = -2147483648D;
this.edit.MinimumSize = new System.Drawing.Size(1, 1);
this.edit.Name = "edit";
this.edit.Padding = new System.Windows.Forms.Padding(5);
this.edit.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.edit.Size = new System.Drawing.Size(415, 29);
this.edit.TabIndex = 0;
this.edit.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
//
// UIInputForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(473, 182);
this.Controls.Add(this.edit);
this.Controls.Add(this.label);
this.Name = "UIInputForm";
this.ShowInTaskbar = false;
this.Text = "输入";
this.Shown += new System.EventHandler(this.UIInputForm_Shown);
this.Controls.SetChildIndex(this.pnlBtm, 0);
this.Controls.SetChildIndex(this.label, 0);
this.Controls.SetChildIndex(this.edit, 0);
this.pnlBtm.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -38,7 +38,10 @@ namespace Sunny.UI
public UILabel Label => label;
public bool CheckInputEmpty { get; set; }
public bool CheckInputEmpty
{
get; set;
}
protected override bool CheckData()
{
@ -56,6 +59,8 @@ namespace Sunny.UI
protected override void DoEnter()
{
if (btnCancel.Focused || btnOK.Focused) return;
btnOK_Click(null, null);
}

View File

@ -1,64 +1,4 @@
<?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.
-->
<root>
<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">

View File

@ -115,6 +115,7 @@
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;
@ -137,6 +138,7 @@
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.RectSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89)))));
this.btnCancel.ShowFocusColor = true;
this.btnCancel.Size = new System.Drawing.Size(86, 29);
this.btnCancel.Style = Sunny.UI.UIStyle.Red;
this.btnCancel.StyleCustomMode = true;
@ -217,6 +219,7 @@
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";

View File

@ -35,7 +35,10 @@ namespace Sunny.UI
btnCancel.Text = UILocalize.Cancel;
}
public bool IsOK { get; private set; }
public bool IsOK
{
get; private set;
}
private bool _showCancel = true;

View File

@ -30,6 +30,7 @@
{
this.label = new Sunny.UI.UILabel();
this.ComboBox = new Sunny.UI.UIComboBox();
this.pnlBtm.SuspendLayout();
this.SuspendLayout();
//
// pnlBtm
@ -38,11 +39,19 @@
this.pnlBtm.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
this.pnlBtm.Size = new System.Drawing.Size(471, 55);
//
// btnCancel
//
this.btnCancel.Location = new System.Drawing.Point(343, 12);
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(228, 12);
//
// label
//
this.label.AutoSize = true;
this.label.BackColor = System.Drawing.Color.Transparent;
this.label.Font = new System.Drawing.Font("微软雅黑", 12F);
this.label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label.Location = new System.Drawing.Point(29, 57);
this.label.Name = "label";
this.label.Size = new System.Drawing.Size(186, 21);
@ -52,30 +61,32 @@
//
// ComboBox
//
this.ComboBox.DataSource = null;
this.ComboBox.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList;
this.ComboBox.FillColor = System.Drawing.Color.White;
this.ComboBox.Font = new System.Drawing.Font("微软雅黑", 12F);
this.ComboBox.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.ComboBox.Location = new System.Drawing.Point(29, 92);
this.ComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.ComboBox.MinimumSize = new System.Drawing.Size(63, 0);
this.ComboBox.Name = "ComboBox";
this.ComboBox.Padding = new System.Windows.Forms.Padding(0, 0, 30, 0);
this.ComboBox.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
this.ComboBox.Size = new System.Drawing.Size(415, 29);
this.ComboBox.TabIndex = 4;
this.ComboBox.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
//
// UISelectForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(473, 182);
this.Controls.Add(this.label);
this.Controls.Add(this.ComboBox);
this.EscClose = true;
this.Name = "UISelectForm";
this.Text = "选择";
this.Controls.SetChildIndex(this.ComboBox, 0);
this.Controls.SetChildIndex(this.pnlBtm, 0);
this.Controls.SetChildIndex(this.label, 0);
this.pnlBtm.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -1,64 +1,4 @@
<?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.
-->
<root>
<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">