+ UIMessageForm2: 新增了一种风格的消息提示框

This commit is contained in:
Sunny 2024-05-16 16:03:00 +08:00
parent 1c0d65d816
commit 784e2904ec
16 changed files with 950 additions and 277 deletions

View File

@ -255,14 +255,14 @@ namespace Sunny.UI
} }
} }
private int _symbol = FontAwesomeIcons.fa_check; private int _symbol = 361452;
/// <summary> /// <summary>
/// 字体图标 /// 字体图标
/// </summary> /// </summary>
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[Editor("Sunny.UI.UIImagePropertyEditor, " + AssemblyRefEx.SystemDesign, typeof(UITypeEditor))] [Editor("Sunny.UI.UIImagePropertyEditor, " + AssemblyRefEx.SystemDesign, typeof(UITypeEditor))]
[DefaultValue(61452)] [DefaultValue(361452)]
[Description("字体图标"), Category("SunnyUI")] [Description("字体图标"), Category("SunnyUI")]
public int Symbol public int Symbol
{ {

View File

@ -162,14 +162,14 @@ namespace Sunny.UI
} }
} }
private int _symbol = FontAwesomeIcons.fa_check; private int _symbol = 361452;
/// <summary> /// <summary>
/// 字体图标 /// 字体图标
/// </summary> /// </summary>
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[Editor("Sunny.UI.UIImagePropertyEditor, " + AssemblyRefEx.SystemDesign, typeof(UITypeEditor))] [Editor("Sunny.UI.UIImagePropertyEditor, " + AssemblyRefEx.SystemDesign, typeof(UITypeEditor))]
[DefaultValue(61452)] [DefaultValue(361452)]
[Description("字体图标"), Category("SunnyUI")] [Description("字体图标"), Category("SunnyUI")]
public int Symbol public int Symbol
{ {

View File

@ -33,148 +33,151 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = 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 dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
this.Grid = new Sunny.UI.UIDataGridView(); Grid = new UIDataGridView();
this.Panel = new Sunny.UI.UIPanel(); Panel = new UIPanel();
this.uiSymbolButton4 = new Sunny.UI.UISymbolButton(); uiSymbolButton4 = new UISymbolButton();
this.uiSymbolButton3 = new Sunny.UI.UISymbolButton(); uiSymbolButton3 = new UISymbolButton();
this.uiSymbolButton2 = new Sunny.UI.UISymbolButton(); uiSymbolButton2 = new UISymbolButton();
this.uiSymbolButton1 = new Sunny.UI.UISymbolButton(); uiSymbolButton1 = new UISymbolButton();
((System.ComponentModel.ISupportInitialize)(this.Grid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)Grid).BeginInit();
this.Panel.SuspendLayout(); Panel.SuspendLayout();
this.SuspendLayout(); SuspendLayout();
// //
// Grid // Grid
// //
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(235, 243, 255);
this.Grid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; Grid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.Grid.BackgroundColor = System.Drawing.Color.White; Grid.BackgroundColor = System.Drawing.Color.White;
this.Grid.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; Grid.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(80, 160, 255);
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(80, 160, 255);
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.Grid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; Grid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.Grid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; Grid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(200)))), ((int)(((byte)(255))))); dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(155, 200, 255);
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.Grid.DefaultCellStyle = dataGridViewCellStyle3; Grid.DefaultCellStyle = dataGridViewCellStyle3;
this.Grid.Dock = System.Windows.Forms.DockStyle.Fill; Grid.Dock = System.Windows.Forms.DockStyle.Fill;
this.Grid.EnableHeadersVisualStyles = false; Grid.EnableHeadersVisualStyles = false;
this.Grid.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); Grid.Font = new System.Drawing.Font("宋体", 12F);
this.Grid.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); Grid.GridColor = System.Drawing.Color.FromArgb(80, 160, 255);
this.Grid.Location = new System.Drawing.Point(0, 35); Grid.Location = new System.Drawing.Point(0, 35);
this.Grid.Name = "Grid"; Grid.Name = "Grid";
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(235, 243, 255);
dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(80, 160, 255);
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.White; dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.Grid.RowHeadersDefaultCellStyle = dataGridViewCellStyle4; Grid.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; dataGridViewCellStyle5.BackColor = System.Drawing.Color.White;
this.Grid.RowsDefaultCellStyle = dataGridViewCellStyle5; Grid.RowsDefaultCellStyle = dataGridViewCellStyle5;
this.Grid.RowTemplate.Height = 29; Grid.RowTemplate.Height = 29;
this.Grid.SelectedIndex = -1; Grid.SelectedIndex = -1;
this.Grid.Size = new System.Drawing.Size(1034, 511); Grid.Size = new System.Drawing.Size(1034, 511);
this.Grid.TabIndex = 0; Grid.StripeOddColor = System.Drawing.Color.FromArgb(235, 243, 255);
Grid.TabIndex = 0;
// //
// Panel // Panel
// //
this.Panel.Controls.Add(this.uiSymbolButton4); Panel.Controls.Add(uiSymbolButton4);
this.Panel.Controls.Add(this.uiSymbolButton3); Panel.Controls.Add(uiSymbolButton3);
this.Panel.Controls.Add(this.uiSymbolButton2); Panel.Controls.Add(uiSymbolButton2);
this.Panel.Controls.Add(this.uiSymbolButton1); Panel.Controls.Add(uiSymbolButton1);
this.Panel.Dock = System.Windows.Forms.DockStyle.Bottom; Panel.Dock = System.Windows.Forms.DockStyle.Bottom;
this.Panel.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); Panel.Font = new System.Drawing.Font("宋体", 12F);
this.Panel.Location = new System.Drawing.Point(0, 546); Panel.Location = new System.Drawing.Point(0, 546);
this.Panel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); Panel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Panel.MinimumSize = new System.Drawing.Size(1, 1); Panel.MinimumSize = new System.Drawing.Size(1, 1);
this.Panel.Name = "Panel"; Panel.Name = "Panel";
this.Panel.RadiusSides = Sunny.UI.UICornerRadiusSides.None; Panel.RadiusSides = UICornerRadiusSides.None;
this.Panel.RectSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)(((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) Panel.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom;
| System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); Panel.Size = new System.Drawing.Size(1034, 55);
this.Panel.Size = new System.Drawing.Size(1034, 55); Panel.TabIndex = 1;
this.Panel.TabIndex = 1; Panel.Text = null;
this.Panel.Text = null; Panel.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
this.Panel.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
// //
// uiSymbolButton4 // uiSymbolButton4
// //
this.uiSymbolButton4.Cursor = System.Windows.Forms.Cursors.Hand; uiSymbolButton4.Cursor = System.Windows.Forms.Cursors.Hand;
this.uiSymbolButton4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); uiSymbolButton4.Font = new System.Drawing.Font("宋体", 12F);
this.uiSymbolButton4.Location = new System.Drawing.Point(345, 10); uiSymbolButton4.Location = new System.Drawing.Point(345, 10);
this.uiSymbolButton4.MinimumSize = new System.Drawing.Size(1, 1); uiSymbolButton4.MinimumSize = new System.Drawing.Size(1, 1);
this.uiSymbolButton4.Name = "uiSymbolButton4"; uiSymbolButton4.Name = "uiSymbolButton4";
this.uiSymbolButton4.ShowFocusColor = true; uiSymbolButton4.ShowFocusColor = true;
this.uiSymbolButton4.Size = new System.Drawing.Size(100, 35); uiSymbolButton4.Size = new System.Drawing.Size(100, 35);
this.uiSymbolButton4.Symbol = 61639; uiSymbolButton4.Symbol = 361639;
this.uiSymbolButton4.TabIndex = 3; uiSymbolButton4.TabIndex = 3;
this.uiSymbolButton4.Text = "导出"; uiSymbolButton4.Text = "导出";
this.uiSymbolButton4.Visible = false; uiSymbolButton4.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
uiSymbolButton4.Visible = false;
// //
// uiSymbolButton3 // uiSymbolButton3
// //
this.uiSymbolButton3.Cursor = System.Windows.Forms.Cursors.Hand; uiSymbolButton3.Cursor = System.Windows.Forms.Cursors.Hand;
this.uiSymbolButton3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); uiSymbolButton3.Font = new System.Drawing.Font("宋体", 12F);
this.uiSymbolButton3.Location = new System.Drawing.Point(235, 10); uiSymbolButton3.Location = new System.Drawing.Point(235, 10);
this.uiSymbolButton3.MinimumSize = new System.Drawing.Size(1, 1); uiSymbolButton3.MinimumSize = new System.Drawing.Size(1, 1);
this.uiSymbolButton3.Name = "uiSymbolButton3"; uiSymbolButton3.Name = "uiSymbolButton3";
this.uiSymbolButton3.ShowFocusColor = true; uiSymbolButton3.ShowFocusColor = true;
this.uiSymbolButton3.Size = new System.Drawing.Size(100, 35); uiSymbolButton3.Size = new System.Drawing.Size(100, 35);
this.uiSymbolButton3.Symbol = 361544; uiSymbolButton3.Symbol = 361544;
this.uiSymbolButton3.TabIndex = 2; uiSymbolButton3.TabIndex = 2;
this.uiSymbolButton3.Text = "删除"; uiSymbolButton3.Text = "删除";
uiSymbolButton3.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
// //
// uiSymbolButton2 // uiSymbolButton2
// //
this.uiSymbolButton2.Cursor = System.Windows.Forms.Cursors.Hand; uiSymbolButton2.Cursor = System.Windows.Forms.Cursors.Hand;
this.uiSymbolButton2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); uiSymbolButton2.Font = new System.Drawing.Font("宋体", 12F);
this.uiSymbolButton2.Location = new System.Drawing.Point(125, 10); uiSymbolButton2.Location = new System.Drawing.Point(125, 10);
this.uiSymbolButton2.MinimumSize = new System.Drawing.Size(1, 1); uiSymbolButton2.MinimumSize = new System.Drawing.Size(1, 1);
this.uiSymbolButton2.Name = "uiSymbolButton2"; uiSymbolButton2.Name = "uiSymbolButton2";
this.uiSymbolButton2.ShowFocusColor = true; uiSymbolButton2.ShowFocusColor = true;
this.uiSymbolButton2.Size = new System.Drawing.Size(100, 35); uiSymbolButton2.Size = new System.Drawing.Size(100, 35);
this.uiSymbolButton2.Symbol = 61508; uiSymbolButton2.Symbol = 361508;
this.uiSymbolButton2.TabIndex = 1; uiSymbolButton2.TabIndex = 1;
this.uiSymbolButton2.Text = "编辑"; uiSymbolButton2.Text = "编辑";
uiSymbolButton2.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
// //
// uiSymbolButton1 // uiSymbolButton1
// //
this.uiSymbolButton1.Cursor = System.Windows.Forms.Cursors.Hand; uiSymbolButton1.Cursor = System.Windows.Forms.Cursors.Hand;
this.uiSymbolButton1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); uiSymbolButton1.Font = new System.Drawing.Font("宋体", 12F);
this.uiSymbolButton1.Location = new System.Drawing.Point(15, 10); uiSymbolButton1.Location = new System.Drawing.Point(15, 10);
this.uiSymbolButton1.MinimumSize = new System.Drawing.Size(1, 1); uiSymbolButton1.MinimumSize = new System.Drawing.Size(1, 1);
this.uiSymbolButton1.Name = "uiSymbolButton1"; uiSymbolButton1.Name = "uiSymbolButton1";
this.uiSymbolButton1.ShowFocusColor = true; uiSymbolButton1.ShowFocusColor = true;
this.uiSymbolButton1.Size = new System.Drawing.Size(100, 35); uiSymbolButton1.Size = new System.Drawing.Size(100, 35);
this.uiSymbolButton1.Symbol = 361543; uiSymbolButton1.Symbol = 361543;
this.uiSymbolButton1.TabIndex = 0; uiSymbolButton1.TabIndex = 0;
this.uiSymbolButton1.Text = "增加"; uiSymbolButton1.Text = "增加";
uiSymbolButton1.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
// //
// UIDataGridViewForm // UIDataGridViewForm
// //
this.AllowShowTitle = true; AllowShowTitle = true;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1034, 601); ClientSize = new System.Drawing.Size(1034, 601);
this.Controls.Add(this.Grid); Controls.Add(Grid);
this.Controls.Add(this.Panel); Controls.Add(Panel);
this.Name = "UIDataGridViewForm"; Name = "UIDataGridViewForm";
this.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0); Padding = new System.Windows.Forms.Padding(0, 35, 0, 0);
this.ShowTitle = true; ShowTitle = true;
this.Text = "FDataGridView"; Text = "FDataGridView";
((System.ComponentModel.ISupportInitialize)(this.Grid)).EndInit(); ((System.ComponentModel.ISupportInitialize)Grid).EndInit();
this.Panel.ResumeLayout(false); Panel.ResumeLayout(false);
this.ResumeLayout(false); ResumeLayout(false);
} }
#endregion #endregion

View File

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

View File

@ -40,7 +40,7 @@
pnlBtm.Controls.Add(btnCancel); pnlBtm.Controls.Add(btnCancel);
pnlBtm.Controls.Add(btnOK); pnlBtm.Controls.Add(btnOK);
pnlBtm.Dock = System.Windows.Forms.DockStyle.Bottom; pnlBtm.Dock = System.Windows.Forms.DockStyle.Bottom;
pnlBtm.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); pnlBtm.Font = new System.Drawing.Font("宋体", 12F);
pnlBtm.Location = new System.Drawing.Point(1, 392); pnlBtm.Location = new System.Drawing.Point(1, 392);
pnlBtm.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); pnlBtm.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
pnlBtm.MinimumSize = new System.Drawing.Size(1, 1); pnlBtm.MinimumSize = new System.Drawing.Size(1, 1);
@ -56,7 +56,7 @@
// //
btnCancel.BackColor = System.Drawing.Color.Transparent; btnCancel.BackColor = System.Drawing.Color.Transparent;
btnCancel.Cursor = System.Windows.Forms.Cursors.Hand; btnCancel.Cursor = System.Windows.Forms.Cursors.Hand;
btnCancel.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); btnCancel.Font = new System.Drawing.Font("宋体", 12F);
btnCancel.Location = new System.Drawing.Point(470, 12); btnCancel.Location = new System.Drawing.Point(470, 12);
btnCancel.Margin = new System.Windows.Forms.Padding(0); btnCancel.Margin = new System.Windows.Forms.Padding(0);
btnCancel.MinimumSize = new System.Drawing.Size(1, 1); btnCancel.MinimumSize = new System.Drawing.Size(1, 1);
@ -64,10 +64,9 @@
btnCancel.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0); btnCancel.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
btnCancel.ShowFocusColor = true; btnCancel.ShowFocusColor = true;
btnCancel.Size = new System.Drawing.Size(100, 35); btnCancel.Size = new System.Drawing.Size(100, 35);
btnCancel.Symbol = 61453; btnCancel.Symbol = 361453;
btnCancel.TabIndex = 1; btnCancel.TabIndex = 1;
btnCancel.Text = "取消"; btnCancel.Text = "取消";
btnCancel.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
btnCancel.TipsText = null; btnCancel.TipsText = null;
btnCancel.Click += btnCancel_Click; btnCancel.Click += btnCancel_Click;
// //
@ -75,7 +74,7 @@
// //
btnOK.BackColor = System.Drawing.Color.Transparent; btnOK.BackColor = System.Drawing.Color.Transparent;
btnOK.Cursor = System.Windows.Forms.Cursors.Hand; btnOK.Cursor = System.Windows.Forms.Cursors.Hand;
btnOK.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); btnOK.Font = new System.Drawing.Font("宋体", 12F);
btnOK.Location = new System.Drawing.Point(355, 12); btnOK.Location = new System.Drawing.Point(355, 12);
btnOK.Margin = new System.Windows.Forms.Padding(0); btnOK.Margin = new System.Windows.Forms.Padding(0);
btnOK.MinimumSize = new System.Drawing.Size(1, 1); btnOK.MinimumSize = new System.Drawing.Size(1, 1);
@ -83,9 +82,9 @@
btnOK.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0); btnOK.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
btnOK.ShowFocusColor = true; btnOK.ShowFocusColor = true;
btnOK.Size = new System.Drawing.Size(100, 35); btnOK.Size = new System.Drawing.Size(100, 35);
btnOK.Symbol = 361452;
btnOK.TabIndex = 0; btnOK.TabIndex = 0;
btnOK.Text = "确定"; btnOK.Text = "确定";
btnOK.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
btnOK.TipsText = null; btnOK.TipsText = null;
btnOK.Click += btnOK_Click; btnOK.Click += btnOK_Click;
// //

View File

@ -374,7 +374,7 @@ namespace Sunny.UI
} }
else else
{ {
ShowMaxOrNormal(); if (FormBorderStyle == FormBorderStyle.Sizable) ShowMaxOrNormal();
} }
} }

View File

@ -134,10 +134,28 @@ namespace Sunny.UI
/// <param name="delay">消息停留时长(ms)。默认1秒</param> /// <param name="delay">消息停留时长(ms)。默认1秒</param>
/// <returns>结果</returns> /// <returns>结果</returns>
public static bool ShowMessageDialog(string message, string title, bool showCancelButton, UIStyle style, bool showMask = false, bool topMost = true, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok, int delay = 0) public static bool ShowMessageDialog(string message, string title, bool showCancelButton, UIStyle style, bool showMask = false, bool topMost = true, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok, int delay = 0)
{
return ShowMessageDialog(null, message, title, showCancelButton, style, showMask, topMost, defaultButton, delay);
}
/// <summary>
/// 确认信息提示框
/// </summary>
/// <param name="title">标题</param>
/// <param name="message">信息</param>
/// <param name="showCancelButton">显示取消按钮</param>
/// <param name="style">主题</param>
/// <param name="showMask">显示遮罩层</param>
/// <param name="topMost">置顶</param>
/// <param name="defaultButton">默认按钮</param>
/// <param name="delay">消息停留时长(ms)。默认1秒</param>
/// <returns>结果</returns>
public static bool ShowMessageDialog(Form form, string message, string title, bool showCancelButton, UIStyle style, bool showMask = false, bool topMost = true, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok, int delay = 0)
{ {
Point pt = SystemEx.GetCursorPos(); Point pt = SystemEx.GetCursorPos();
Rectangle screen = Screen.GetBounds(pt); Rectangle screen = Screen.GetBounds(pt);
using UIMessageForm frm = new UIMessageForm(); using UIMessageForm frm = new UIMessageForm();
if (frm != null) frm.Owner = form;
frm.DefaultButton = showCancelButton ? defaultButton : UIMessageDialogButtons.Ok; frm.DefaultButton = showCancelButton ? defaultButton : UIMessageDialogButtons.Ok;
//frm.StartPosition = FormStartPosition.CenterScreen; //frm.StartPosition = FormStartPosition.CenterScreen;
frm.StartPosition = FormStartPosition.Manual; frm.StartPosition = FormStartPosition.Manual;
@ -156,6 +174,33 @@ namespace Sunny.UI
return frm.IsOK; return frm.IsOK;
} }
/// <summary>
/// 确认信息提示框
/// </summary>
/// <param name="title">标题</param>
/// <param name="message">信息</param>
/// <param name="defaultButton">默认按钮</param>
/// <param name="defaultButton">默认按钮</param>
/// <param name="delay">消息停留时长(ms)。默认1秒</param>
/// <returns>结果</returns>
public static bool ShowMessageDialog2(Form form, string title, string message, UINotifierType noteType, bool showMask = false, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Cancel, int delay = 0)
{
Point pt = SystemEx.GetCursorPos();
Rectangle screen = Screen.GetBounds(pt);
using UIMessageForm2 frm = new UIMessageForm2(title, message, noteType, defaultButton);
if (frm != null) frm.Owner = form;
frm.StartPosition = FormStartPosition.Manual;
frm.Left = screen.Left + screen.Width / 2 - frm.Width / 2;
frm.Top = screen.Top + screen.Height / 2 - frm.Height / 2;
frm.ShowInTaskbar = false;
frm.TopMost = true;
frm.Delay = delay;
if (showMask)
return frm.ShowDialogWithMask() == DialogResult.OK;
else
return frm.ShowDialog() == DialogResult.OK;
}
} }
public enum UIMessageDialogButtons public enum UIMessageDialogButtons
@ -500,7 +545,7 @@ namespace Sunny.UI
/// <param name="showMask">显示遮罩层</param> /// <param name="showMask">显示遮罩层</param>
public static void ShowSuccessDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Green, bool showMask = false, int delay = 0) public static void ShowSuccessDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Green, bool showMask = false, int delay = 0)
{ {
UIMessageBox.ShowMessageDialog(msg, title, false, style, showMask, true, UIMessageDialogButtons.Ok, delay); UIMessageBox.ShowMessageDialog(form, msg, title, false, style, showMask, true, UIMessageDialogButtons.Ok, delay);
} }
/// <summary> /// <summary>
@ -522,7 +567,7 @@ namespace Sunny.UI
/// <param name="showMask">显示遮罩层</param> /// <param name="showMask">显示遮罩层</param>
public static void ShowInfoDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Gray, bool showMask = false, int delay = 0) public static void ShowInfoDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Gray, bool showMask = false, int delay = 0)
{ {
UIMessageBox.ShowMessageDialog(msg, title, false, style, showMask, true, UIMessageDialogButtons.Ok, delay); UIMessageBox.ShowMessageDialog(form, msg, title, false, style, showMask, true, UIMessageDialogButtons.Ok, delay);
} }
/// <summary> /// <summary>
@ -544,7 +589,7 @@ namespace Sunny.UI
/// <param name="showMask">显示遮罩层</param> /// <param name="showMask">显示遮罩层</param>
public static void ShowWarningDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Orange, bool showMask = false, int delay = 0) public static void ShowWarningDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Orange, bool showMask = false, int delay = 0)
{ {
UIMessageBox.ShowMessageDialog(msg, title, false, style, showMask, true, UIMessageDialogButtons.Ok, delay); UIMessageBox.ShowMessageDialog(form, msg, title, false, style, showMask, true, UIMessageDialogButtons.Ok, delay);
} }
/// <summary> /// <summary>
@ -566,7 +611,7 @@ namespace Sunny.UI
/// <param name="showMask">显示遮罩层</param> /// <param name="showMask">显示遮罩层</param>
public static void ShowErrorDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Red, bool showMask = false, int delay = 0) public static void ShowErrorDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Red, bool showMask = false, int delay = 0)
{ {
UIMessageBox.ShowMessageDialog(msg, title, false, style, showMask, true, UIMessageDialogButtons.Ok, delay); UIMessageBox.ShowMessageDialog(form, msg, title, false, style, showMask, true, UIMessageDialogButtons.Ok, delay);
} }
/// <summary> /// <summary>
@ -577,7 +622,7 @@ namespace Sunny.UI
/// <returns>结果</returns> /// <returns>结果</returns>
public static bool ShowAskDialog(this Form form, string msg, bool showMask = false, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok) public static bool ShowAskDialog(this Form form, string msg, bool showMask = false, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok)
{ {
return UIMessageBox.ShowMessageDialog(msg, UILocalize.AskTitle, true, UIStyle.Blue, showMask, true, defaultButton); return UIMessageBox.ShowMessageDialog(form, msg, UILocalize.AskTitle, true, UIStyle.Blue, showMask, true, defaultButton);
} }
/// <summary> /// <summary>
@ -590,9 +635,124 @@ namespace Sunny.UI
/// <returns>结果</returns> /// <returns>结果</returns>
public static bool ShowAskDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Blue, bool showMask = false, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok) public static bool ShowAskDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Blue, bool showMask = false, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok)
{ {
return UIMessageBox.ShowMessageDialog(msg, title, true, style, showMask, true, defaultButton); return UIMessageBox.ShowMessageDialog(form, msg, title, true, style, showMask, true, defaultButton);
} }
//---------------
/// <summary>
/// 正确信息提示框
/// </summary>
/// <param name="msg">信息</param>
/// <param name="showMask">显示遮罩层</param>
public static void ShowSuccessDialog2(this Form form, string msg, bool showMask = false, int delay = 0)
{
form.ShowSuccessDialog2(UILocalize.SuccessTitle, msg, showMask, delay);
}
/// <summary>
/// 正确信息提示框
/// </summary>
/// <param name="title">标题</param>
/// <param name="msg">信息</param>
/// <param name="style">主题</param>
/// <param name="showMask">显示遮罩层</param>
public static void ShowSuccessDialog2(this Form form, string title, string msg, bool showMask = false, int delay = 0)
{
UIMessageBox.ShowMessageDialog2(form, title, msg, UINotifierType.OK, showMask, UIMessageDialogButtons.Ok, delay);
}
/// <summary>
/// 信息提示框
/// </summary>
/// <param name="msg">信息</param>
/// <param name="showMask">显示遮罩层</param>
public static void ShowInfoDialog2(this Form form, string msg, bool showMask = false, int delay = 0)
{
form.ShowInfoDialog2(UILocalize.InfoTitle, msg, showMask, delay);
}
/// <summary>
/// 信息提示框
/// </summary>
/// <param name="title">标题</param>
/// <param name="msg">信息</param>
/// <param name="style">主题</param>
/// <param name="showMask">显示遮罩层</param>
public static void ShowInfoDialog2(this Form form, string title, string msg, bool showMask = false, int delay = 0)
{
UIMessageBox.ShowMessageDialog2(form, title, msg, UINotifierType.INFO, showMask, UIMessageDialogButtons.Ok, delay);
}
/// <summary>
/// 警告信息提示框
/// </summary>
/// <param name="msg">信息</param>
/// <param name="showMask">显示遮罩层</param>
public static void ShowWarningDialog2(this Form form, string msg, bool showMask = false, int delay = 0)
{
form.ShowWarningDialog2(UILocalize.WarningTitle, msg, showMask, delay);
}
/// <summary>
/// 警告信息提示框
/// </summary>
/// <param name="title">标题</param>
/// <param name="msg">信息</param>
/// <param name="style">主题</param>
/// <param name="showMask">显示遮罩层</param>
public static void ShowWarningDialog2(this Form form, string title, string msg, bool showMask = false, int delay = 0)
{
UIMessageBox.ShowMessageDialog2(form, title, msg, UINotifierType.WARNING, showMask, UIMessageDialogButtons.Ok, delay);
}
/// <summary>
/// 错误信息提示框
/// </summary>
/// <param name="msg">信息</param>
/// <param name="showMask">显示遮罩层</param>
public static void ShowErrorDialog2(this Form form, string msg, bool showMask = false, int delay = 0)
{
form.ShowErrorDialog2(UILocalize.ErrorTitle, msg, showMask, delay);
}
/// <summary>
/// 错误信息提示框
/// </summary>
/// <param name="title">标题</param>
/// <param name="msg">信息</param>
/// <param name="style">主题</param>
/// <param name="showMask">显示遮罩层</param>
public static void ShowErrorDialog2(this Form form, string title, string msg, bool showMask = false, int delay = 0)
{
UIMessageBox.ShowMessageDialog2(form, title, msg, UINotifierType.ERROR, showMask, UIMessageDialogButtons.Ok, delay);
}
/// <summary>
/// 确认信息提示框
/// </summary>
/// <param name="msg">信息</param>
/// <param name="showMask">显示遮罩层</param>
/// <returns>结果</returns>
public static bool ShowAskDialog2(this Form form, string msg, bool showMask = false, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Cancel)
{
return UIMessageBox.ShowMessageDialog2(form, UILocalize.AskTitle, msg, UINotifierType.Ask, showMask, defaultButton);
}
/// <summary>
/// 确认信息提示框
/// </summary>
/// <param name="title">标题</param>
/// <param name="msg">信息</param>
/// <param name="style">主题</param>
/// <param name="showMask">显示遮罩层</param>
/// <returns>结果</returns>
public static bool ShowAskDialog2(this Form form, string title, string msg, bool showMask = false, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Cancel)
{
return UIMessageBox.ShowMessageDialog2(form, title, msg, UINotifierType.Ask, showMask, defaultButton);
}
//---------------
/// <summary> /// <summary>
/// 显示消息 /// 显示消息
/// </summary> /// </summary>

View File

@ -43,16 +43,18 @@
// btnCancel // btnCancel
// //
btnCancel.Location = new System.Drawing.Point(343, 4); btnCancel.Location = new System.Drawing.Point(343, 4);
btnCancel.Symbol = 361453;
// //
// btnOK // btnOK
// //
btnOK.Location = new System.Drawing.Point(228, 4); btnOK.Location = new System.Drawing.Point(228, 4);
btnOK.Symbol = 361452;
// //
// label // label
// //
label.AutoSize = true; label.AutoSize = true;
label.BackColor = System.Drawing.Color.Transparent; label.BackColor = System.Drawing.Color.Transparent;
label.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); label.Font = new System.Drawing.Font("宋体", 12F);
label.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48); label.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
label.Location = new System.Drawing.Point(28, 57); label.Location = new System.Drawing.Point(28, 57);
label.Name = "label"; label.Name = "label";
@ -64,7 +66,7 @@
// edit // edit
// //
edit.Cursor = System.Windows.Forms.Cursors.IBeam; edit.Cursor = System.Windows.Forms.Cursors.IBeam;
edit.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); edit.Font = new System.Drawing.Font("宋体", 12F);
edit.Location = new System.Drawing.Point(29, 92); edit.Location = new System.Drawing.Point(29, 92);
edit.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); edit.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
edit.MinimumSize = new System.Drawing.Size(1, 1); edit.MinimumSize = new System.Drawing.Size(1, 1);
@ -85,7 +87,6 @@
Controls.Add(label); Controls.Add(label);
Name = "UIInputForm"; Name = "UIInputForm";
Padding = new System.Windows.Forms.Padding(0, 35, 0, 0); Padding = new System.Windows.Forms.Padding(0, 35, 0, 0);
ShowIcon = false;
Text = "输入"; Text = "输入";
ZoomScaleRect = new System.Drawing.Rectangle(15, 15, 473, 182); ZoomScaleRect = new System.Drawing.Rectangle(15, 15, 473, 182);
Shown += UIInputForm_Shown; Shown += UIInputForm_Shown;

View File

@ -43,7 +43,7 @@
// uiAvatar1 // uiAvatar1
// //
uiAvatar1.BackColor = System.Drawing.Color.Transparent; uiAvatar1.BackColor = System.Drawing.Color.Transparent;
uiAvatar1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); uiAvatar1.Font = new System.Drawing.Font("宋体", 12F);
uiAvatar1.Location = new System.Drawing.Point(65, 16); uiAvatar1.Location = new System.Drawing.Point(65, 16);
uiAvatar1.MinimumSize = new System.Drawing.Size(1, 1); uiAvatar1.MinimumSize = new System.Drawing.Size(1, 1);
uiAvatar1.Name = "uiAvatar1"; uiAvatar1.Name = "uiAvatar1";
@ -54,7 +54,7 @@
// uiLine1 // uiLine1
// //
uiLine1.BackColor = System.Drawing.Color.Transparent; uiLine1.BackColor = System.Drawing.Color.Transparent;
uiLine1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); uiLine1.Font = new System.Drawing.Font("宋体", 12F);
uiLine1.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48); uiLine1.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
uiLine1.Location = new System.Drawing.Point(4, 85); uiLine1.Location = new System.Drawing.Point(4, 85);
uiLine1.MinimumSize = new System.Drawing.Size(2, 2); uiLine1.MinimumSize = new System.Drawing.Size(2, 2);
@ -70,7 +70,7 @@
// //
edtUser.Cursor = System.Windows.Forms.Cursors.IBeam; edtUser.Cursor = System.Windows.Forms.Cursors.IBeam;
edtUser.EnterAsTab = true; edtUser.EnterAsTab = true;
edtUser.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); edtUser.Font = new System.Drawing.Font("宋体", 12F);
edtUser.Location = new System.Drawing.Point(4, 121); edtUser.Location = new System.Drawing.Point(4, 121);
edtUser.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); edtUser.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
edtUser.MinimumSize = new System.Drawing.Size(1, 1); edtUser.MinimumSize = new System.Drawing.Size(1, 1);
@ -78,7 +78,7 @@
edtUser.Padding = new System.Windows.Forms.Padding(5); edtUser.Padding = new System.Windows.Forms.Padding(5);
edtUser.ShowText = false; edtUser.ShowText = false;
edtUser.Size = new System.Drawing.Size(182, 29); edtUser.Size = new System.Drawing.Size(182, 29);
edtUser.Symbol = 61447; edtUser.Symbol = 361447;
edtUser.SymbolSize = 22; edtUser.SymbolSize = 22;
edtUser.TabIndex = 0; edtUser.TabIndex = 0;
edtUser.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; edtUser.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
@ -87,7 +87,7 @@
// edtPassword // edtPassword
// //
edtPassword.Cursor = System.Windows.Forms.Cursors.IBeam; edtPassword.Cursor = System.Windows.Forms.Cursors.IBeam;
edtPassword.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); edtPassword.Font = new System.Drawing.Font("宋体", 12F);
edtPassword.Location = new System.Drawing.Point(4, 162); edtPassword.Location = new System.Drawing.Point(4, 162);
edtPassword.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); edtPassword.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
edtPassword.MinimumSize = new System.Drawing.Size(1, 1); edtPassword.MinimumSize = new System.Drawing.Size(1, 1);
@ -96,7 +96,7 @@
edtPassword.PasswordChar = '*'; edtPassword.PasswordChar = '*';
edtPassword.ShowText = false; edtPassword.ShowText = false;
edtPassword.Size = new System.Drawing.Size(182, 29); edtPassword.Size = new System.Drawing.Size(182, 29);
edtPassword.Symbol = 61475; edtPassword.Symbol = 361475;
edtPassword.SymbolSize = 22; edtPassword.SymbolSize = 22;
edtPassword.TabIndex = 1; edtPassword.TabIndex = 1;
edtPassword.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; edtPassword.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
@ -106,15 +106,17 @@
// btnLogin // btnLogin
// //
btnLogin.Cursor = System.Windows.Forms.Cursors.Hand; btnLogin.Cursor = System.Windows.Forms.Cursors.Hand;
btnLogin.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); btnLogin.Font = new System.Drawing.Font("宋体", 12F);
btnLogin.Location = new System.Drawing.Point(4, 206); btnLogin.Location = new System.Drawing.Point(4, 206);
btnLogin.MinimumSize = new System.Drawing.Size(1, 1); btnLogin.MinimumSize = new System.Drawing.Size(1, 1);
btnLogin.Name = "btnLogin"; btnLogin.Name = "btnLogin";
btnLogin.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0); btnLogin.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
btnLogin.ShowFocusColor = true; btnLogin.ShowFocusColor = true;
btnLogin.Size = new System.Drawing.Size(86, 29); btnLogin.Size = new System.Drawing.Size(86, 29);
btnLogin.Symbol = 361452;
btnLogin.TabIndex = 2; btnLogin.TabIndex = 2;
btnLogin.Text = "登录"; btnLogin.Text = "登录";
btnLogin.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
btnLogin.Click += btnLogin_Click; btnLogin.Click += btnLogin_Click;
// //
// btnCancel // btnCancel
@ -125,7 +127,7 @@
btnCancel.FillHoverColor = System.Drawing.Color.FromArgb(235, 115, 115); btnCancel.FillHoverColor = System.Drawing.Color.FromArgb(235, 115, 115);
btnCancel.FillPressColor = System.Drawing.Color.FromArgb(184, 64, 64); btnCancel.FillPressColor = System.Drawing.Color.FromArgb(184, 64, 64);
btnCancel.FillSelectedColor = 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.Font = new System.Drawing.Font("宋体", 12F);
btnCancel.Location = new System.Drawing.Point(100, 206); btnCancel.Location = new System.Drawing.Point(100, 206);
btnCancel.MinimumSize = new System.Drawing.Size(1, 1); btnCancel.MinimumSize = new System.Drawing.Size(1, 1);
btnCancel.Name = "btnCancel"; btnCancel.Name = "btnCancel";
@ -138,15 +140,16 @@
btnCancel.Size = new System.Drawing.Size(86, 29); btnCancel.Size = new System.Drawing.Size(86, 29);
btnCancel.Style = UIStyle.Custom; btnCancel.Style = UIStyle.Custom;
btnCancel.StyleCustomMode = true; btnCancel.StyleCustomMode = true;
btnCancel.Symbol = 61453; btnCancel.Symbol = 361453;
btnCancel.TabIndex = 3; btnCancel.TabIndex = 3;
btnCancel.Text = "取消"; btnCancel.Text = "取消";
btnCancel.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
btnCancel.Click += btnCancel_Click; btnCancel.Click += btnCancel_Click;
// //
// lblTitle // lblTitle
// //
lblTitle.BackColor = System.Drawing.Color.Transparent; lblTitle.BackColor = System.Drawing.Color.Transparent;
lblTitle.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); lblTitle.Font = new System.Drawing.Font("宋体", 15.75F);
lblTitle.ForeColor = System.Drawing.Color.Navy; lblTitle.ForeColor = System.Drawing.Color.Navy;
lblTitle.Location = new System.Drawing.Point(44, 35); lblTitle.Location = new System.Drawing.Point(44, 35);
lblTitle.Name = "lblTitle"; lblTitle.Name = "lblTitle";
@ -161,7 +164,7 @@
// //
lblSubText.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right; lblSubText.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
lblSubText.BackColor = System.Drawing.Color.Transparent; lblSubText.BackColor = System.Drawing.Color.Transparent;
lblSubText.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); lblSubText.Font = new System.Drawing.Font("宋体", 12F);
lblSubText.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48); lblSubText.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
lblSubText.Location = new System.Drawing.Point(426, 421); lblSubText.Location = new System.Drawing.Point(426, 421);
lblSubText.Name = "lblSubText"; lblSubText.Name = "lblSubText";
@ -179,7 +182,7 @@
uiPanel1.Controls.Add(btnCancel); uiPanel1.Controls.Add(btnCancel);
uiPanel1.Controls.Add(btnLogin); uiPanel1.Controls.Add(btnLogin);
uiPanel1.FillColor = System.Drawing.Color.White; uiPanel1.FillColor = System.Drawing.Color.White;
uiPanel1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); uiPanel1.Font = new System.Drawing.Font("宋体", 12F);
uiPanel1.Location = new System.Drawing.Point(433, 126); uiPanel1.Location = new System.Drawing.Point(433, 126);
uiPanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); uiPanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
uiPanel1.MinimumSize = new System.Drawing.Size(1, 1); uiPanel1.MinimumSize = new System.Drawing.Size(1, 1);

121
SunnyUI/Forms/UIMessageForm2.Designer.cs generated Normal file
View File

@ -0,0 +1,121 @@
namespace Sunny.UI
{
partial class UIMessageForm2
{
/// <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()
{
components = new System.ComponentModel.Container();
btnCancel = new UISymbolButton();
btnOK = new UISymbolButton();
label1 = new System.Windows.Forms.Label();
timer1 = new System.Windows.Forms.Timer(components);
SuspendLayout();
//
// btnCancel
//
btnCancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
btnCancel.BackColor = System.Drawing.Color.Transparent;
btnCancel.Cursor = System.Windows.Forms.Cursors.Hand;
btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
btnCancel.Font = new System.Drawing.Font("宋体", 12F);
btnCancel.Location = new System.Drawing.Point(378, 124);
btnCancel.Margin = new System.Windows.Forms.Padding(0);
btnCancel.MinimumSize = new System.Drawing.Size(1, 1);
btnCancel.Name = "btnCancel";
btnCancel.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
btnCancel.ShowFocusLine = true;
btnCancel.Size = new System.Drawing.Size(100, 35);
btnCancel.Symbol = 361453;
btnCancel.TabIndex = 10;
btnCancel.Text = "取消";
btnCancel.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
btnCancel.TipsText = null;
//
// btnOK
//
btnOK.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
btnOK.BackColor = System.Drawing.Color.Transparent;
btnOK.Cursor = System.Windows.Forms.Cursors.Hand;
btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
btnOK.Font = new System.Drawing.Font("宋体", 12F);
btnOK.Location = new System.Drawing.Point(263, 124);
btnOK.Margin = new System.Windows.Forms.Padding(0);
btnOK.MinimumSize = new System.Drawing.Size(1, 1);
btnOK.Name = "btnOK";
btnOK.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
btnOK.ShowFocusLine = true;
btnOK.Size = new System.Drawing.Size(100, 35);
btnOK.TabIndex = 9;
btnOK.Text = "确定";
btnOK.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
btnOK.TipsText = null;
//
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(119, 67);
label1.MaximumSize = new System.Drawing.Size(360, 0);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(359, 32);
label1.TabIndex = 12;
label1.Text = "提示消息提示消息提示消息提示消息提示消息提示消息提示消息";
//
// timer1
//
timer1.Interval = 1000;
timer1.Tick += timer1_Tick;
//
// UIMessageForm2
//
AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
ClientSize = new System.Drawing.Size(500, 180);
Controls.Add(label1);
Controls.Add(btnCancel);
Controls.Add(btnOK);
EscClose = true;
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
MaximizeBox = false;
MinimizeBox = false;
Name = "UIMessageForm2";
ShowIcon = false;
ShowInTaskbar = false;
StartPosition = System.Windows.Forms.FormStartPosition.Manual;
Text = "UIMessageForm2";
FormClosed += UIMessageForm2_FormClosed;
Shown += UIMessageForm2_Shown;
Paint += UIMessageForm2_Paint;
ResumeLayout(false);
PerformLayout();
}
#endregion
protected UISymbolButton btnCancel;
protected UISymbolButton btnOK;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Timer timer1;
}
}

View File

@ -0,0 +1,139 @@
/******************************************************************************
* SunnyUI
* CopyRight (C) 2012-2024 ShenYongHua().
* QQ群56829229 QQ17612584 EMailSunnyUI@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.
* 使
******************************************************************************
* : UIMessageForm2.cs
* : 2
* : V3.6
* : 2024-05-16
*
* 2024-05-16: V3.6.6
******************************************************************************/
using System.Drawing;
namespace Sunny.UI
{
public partial class UIMessageForm2 : UIForm2
{
public UIMessageForm2(string title, string message, UINotifierType noteType, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Cancel)
{
InitializeComponent();
Text = title;
label1.Text = message;
btnOK.Text = UILocalize.OK;
btnCancel.Text = UILocalize.Cancel;
foreColor = Color.Black;
Color[] colors = Color.White.GradientColors(UIStyles.ActiveStyleColor.PrimaryColor, 16);
Color = colors[2];
if (UIStyles.Style == UIStyle.DarkBlue || UIStyles.Style == UIStyle.Black)
{
Color[] colors1 = UIStyles.ActiveStyleColor.PrimaryColor.GradientColors(Color.Black, 16);
Color = colors1[2];
foreColor = Color.White;
}
if (noteType != UINotifierType.Ask)
{
btnOK.Left = btnCancel.Left;
btnCancel.Visible = false;
btnOK.TabIndex = 0;
}
else
{
if (defaultButton == UIMessageDialogButtons.Cancel)
btnCancel.TabIndex = 0;
else
btnOK.TabIndex = 0;
}
switch (noteType)
{
case UINotifierType.ERROR:
Symbol = 361527;
SymbolColor = UIStyles.Red.ButtonFillColor;
break;
case UINotifierType.INFO:
Symbol = 361530;
SymbolColor = UIStyles.ActiveStyleColor.ButtonFillColor;
break;
case UINotifierType.WARNING:
Symbol = 361553;
SymbolColor = UIStyles.Orange.ButtonFillColor;
break;
case UINotifierType.OK:
Symbol = 361528;
SymbolColor = UIStyles.Green.ButtonFillColor;
break;
case UINotifierType.Ask:
Symbol = 361529;
SymbolColor = UIStyles.ActiveStyleColor.ButtonFillColor;
break;
}
}
int Symbol = 361528;
Color SymbolColor = UIStyles.Green.ButtonFillColor;
private Color Color;
private Color foreColor;
public string Message { get; set; }
private void UIMessageForm2_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
int height = (190 - 48 + TitleHeight) + label1.Height;
if (height > 210) Height = height;
e.Graphics.FillRectangle(Color, new RectangleF(0, Height - 76, Width, 76));
e.Graphics.DrawFontImage(Symbol, 72, SymbolColor, new RectangleF(28, 64, 64, 64));
}
private void timer1_Tick(object sender, System.EventArgs e)
{
delay--;
Text = text + " [" + delay + "]";
if (delay <= 0) Close();
}
int delay = 0;
public int Delay
{
set
{
if (value > 0)
{
delay = value / 1000;
timer1.Start();
}
}
}
string text = "";
private void UIMessageForm2_Shown(object sender, System.EventArgs e)
{
if (delay <= 0) return;
if (text == "") text = Text;
Text = text + " [" + delay + "]";
}
private void UIMessageForm2_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e)
{
timer1.Stop();
}
}
}

View File

@ -0,0 +1,123 @@
<?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>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -176,28 +176,28 @@ namespace Sunny.UI
switch (noteType) switch (noteType)
{ {
case UINotifierType.ERROR: case UINotifierType.ERROR:
icon.Symbol = 61527; icon.Symbol = 361527;
icon.SymbolColor = UIStyles.Red.ButtonFillColor; icon.SymbolColor = UIStyles.Red.ButtonFillColor;
LeaveColor = UIStyles.Red.ButtonFillColor; LeaveColor = UIStyles.Red.ButtonFillColor;
HoverColor = UIStyles.Red.ButtonFillHoverColor; HoverColor = UIStyles.Red.ButtonFillHoverColor;
break; break;
case UINotifierType.INFO: case UINotifierType.INFO:
icon.Symbol = 61530; icon.Symbol = 361530;
icon.SymbolColor = UIStyles.Blue.ButtonFillColor; icon.SymbolColor = UIStyles.Blue.ButtonFillColor;
LeaveColor = UIStyles.Blue.ButtonFillColor; LeaveColor = UIStyles.Blue.ButtonFillColor;
HoverColor = UIStyles.Blue.ButtonFillHoverColor; HoverColor = UIStyles.Blue.ButtonFillHoverColor;
break; break;
case UINotifierType.WARNING: case UINotifierType.WARNING:
icon.Symbol = 61553; icon.Symbol = 361553;
icon.SymbolColor = UIStyles.Orange.ButtonFillColor; icon.SymbolColor = UIStyles.Orange.ButtonFillColor;
LeaveColor = UIStyles.Orange.ButtonFillColor; LeaveColor = UIStyles.Orange.ButtonFillColor;
HoverColor = UIStyles.Orange.ButtonFillHoverColor; HoverColor = UIStyles.Orange.ButtonFillHoverColor;
break; break;
case UINotifierType.OK: case UINotifierType.OK:
icon.Symbol = 61528; icon.Symbol = 361528;
icon.SymbolColor = UIStyles.Green.ButtonFillColor; icon.SymbolColor = UIStyles.Green.ButtonFillColor;
LeaveColor = UIStyles.Green.ButtonFillColor; LeaveColor = UIStyles.Green.ButtonFillColor;
HoverColor = UIStyles.Green.ButtonFillHoverColor; HoverColor = UIStyles.Green.ButtonFillHoverColor;
@ -802,6 +802,11 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 正确 /// 正确
/// </summary> /// </summary>
OK OK,
/// <summary>
/// 询问
/// </summary>
Ask
} }
} }

View File

@ -31,161 +31,159 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); components = new System.ComponentModel.Container();
this.noteContent = new System.Windows.Forms.Label(); noteContent = new System.Windows.Forms.Label();
this.noteDate = new System.Windows.Forms.Label(); noteDate = new System.Windows.Forms.Label();
this.buttonClose = new System.Windows.Forms.PictureBox(); buttonClose = new System.Windows.Forms.PictureBox();
this.buttonMenu = new System.Windows.Forms.PictureBox(); buttonMenu = new System.Windows.Forms.PictureBox();
this.menu = new System.Windows.Forms.ContextMenuStrip(this.components); menu = new System.Windows.Forms.ContextMenuStrip(components);
this.closeAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); closeAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.noteTitle = new System.Windows.Forms.Label(); noteTitle = new System.Windows.Forms.Label();
this.idLabel = new System.Windows.Forms.Label(); idLabel = new System.Windows.Forms.Label();
this.icon = new Sunny.UI.UISymbolLabel(); icon = new UISymbolLabel();
((System.ComponentModel.ISupportInitialize)(this.buttonClose)).BeginInit(); ((System.ComponentModel.ISupportInitialize)buttonClose).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.buttonMenu)).BeginInit(); ((System.ComponentModel.ISupportInitialize)buttonMenu).BeginInit();
this.menu.SuspendLayout(); menu.SuspendLayout();
this.SuspendLayout(); SuspendLayout();
// //
// noteContent // noteContent
// //
this.noteContent.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point); noteContent.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold);
this.noteContent.Image = global::Sunny.UI.Properties.Resources.notifier; noteContent.Image = Properties.Resources.notifier;
this.noteContent.Location = new System.Drawing.Point(43, 30); noteContent.Location = new System.Drawing.Point(43, 30);
this.noteContent.Name = "noteContent"; noteContent.Name = "noteContent";
this.noteContent.Size = new System.Drawing.Size(270, 73); noteContent.Size = new System.Drawing.Size(270, 73);
this.noteContent.TabIndex = 3; noteContent.TabIndex = 3;
this.noteContent.Text = "Description"; noteContent.Text = "Description";
this.noteContent.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; noteContent.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.noteContent.Click += new System.EventHandler(this.noteContent_Click); noteContent.Click += noteContent_Click;
// //
// noteDate // noteDate
// //
this.noteDate.AutoSize = true; noteDate.AutoSize = true;
this.noteDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 6F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); noteDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 6F);
this.noteDate.Image = global::Sunny.UI.Properties.Resources.notifier; noteDate.Image = Properties.Resources.notifier;
this.noteDate.Location = new System.Drawing.Point(11, 97); noteDate.Location = new System.Drawing.Point(11, 97);
this.noteDate.Name = "noteDate"; noteDate.Name = "noteDate";
this.noteDate.Size = new System.Drawing.Size(13, 9); noteDate.Size = new System.Drawing.Size(13, 9);
this.noteDate.TabIndex = 4; noteDate.TabIndex = 4;
this.noteDate.Text = "- -"; noteDate.Text = "- -";
// //
// buttonClose // buttonClose
// //
this.buttonClose.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(140)))), ((int)(((byte)(230))))); buttonClose.BackColor = System.Drawing.Color.FromArgb(90, 140, 230);
this.buttonClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; buttonClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.buttonClose.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point); buttonClose.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold);
this.buttonClose.ForeColor = System.Drawing.Color.White; buttonClose.ForeColor = System.Drawing.Color.White;
this.buttonClose.Location = new System.Drawing.Point(256, 2); buttonClose.Location = new System.Drawing.Point(256, 2);
this.buttonClose.Name = "buttonClose"; buttonClose.Name = "buttonClose";
this.buttonClose.Size = new System.Drawing.Size(66, 24); buttonClose.Size = new System.Drawing.Size(66, 24);
this.buttonClose.TabIndex = 1; buttonClose.TabIndex = 1;
this.buttonClose.TabStop = false; buttonClose.TabStop = false;
this.buttonClose.Text = " Calibrator"; buttonClose.Text = " Calibrator";
this.buttonClose.Click += new System.EventHandler(this.onCloseClick); buttonClose.Click += onCloseClick;
this.buttonClose.Paint += new System.Windows.Forms.PaintEventHandler(this.OnPaint); buttonClose.Paint += OnPaint;
// //
// buttonMenu // buttonMenu
// //
this.buttonMenu.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(140)))), ((int)(((byte)(230))))); buttonMenu.BackColor = System.Drawing.Color.FromArgb(90, 140, 230);
this.buttonMenu.BackgroundImage = global::Sunny.UI.Properties.Resources.menu; buttonMenu.BackgroundImage = Properties.Resources.menu;
this.buttonMenu.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; buttonMenu.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.buttonMenu.ContextMenuStrip = this.menu; buttonMenu.ContextMenuStrip = menu;
this.buttonMenu.Location = new System.Drawing.Point(275, 2); buttonMenu.Location = new System.Drawing.Point(275, 2);
this.buttonMenu.Name = "buttonMenu"; buttonMenu.Name = "buttonMenu";
this.buttonMenu.Size = new System.Drawing.Size(24, 24); buttonMenu.Size = new System.Drawing.Size(24, 24);
this.buttonMenu.TabIndex = 5; buttonMenu.TabIndex = 5;
this.buttonMenu.TabStop = false; buttonMenu.TabStop = false;
this.buttonMenu.Click += new System.EventHandler(this.onMenuClick); buttonMenu.Click += onMenuClick;
// //
// menu // menu
// //
this.menu.ImageScalingSize = new System.Drawing.Size(24, 24); menu.ImageScalingSize = new System.Drawing.Size(24, 24);
this.menu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { menu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { closeAllToolStripMenuItem });
this.closeAllToolStripMenuItem}); menu.Name = "menu";
this.menu.Name = "menu"; menu.Size = new System.Drawing.Size(120, 26);
this.menu.Size = new System.Drawing.Size(120, 26);
// //
// closeAllToolStripMenuItem // closeAllToolStripMenuItem
// //
this.closeAllToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); closeAllToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI", 8.25F);
this.closeAllToolStripMenuItem.Name = "closeAllToolStripMenuItem"; closeAllToolStripMenuItem.Name = "closeAllToolStripMenuItem";
this.closeAllToolStripMenuItem.Size = new System.Drawing.Size(119, 22); closeAllToolStripMenuItem.Size = new System.Drawing.Size(119, 22);
this.closeAllToolStripMenuItem.Text = "Close All"; closeAllToolStripMenuItem.Text = "Close All";
this.closeAllToolStripMenuItem.Click += new System.EventHandler(this.onMenuCloseAllClick); closeAllToolStripMenuItem.Click += onMenuCloseAllClick;
// //
// noteTitle // noteTitle
// //
this.noteTitle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(140)))), ((int)(((byte)(230))))); noteTitle.BackColor = System.Drawing.Color.FromArgb(90, 140, 230);
this.noteTitle.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point); noteTitle.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold);
this.noteTitle.ForeColor = System.Drawing.Color.White; noteTitle.ForeColor = System.Drawing.Color.White;
this.noteTitle.Location = new System.Drawing.Point(2, 2); noteTitle.Location = new System.Drawing.Point(2, 2);
this.noteTitle.Name = "noteTitle"; noteTitle.Name = "noteTitle";
this.noteTitle.Size = new System.Drawing.Size(270, 24); noteTitle.Size = new System.Drawing.Size(270, 24);
this.noteTitle.TabIndex = 6; noteTitle.TabIndex = 6;
this.noteTitle.Text = "Note"; noteTitle.Text = "Note";
this.noteTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; noteTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// idLabel // idLabel
// //
this.idLabel.AutoSize = true; idLabel.AutoSize = true;
this.idLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 6F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); idLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 6F);
this.idLabel.Image = global::Sunny.UI.Properties.Resources.notifier; idLabel.Image = Properties.Resources.notifier;
this.idLabel.Location = new System.Drawing.Point(296, 103); idLabel.Location = new System.Drawing.Point(296, 103);
this.idLabel.Name = "idLabel"; idLabel.Name = "idLabel";
this.idLabel.Size = new System.Drawing.Size(21, 9); idLabel.Size = new System.Drawing.Size(21, 9);
this.idLabel.TabIndex = 7; idLabel.TabIndex = 7;
this.idLabel.Text = "0000"; idLabel.Text = "0000";
this.idLabel.Visible = false; idLabel.Visible = false;
// //
// icon // icon
// //
this.icon.BackColor = System.Drawing.Color.White; icon.BackColor = System.Drawing.Color.White;
this.icon.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); icon.Font = new System.Drawing.Font("宋体", 12F);
this.icon.Location = new System.Drawing.Point(10, 51); icon.Location = new System.Drawing.Point(10, 51);
this.icon.MinimumSize = new System.Drawing.Size(1, 1); icon.MinimumSize = new System.Drawing.Size(1, 1);
this.icon.Name = "icon"; icon.Name = "icon";
this.icon.Padding = new System.Windows.Forms.Padding(40, 0, 0, 0); icon.Padding = new System.Windows.Forms.Padding(40, 0, 0, 0);
this.icon.Size = new System.Drawing.Size(32, 30); icon.Size = new System.Drawing.Size(32, 30);
this.icon.Style = Sunny.UI.UIStyle.Custom; icon.Style = UIStyle.Custom;
this.icon.StyleCustomMode = true; icon.StyleCustomMode = true;
this.icon.Symbol = 61528; icon.Symbol = 361528;
this.icon.SymbolColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(140)))), ((int)(((byte)(230))))); icon.SymbolColor = System.Drawing.Color.FromArgb(90, 140, 230);
this.icon.SymbolSize = 36; icon.SymbolSize = 36;
this.icon.TabIndex = 8; icon.TabIndex = 8;
this.icon.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; icon.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// UINotifier // UINotifier
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White; BackColor = System.Drawing.Color.White;
this.BackgroundImage = global::Sunny.UI.Properties.Resources.notifier; BackgroundImage = Properties.Resources.notifier;
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.ClientSize = new System.Drawing.Size(324, 117); ClientSize = new System.Drawing.Size(324, 117);
this.Controls.Add(this.icon); Controls.Add(icon);
this.Controls.Add(this.idLabel); Controls.Add(idLabel);
this.Controls.Add(this.buttonMenu); Controls.Add(buttonMenu);
this.Controls.Add(this.noteTitle); Controls.Add(noteTitle);
this.Controls.Add(this.noteDate); Controls.Add(noteDate);
this.Controls.Add(this.noteContent); Controls.Add(noteContent);
this.Controls.Add(this.buttonClose); Controls.Add(buttonClose);
this.DoubleBuffered = true; DoubleBuffered = true;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "UINotifier"; Name = "UINotifier";
this.ShowInTaskbar = false; ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Toast"; Text = "Toast";
this.TopMost = true; TopMost = true;
this.Load += new System.EventHandler(this.OnLoad); Load += OnLoad;
this.Shown += new System.EventHandler(this.UINotifier_Shown); Shown += UINotifier_Shown;
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.OnMouseDown); MouseDown += OnMouseDown;
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.OnMouseMove); MouseMove += OnMouseMove;
this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.OnMouseUp); MouseUp += OnMouseUp;
((System.ComponentModel.ISupportInitialize)(this.buttonClose)).EndInit(); ((System.ComponentModel.ISupportInitialize)buttonClose).EndInit();
((System.ComponentModel.ISupportInitialize)(this.buttonMenu)).EndInit(); ((System.ComponentModel.ISupportInitialize)buttonMenu).EndInit();
this.menu.ResumeLayout(false); menu.ResumeLayout(false);
this.ResumeLayout(false); ResumeLayout(false);
this.PerformLayout(); PerformLayout();
} }
#endregion #endregion

View File

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

View File

@ -42,16 +42,18 @@
// btnCancel // btnCancel
// //
btnCancel.Location = new System.Drawing.Point(343, 4); btnCancel.Location = new System.Drawing.Point(343, 4);
btnCancel.Symbol = 361453;
// //
// btnOK // btnOK
// //
btnOK.Location = new System.Drawing.Point(228, 4); btnOK.Location = new System.Drawing.Point(228, 4);
btnOK.Symbol = 361452;
// //
// label // label
// //
label.AutoSize = true; label.AutoSize = true;
label.BackColor = System.Drawing.Color.Transparent; label.BackColor = System.Drawing.Color.Transparent;
label.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); label.Font = new System.Drawing.Font("宋体", 12F);
label.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48); label.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
label.Location = new System.Drawing.Point(29, 57); label.Location = new System.Drawing.Point(29, 57);
label.Name = "label"; label.Name = "label";
@ -65,7 +67,7 @@
ComboBox.DataSource = null; ComboBox.DataSource = null;
ComboBox.DropDownStyle = UIDropDownStyle.DropDownList; ComboBox.DropDownStyle = UIDropDownStyle.DropDownList;
ComboBox.FillColor = System.Drawing.Color.White; ComboBox.FillColor = System.Drawing.Color.White;
ComboBox.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); ComboBox.Font = new System.Drawing.Font("宋体", 12F);
ComboBox.ItemHoverColor = System.Drawing.Color.FromArgb(155, 200, 255); ComboBox.ItemHoverColor = System.Drawing.Color.FromArgb(155, 200, 255);
ComboBox.ItemSelectForeColor = System.Drawing.Color.FromArgb(235, 243, 255); ComboBox.ItemSelectForeColor = System.Drawing.Color.FromArgb(235, 243, 255);
ComboBox.Location = new System.Drawing.Point(29, 92); ComboBox.Location = new System.Drawing.Point(29, 92);
@ -87,7 +89,6 @@
Controls.Add(ComboBox); Controls.Add(ComboBox);
Name = "UISelectForm"; Name = "UISelectForm";
Padding = new System.Windows.Forms.Padding(1, 35, 1, 1); Padding = new System.Windows.Forms.Padding(1, 35, 1, 1);
ShowIcon = false;
Text = "选择"; Text = "选择";
ZoomScaleRect = new System.Drawing.Rectangle(15, 15, 473, 182); ZoomScaleRect = new System.Drawing.Rectangle(15, 15, 473, 182);
Controls.SetChildIndex(ComboBox, 0); Controls.SetChildIndex(ComboBox, 0);