* 重构多语翻译类
This commit is contained in:
parent
2c24db60d9
commit
f12bef2dd8
120
SunnyUI/Controls/UIAvatar.resx
Normal file
120
SunnyUI/Controls/UIAvatar.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
@ -98,6 +98,7 @@ namespace Sunny.UI
|
|||||||
TopPanel.Name = "TopPanel";
|
TopPanel.Name = "TopPanel";
|
||||||
TopPanel.RadiusSides = UICornerRadiusSides.None;
|
TopPanel.RadiusSides = UICornerRadiusSides.None;
|
||||||
TopPanel.RectSides = ToolStripStatusLabelBorderSides.Left | ToolStripStatusLabelBorderSides.Top | ToolStripStatusLabelBorderSides.Right;
|
TopPanel.RectSides = ToolStripStatusLabelBorderSides.Left | ToolStripStatusLabelBorderSides.Top | ToolStripStatusLabelBorderSides.Right;
|
||||||
|
TopPanel.ShowBuiltInResources = true;
|
||||||
TopPanel.Size = new Size(461, 31);
|
TopPanel.Size = new Size(461, 31);
|
||||||
TopPanel.TabIndex = 0;
|
TopPanel.TabIndex = 0;
|
||||||
TopPanel.Text = "2020-05-05";
|
TopPanel.Text = "2020-05-05";
|
||||||
@ -222,6 +223,7 @@ namespace Sunny.UI
|
|||||||
p1.MinimumSize = new Size(1, 1);
|
p1.MinimumSize = new Size(1, 1);
|
||||||
p1.Name = "p1";
|
p1.Name = "p1";
|
||||||
p1.RadiusSides = UICornerRadiusSides.None;
|
p1.RadiusSides = UICornerRadiusSides.None;
|
||||||
|
p1.ShowBuiltInResources = true;
|
||||||
p1.Size = new Size(461, 277);
|
p1.Size = new Size(461, 277);
|
||||||
p1.TabIndex = 0;
|
p1.TabIndex = 0;
|
||||||
p1.Text = null;
|
p1.Text = null;
|
||||||
@ -236,7 +238,7 @@ namespace Sunny.UI
|
|||||||
tabPage2.Controls.Add(p2);
|
tabPage2.Controls.Add(p2);
|
||||||
tabPage2.Location = new Point(0, 40);
|
tabPage2.Location = new Point(0, 40);
|
||||||
tabPage2.Name = "tabPage2";
|
tabPage2.Name = "tabPage2";
|
||||||
tabPage2.Size = new Size(200, 60);
|
tabPage2.Size = new Size(461, 277);
|
||||||
tabPage2.TabIndex = 1;
|
tabPage2.TabIndex = 1;
|
||||||
tabPage2.Text = "tabPage2";
|
tabPage2.Text = "tabPage2";
|
||||||
tabPage2.UseVisualStyleBackColor = true;
|
tabPage2.UseVisualStyleBackColor = true;
|
||||||
@ -251,7 +253,8 @@ namespace Sunny.UI
|
|||||||
p2.MinimumSize = new Size(1, 1);
|
p2.MinimumSize = new Size(1, 1);
|
||||||
p2.Name = "p2";
|
p2.Name = "p2";
|
||||||
p2.RadiusSides = UICornerRadiusSides.None;
|
p2.RadiusSides = UICornerRadiusSides.None;
|
||||||
p2.Size = new Size(200, 60);
|
p2.ShowBuiltInResources = true;
|
||||||
|
p2.Size = new Size(461, 277);
|
||||||
p2.TabIndex = 1;
|
p2.TabIndex = 1;
|
||||||
p2.Text = null;
|
p2.Text = null;
|
||||||
p2.TextAlignment = ContentAlignment.MiddleCenter;
|
p2.TextAlignment = ContentAlignment.MiddleCenter;
|
||||||
@ -265,7 +268,7 @@ namespace Sunny.UI
|
|||||||
tabPage3.Controls.Add(p3);
|
tabPage3.Controls.Add(p3);
|
||||||
tabPage3.Location = new Point(0, 40);
|
tabPage3.Location = new Point(0, 40);
|
||||||
tabPage3.Name = "tabPage3";
|
tabPage3.Name = "tabPage3";
|
||||||
tabPage3.Size = new Size(200, 60);
|
tabPage3.Size = new Size(461, 277);
|
||||||
tabPage3.TabIndex = 2;
|
tabPage3.TabIndex = 2;
|
||||||
tabPage3.Text = "tabPage3";
|
tabPage3.Text = "tabPage3";
|
||||||
tabPage3.UseVisualStyleBackColor = true;
|
tabPage3.UseVisualStyleBackColor = true;
|
||||||
@ -280,7 +283,8 @@ namespace Sunny.UI
|
|||||||
p3.MinimumSize = new Size(1, 1);
|
p3.MinimumSize = new Size(1, 1);
|
||||||
p3.Name = "p3";
|
p3.Name = "p3";
|
||||||
p3.RadiusSides = UICornerRadiusSides.None;
|
p3.RadiusSides = UICornerRadiusSides.None;
|
||||||
p3.Size = new Size(200, 60);
|
p3.ShowBuiltInResources = true;
|
||||||
|
p3.Size = new Size(461, 277);
|
||||||
p3.TabIndex = 2;
|
p3.TabIndex = 2;
|
||||||
p3.Text = null;
|
p3.Text = null;
|
||||||
p3.TextAlignment = ContentAlignment.MiddleCenter;
|
p3.TextAlignment = ContentAlignment.MiddleCenter;
|
||||||
@ -295,6 +299,7 @@ namespace Sunny.UI
|
|||||||
Controls.Add(TopPanel);
|
Controls.Add(TopPanel);
|
||||||
FillColor = Color.White;
|
FillColor = Color.White;
|
||||||
Name = "UICalendar";
|
Name = "UICalendar";
|
||||||
|
ShowBuiltInResources = true;
|
||||||
Size = new Size(461, 348);
|
Size = new Size(461, 348);
|
||||||
TopPanel.ResumeLayout(false);
|
TopPanel.ResumeLayout(false);
|
||||||
TabControl.ResumeLayout(false);
|
TabControl.ResumeLayout(false);
|
||||||
|
@ -44,16 +44,16 @@ namespace Sunny.UI
|
|||||||
{
|
{
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// UIColorPicker
|
// UIColorPicker
|
||||||
//
|
//
|
||||||
this.DropDownStyle = UIDropDownStyle.DropDownList;
|
DropDownStyle = UIDropDownStyle.DropDownList;
|
||||||
this.Name = "UIColorPicker";
|
Name = "UIColorPicker";
|
||||||
this.Padding = new Padding(0, 0, 30, 0);
|
ShowBuiltInResources = true;
|
||||||
this.ButtonClick += this.UIColorPicker_ButtonClick;
|
ButtonClick += UIColorPicker_ButtonClick;
|
||||||
this.ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
this.PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
1
SunnyUI/Controls/UIComboBox.Designer.cs
generated
1
SunnyUI/Controls/UIComboBox.Designer.cs
generated
@ -43,6 +43,7 @@
|
|||||||
//
|
//
|
||||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
Name = "UIComboBox";
|
Name = "UIComboBox";
|
||||||
|
ShowBuiltInResources = true;
|
||||||
KeyDown += UIComboBox_KeyDown;
|
KeyDown += UIComboBox_KeyDown;
|
||||||
ButtonClick += UIComboBox_ButtonClick;
|
ButtonClick += UIComboBox_ButtonClick;
|
||||||
FontChanged += UIComboBox_FontChanged;
|
FontChanged += UIComboBox_FontChanged;
|
||||||
|
@ -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">
|
||||||
|
@ -46,16 +46,16 @@ namespace Sunny.UI
|
|||||||
{
|
{
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// UIComboTreeView
|
// UIComboDataGridView
|
||||||
//
|
//
|
||||||
this.DropDownStyle = UIDropDownStyle.DropDownList;
|
DropDownStyle = UIDropDownStyle.DropDownList;
|
||||||
this.Name = "UIComboTreeView";
|
Name = "UIComboDataGridView";
|
||||||
this.Padding = new Padding(0, 0, 30, 0);
|
ShowBuiltInResources = true;
|
||||||
this.ButtonClick += UIComboDataGridView_ButtonClick;
|
ButtonClick += UIComboDataGridView_ButtonClick;
|
||||||
this.ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
this.PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -53,16 +53,16 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// UIComboTreeView
|
// UIComboTreeView
|
||||||
//
|
//
|
||||||
this.DropDownStyle = UIDropDownStyle.DropDownList;
|
DropDownStyle = UIDropDownStyle.DropDownList;
|
||||||
this.Name = "UIComboTreeView";
|
Name = "UIComboTreeView";
|
||||||
this.Padding = new Padding(0, 0, 30, 0);
|
ShowBuiltInResources = true;
|
||||||
this.ButtonClick += this.UIComboTreeView_ButtonClick;
|
ButtonClick += UIComboTreeView_ButtonClick;
|
||||||
this.ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
this.PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
@ -136,16 +137,9 @@ namespace Sunny.UI
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (LicenseManager.UsageMode == LicenseUsageMode.Designtime)
|
if (DesignMode) return true;
|
||||||
{
|
if (LicenseManager.UsageMode == LicenseUsageMode.Designtime) return true;
|
||||||
return true;
|
if (Process.GetCurrentProcess().ProcessName == "devenv") return true;
|
||||||
}
|
|
||||||
|
|
||||||
if (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv")
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
19
SunnyUI/Controls/UIDatePicker.Designer.cs
generated
19
SunnyUI/Controls/UIDatePicker.Designer.cs
generated
@ -30,19 +30,18 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// UIDatePicker
|
// UIDatePicker
|
||||||
//
|
//
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
this.Name = "UIDatePicker";
|
Name = "UIDatePicker";
|
||||||
this.Padding = new System.Windows.Forms.Padding(0, 0, 30, 0);
|
ShowBuiltInResources = true;
|
||||||
this.SymbolDropDown = 61555;
|
SymbolDropDown = 61555;
|
||||||
this.SymbolNormal = 61555;
|
SymbolNormal = 61555;
|
||||||
this.ButtonClick += new System.EventHandler(this.UIDatetimePicker_ButtonClick);
|
ButtonClick += UIDatetimePicker_ButtonClick;
|
||||||
this.ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
this.PerformLayout();
|
PerformLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -58,7 +58,7 @@ namespace Sunny.UI
|
|||||||
private DateTime min = DateTime.MinValue;
|
private DateTime min = DateTime.MinValue;
|
||||||
|
|
||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
public override string[] FormTranslatorProperties { get; }
|
public override string[] FormTranslatorProperties => ["DateYearFormat", "DateYearMonthFormat", "DateFormat"];
|
||||||
|
|
||||||
static internal DateTime EffectiveMaxDate(DateTime maxDate)
|
static internal DateTime EffectiveMaxDate(DateTime maxDate)
|
||||||
{
|
{
|
||||||
|
@ -41,22 +41,21 @@ namespace Sunny.UI
|
|||||||
{
|
{
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// UIDatetimePicker
|
// UIDatetimePicker
|
||||||
//
|
//
|
||||||
this.Name = "UIDatetimePicker";
|
Name = "UIDatetimePicker";
|
||||||
this.Padding = new Padding(0, 0, 30, 0);
|
ShowBuiltInResources = true;
|
||||||
this.SymbolDropDown = 61555;
|
SymbolDropDown = 61555;
|
||||||
this.SymbolNormal = 61555;
|
SymbolNormal = 61555;
|
||||||
this.ButtonClick += this.UIDatetimePicker_ButtonClick;
|
ButtonClick += UIDatetimePicker_ButtonClick;
|
||||||
this.ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
this.PerformLayout();
|
PerformLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
public override string[] FormTranslatorProperties { get; }
|
public override string[] FormTranslatorProperties => ["DateFormat"];
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量。
|
||||||
|
@ -65,6 +65,9 @@ namespace Sunny.UI
|
|||||||
btnDec.Style = UIStyle.Custom;
|
btnDec.Style = UIStyle.Custom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Browsable(false)]
|
||||||
|
public override string[] FormTranslatorProperties { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 需要额外设置ToolTip的控件
|
/// 需要额外设置ToolTip的控件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
116
SunnyUI/Controls/UIDoubleUpDown.designer.cs
generated
116
SunnyUI/Controls/UIDoubleUpDown.designer.cs
generated
@ -28,73 +28,79 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.btnDec = new Sunny.UI.UISymbolButton();
|
btnDec = new UISymbolButton();
|
||||||
this.btnAdd = new Sunny.UI.UISymbolButton();
|
btnAdd = new UISymbolButton();
|
||||||
this.pnlValue = new Sunny.UI.UIPanel();
|
pnlValue = new UIPanel();
|
||||||
this.SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// btnDec
|
// btnDec
|
||||||
//
|
//
|
||||||
this.btnDec.Cursor = System.Windows.Forms.Cursors.Hand;
|
btnDec.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
this.btnDec.Dock = System.Windows.Forms.DockStyle.Left;
|
btnDec.Dock = System.Windows.Forms.DockStyle.Left;
|
||||||
this.btnDec.Font = new System.Drawing.Font("宋体", 12F);
|
btnDec.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
this.btnDec.ImageInterval = 1;
|
btnDec.ImageInterval = 1;
|
||||||
this.btnDec.Location = new System.Drawing.Point(0, 0);
|
btnDec.Location = new System.Drawing.Point(0, 0);
|
||||||
this.btnDec.Margin = new System.Windows.Forms.Padding(0);
|
btnDec.Margin = new System.Windows.Forms.Padding(0);
|
||||||
this.btnDec.MinimumSize = new System.Drawing.Size(1, 1);
|
btnDec.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
this.btnDec.Name = "btnDec";
|
btnDec.Name = "btnDec";
|
||||||
this.btnDec.Padding = new System.Windows.Forms.Padding(26, 4, 0, 0);
|
btnDec.Padding = new System.Windows.Forms.Padding(26, 4, 0, 0);
|
||||||
this.btnDec.RadiusSides = ((Sunny.UI.UICornerRadiusSides)((Sunny.UI.UICornerRadiusSides.LeftTop | Sunny.UI.UICornerRadiusSides.LeftBottom)));
|
btnDec.RadiusSides = UICornerRadiusSides.LeftTop | UICornerRadiusSides.LeftBottom;
|
||||||
this.btnDec.Size = new System.Drawing.Size(29, 29);
|
btnDec.ShowBuiltInResources = true;
|
||||||
this.btnDec.Symbol = 61544;
|
btnDec.Size = new System.Drawing.Size(29, 29);
|
||||||
this.btnDec.TabIndex = 0;
|
btnDec.Symbol = 61544;
|
||||||
this.btnDec.TipsText = null;
|
btnDec.TabIndex = 0;
|
||||||
this.btnDec.Click += new System.EventHandler(this.btnDec_Click);
|
btnDec.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||||||
|
btnDec.TipsText = null;
|
||||||
|
btnDec.Click += btnDec_Click;
|
||||||
//
|
//
|
||||||
// btnAdd
|
// btnAdd
|
||||||
//
|
//
|
||||||
this.btnAdd.Cursor = System.Windows.Forms.Cursors.Hand;
|
btnAdd.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
this.btnAdd.Dock = System.Windows.Forms.DockStyle.Right;
|
btnAdd.Dock = System.Windows.Forms.DockStyle.Right;
|
||||||
this.btnAdd.Font = new System.Drawing.Font("宋体", 12F);
|
btnAdd.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
this.btnAdd.ImageInterval = 1;
|
btnAdd.ImageInterval = 1;
|
||||||
this.btnAdd.Location = new System.Drawing.Point(87, 0);
|
btnAdd.Location = new System.Drawing.Point(87, 0);
|
||||||
this.btnAdd.Margin = new System.Windows.Forms.Padding(0);
|
btnAdd.Margin = new System.Windows.Forms.Padding(0);
|
||||||
this.btnAdd.MinimumSize = new System.Drawing.Size(1, 1);
|
btnAdd.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
this.btnAdd.Name = "btnAdd";
|
btnAdd.Name = "btnAdd";
|
||||||
this.btnAdd.Padding = new System.Windows.Forms.Padding(26, 3, 0, 0);
|
btnAdd.Padding = new System.Windows.Forms.Padding(26, 3, 0, 0);
|
||||||
this.btnAdd.RadiusSides = ((Sunny.UI.UICornerRadiusSides)((Sunny.UI.UICornerRadiusSides.RightTop | Sunny.UI.UICornerRadiusSides.RightBottom)));
|
btnAdd.RadiusSides = UICornerRadiusSides.RightTop | UICornerRadiusSides.RightBottom;
|
||||||
this.btnAdd.Size = new System.Drawing.Size(29, 29);
|
btnAdd.ShowBuiltInResources = true;
|
||||||
this.btnAdd.Symbol = 61543;
|
btnAdd.Size = new System.Drawing.Size(29, 29);
|
||||||
this.btnAdd.TabIndex = 1;
|
btnAdd.Symbol = 61543;
|
||||||
this.btnAdd.TipsText = null;
|
btnAdd.TabIndex = 1;
|
||||||
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
|
btnAdd.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||||||
|
btnAdd.TipsText = null;
|
||||||
|
btnAdd.Click += btnAdd_Click;
|
||||||
//
|
//
|
||||||
// pnlValue
|
// pnlValue
|
||||||
//
|
//
|
||||||
this.pnlValue.Dock = System.Windows.Forms.DockStyle.Fill;
|
pnlValue.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.pnlValue.Font = new System.Drawing.Font("宋体", 12F);
|
pnlValue.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
this.pnlValue.Location = new System.Drawing.Point(29, 0);
|
pnlValue.Location = new System.Drawing.Point(29, 0);
|
||||||
this.pnlValue.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
pnlValue.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
this.pnlValue.MinimumSize = new System.Drawing.Size(1, 1);
|
pnlValue.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
this.pnlValue.Name = "pnlValue";
|
pnlValue.Name = "pnlValue";
|
||||||
this.pnlValue.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
|
pnlValue.RadiusSides = UICornerRadiusSides.None;
|
||||||
this.pnlValue.RectSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((System.Windows.Forms.ToolStripStatusLabelBorderSides.Top | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom)));
|
pnlValue.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Top | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom;
|
||||||
this.pnlValue.Size = new System.Drawing.Size(58, 29);
|
pnlValue.ShowBuiltInResources = true;
|
||||||
this.pnlValue.TabIndex = 2;
|
pnlValue.Size = new System.Drawing.Size(58, 29);
|
||||||
this.pnlValue.Text = "0";
|
pnlValue.TabIndex = 2;
|
||||||
this.pnlValue.Click += new System.EventHandler(this.pnlValue_DoubleClick);
|
pnlValue.Text = "0";
|
||||||
|
pnlValue.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
pnlValue.Click += pnlValue_DoubleClick;
|
||||||
//
|
//
|
||||||
// UIDoubleUpDown
|
// UIDoubleUpDown
|
||||||
//
|
//
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
this.Controls.Add(this.pnlValue);
|
Controls.Add(pnlValue);
|
||||||
this.Controls.Add(this.btnAdd);
|
Controls.Add(btnAdd);
|
||||||
this.Controls.Add(this.btnDec);
|
Controls.Add(btnDec);
|
||||||
this.MinimumSize = new System.Drawing.Size(100, 0);
|
MinimumSize = new System.Drawing.Size(100, 0);
|
||||||
this.Name = "UIDoubleUpDown";
|
Name = "UIDoubleUpDown";
|
||||||
this.Size = new System.Drawing.Size(116, 29);
|
ShowBuiltInResources = true;
|
||||||
this.ResumeLayout(false);
|
Size = new System.Drawing.Size(116, 29);
|
||||||
|
ResumeLayout(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
120
SunnyUI/Controls/UIEdit.resx
Normal file
120
SunnyUI/Controls/UIEdit.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
@ -73,6 +73,9 @@ namespace Sunny.UI
|
|||||||
timer.Start();
|
timer.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Browsable(false)]
|
||||||
|
public override string[] FormTranslatorProperties { get; }
|
||||||
|
|
||||||
public void Render()
|
public void Render()
|
||||||
{
|
{
|
||||||
if (Panel == null) return;
|
if (Panel == null) return;
|
||||||
@ -514,63 +517,57 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.flowLayoutPanel = new FlowLayoutPanel();
|
flowLayoutPanel = new FlowLayoutPanel();
|
||||||
this.VBar = new UIVerScrollBarEx();
|
VBar = new UIVerScrollBarEx();
|
||||||
this.HBar = new UIHorScrollBarEx();
|
HBar = new UIHorScrollBarEx();
|
||||||
this.SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// flowLayoutPanel
|
// flowLayoutPanel
|
||||||
//
|
//
|
||||||
this.flowLayoutPanel.BackColor = Color.FromArgb(235, 243, 255);
|
flowLayoutPanel.BackColor = Color.FromArgb(235, 243, 255);
|
||||||
this.flowLayoutPanel.Dock = DockStyle.Fill;
|
flowLayoutPanel.Dock = DockStyle.Fill;
|
||||||
this.flowLayoutPanel.Location = new Point(2, 2);
|
flowLayoutPanel.Location = new Point(2, 2);
|
||||||
this.flowLayoutPanel.Name = "flowLayoutPanel";
|
flowLayoutPanel.Name = "flowLayoutPanel";
|
||||||
this.flowLayoutPanel.Size = new Size(429, 383);
|
flowLayoutPanel.Size = new Size(429, 383);
|
||||||
this.flowLayoutPanel.TabIndex = 0;
|
flowLayoutPanel.TabIndex = 0;
|
||||||
this.flowLayoutPanel.Tag = "69605093-6397-AD32-9F69-3C29F642F87E";
|
flowLayoutPanel.Tag = "69605093-6397-AD32-9F69-3C29F642F87E";
|
||||||
//
|
//
|
||||||
// VBar
|
// VBar
|
||||||
//
|
//
|
||||||
this.VBar.BoundsHeight = 10;
|
VBar.Font = new Font("宋体", 12F);
|
||||||
this.VBar.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
VBar.Location = new Point(410, 5);
|
||||||
this.VBar.LargeChange = 10;
|
VBar.MinimumSize = new Size(1, 1);
|
||||||
this.VBar.Location = new Point(410, 5);
|
VBar.Name = "VBar";
|
||||||
this.VBar.Maximum = 100;
|
VBar.ShowBuiltInResources = true;
|
||||||
this.VBar.MinimumSize = new Size(1, 1);
|
VBar.Size = new Size(18, 377);
|
||||||
this.VBar.Name = "VBar";
|
VBar.TabIndex = 1;
|
||||||
this.VBar.Size = new Size(18, 377);
|
VBar.TagString = "63FD1249-41D3-E08A-F8F5-CC41CC30FD03";
|
||||||
this.VBar.TabIndex = 1;
|
VBar.Text = "uiVerScrollBarEx1";
|
||||||
this.VBar.TagString = "63FD1249-41D3-E08A-F8F5-CC41CC30FD03";
|
VBar.Visible = false;
|
||||||
this.VBar.Text = "uiVerScrollBarEx1";
|
|
||||||
this.VBar.Value = 0;
|
|
||||||
this.VBar.Visible = false;
|
|
||||||
//
|
//
|
||||||
// HBar
|
// HBar
|
||||||
//
|
//
|
||||||
this.HBar.BoundsWidth = 10;
|
HBar.Font = new Font("宋体", 12F);
|
||||||
this.HBar.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
HBar.Location = new Point(5, 364);
|
||||||
this.HBar.LargeChange = 10;
|
HBar.MinimumSize = new Size(1, 1);
|
||||||
this.HBar.Location = new Point(5, 364);
|
HBar.Name = "HBar";
|
||||||
this.HBar.Maximum = 100;
|
HBar.ShowBuiltInResources = true;
|
||||||
this.HBar.MinimumSize = new Size(1, 1);
|
HBar.Size = new Size(399, 18);
|
||||||
this.HBar.Name = "HBar";
|
HBar.TabIndex = 2;
|
||||||
this.HBar.Size = new Size(399, 18);
|
HBar.TagString = "79E1E7DD-3E4D-916B-C8F1-F45B579C290C";
|
||||||
this.HBar.TabIndex = 2;
|
HBar.Text = "uiHorScrollBarEx1";
|
||||||
this.HBar.TagString = "79E1E7DD-3E4D-916B-C8F1-F45B579C290C";
|
HBar.Visible = false;
|
||||||
this.HBar.Text = "uiHorScrollBarEx1";
|
|
||||||
this.HBar.Value = 0;
|
|
||||||
this.HBar.Visible = false;
|
|
||||||
//
|
//
|
||||||
// UIFlowLayoutPanel
|
// UIFlowLayoutPanel
|
||||||
//
|
//
|
||||||
this.Controls.Add(this.HBar);
|
Controls.Add(HBar);
|
||||||
this.Controls.Add(this.VBar);
|
Controls.Add(VBar);
|
||||||
this.Controls.Add(this.flowLayoutPanel);
|
Controls.Add(flowLayoutPanel);
|
||||||
this.Name = "UIFlowLayoutPanel";
|
Name = "UIFlowLayoutPanel";
|
||||||
this.Padding = new Padding(2);
|
Padding = new Padding(2);
|
||||||
this.Size = new Size(433, 387);
|
ShowBuiltInResources = true;
|
||||||
this.ResumeLayout(false);
|
Size = new Size(433, 387);
|
||||||
|
ResumeLayout(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -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">
|
||||||
|
@ -62,6 +62,9 @@ namespace Sunny.UI
|
|||||||
fillColor = UIStyles.Blue.EditorBackColor;
|
fillColor = UIStyles.Blue.EditorBackColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Browsable(false)]
|
||||||
|
public override string[] FormTranslatorProperties { get; }
|
||||||
|
|
||||||
public event EventHandler ValueChanged;
|
public event EventHandler ValueChanged;
|
||||||
|
|
||||||
private void Txt_Leave(object sender, EventArgs e)
|
private void Txt_Leave(object sender, EventArgs e)
|
||||||
@ -363,7 +366,7 @@ namespace Sunny.UI
|
|||||||
txt1.Margin = new Padding(3, 3, 10, 3);
|
txt1.Margin = new Padding(3, 3, 10, 3);
|
||||||
txt1.MaxLength = 3;
|
txt1.MaxLength = 3;
|
||||||
txt1.Name = "txt1";
|
txt1.Name = "txt1";
|
||||||
txt1.Size = new Size(40, 22);
|
txt1.Size = new Size(40, 19);
|
||||||
txt1.TabIndex = 0;
|
txt1.TabIndex = 0;
|
||||||
txt1.TextAlign = HorizontalAlignment.Center;
|
txt1.TextAlign = HorizontalAlignment.Center;
|
||||||
//
|
//
|
||||||
@ -376,7 +379,7 @@ namespace Sunny.UI
|
|||||||
txt2.Margin = new Padding(3, 3, 10, 3);
|
txt2.Margin = new Padding(3, 3, 10, 3);
|
||||||
txt2.MaxLength = 3;
|
txt2.MaxLength = 3;
|
||||||
txt2.Name = "txt2";
|
txt2.Name = "txt2";
|
||||||
txt2.Size = new Size(40, 22);
|
txt2.Size = new Size(40, 19);
|
||||||
txt2.TabIndex = 0;
|
txt2.TabIndex = 0;
|
||||||
txt2.TabStop = false;
|
txt2.TabStop = false;
|
||||||
txt2.TextAlign = HorizontalAlignment.Center;
|
txt2.TextAlign = HorizontalAlignment.Center;
|
||||||
@ -390,7 +393,7 @@ namespace Sunny.UI
|
|||||||
txt3.Margin = new Padding(3, 3, 10, 3);
|
txt3.Margin = new Padding(3, 3, 10, 3);
|
||||||
txt3.MaxLength = 3;
|
txt3.MaxLength = 3;
|
||||||
txt3.Name = "txt3";
|
txt3.Name = "txt3";
|
||||||
txt3.Size = new Size(40, 22);
|
txt3.Size = new Size(40, 19);
|
||||||
txt3.TabIndex = 0;
|
txt3.TabIndex = 0;
|
||||||
txt3.TabStop = false;
|
txt3.TabStop = false;
|
||||||
txt3.TextAlign = HorizontalAlignment.Center;
|
txt3.TextAlign = HorizontalAlignment.Center;
|
||||||
@ -404,7 +407,7 @@ namespace Sunny.UI
|
|||||||
txt4.Margin = new Padding(3, 3, 10, 3);
|
txt4.Margin = new Padding(3, 3, 10, 3);
|
||||||
txt4.MaxLength = 3;
|
txt4.MaxLength = 3;
|
||||||
txt4.Name = "txt4";
|
txt4.Name = "txt4";
|
||||||
txt4.Size = new Size(40, 22);
|
txt4.Size = new Size(40, 19);
|
||||||
txt4.TabIndex = 0;
|
txt4.TabIndex = 0;
|
||||||
txt4.TabStop = false;
|
txt4.TabStop = false;
|
||||||
txt4.TextAlign = HorizontalAlignment.Center;
|
txt4.TextAlign = HorizontalAlignment.Center;
|
||||||
@ -419,6 +422,7 @@ namespace Sunny.UI
|
|||||||
FillColor2 = Color.FromArgb(235, 243, 255);
|
FillColor2 = Color.FromArgb(235, 243, 255);
|
||||||
Name = "UIIPTextBox";
|
Name = "UIIPTextBox";
|
||||||
Padding = new Padding(1);
|
Padding = new Padding(1);
|
||||||
|
ShowBuiltInResources = true;
|
||||||
Size = new Size(219, 29);
|
Size = new Size(219, 29);
|
||||||
SizeChanged += UIIPTextBox_SizeChanged;
|
SizeChanged += UIIPTextBox_SizeChanged;
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
|
@ -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">
|
||||||
|
@ -32,7 +32,7 @@ namespace Sunny.UI
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 图像按钮
|
/// 图像按钮
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class UIImageButton : PictureBox, IStyleInterface, IZoomScale
|
public sealed class UIImageButton : PictureBox, IStyleInterface, IZoomScale, IFormTranslator
|
||||||
{
|
{
|
||||||
private bool IsPress;
|
private bool IsPress;
|
||||||
private bool IsHover;
|
private bool IsHover;
|
||||||
@ -48,6 +48,15 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
private bool isClick;
|
private bool isClick;
|
||||||
|
|
||||||
|
[Browsable(false)]
|
||||||
|
[Description("控件在界面显示时需要多语翻译的属性名称数组"), Category("SunnyUI")]
|
||||||
|
public string[] FormTranslatorProperties => ["Text"];
|
||||||
|
|
||||||
|
[DefaultValue(false)]
|
||||||
|
[Description("控件是否显示多语内置资源"), Category("SunnyUI")]
|
||||||
|
public bool ShowBuiltInResources { get; set; } = false;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 调用点击事件
|
/// 调用点击事件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -79,12 +79,20 @@ namespace Sunny.UI
|
|||||||
listbox.DrawItem += Listbox_DrawItem;
|
listbox.DrawItem += Listbox_DrawItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Browsable(false)]
|
||||||
|
public override string[] FormTranslatorProperties { get; }
|
||||||
|
|
||||||
public override void SetDPIScale()
|
public override void SetDPIScale()
|
||||||
{
|
{
|
||||||
base.SetDPIScale();
|
base.SetDPIScale();
|
||||||
listbox.SetDPIScale();
|
listbox.SetDPIScale();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
|
@ -62,6 +62,9 @@ namespace Sunny.UI
|
|||||||
btnDec.Style = UIStyle.Custom;
|
btnDec.Style = UIStyle.Custom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Browsable(false)]
|
||||||
|
public override string[] FormTranslatorProperties { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 需要额外设置ToolTip的控件
|
/// 需要额外设置ToolTip的控件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
116
SunnyUI/Controls/UIIntegerUpDown.designer.cs
generated
116
SunnyUI/Controls/UIIntegerUpDown.designer.cs
generated
@ -28,73 +28,79 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.btnDec = new Sunny.UI.UISymbolButton();
|
btnDec = new UISymbolButton();
|
||||||
this.btnAdd = new Sunny.UI.UISymbolButton();
|
btnAdd = new UISymbolButton();
|
||||||
this.pnlValue = new Sunny.UI.UIPanel();
|
pnlValue = new UIPanel();
|
||||||
this.SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// btnDec
|
// btnDec
|
||||||
//
|
//
|
||||||
this.btnDec.Cursor = System.Windows.Forms.Cursors.Hand;
|
btnDec.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
this.btnDec.Dock = System.Windows.Forms.DockStyle.Left;
|
btnDec.Dock = System.Windows.Forms.DockStyle.Left;
|
||||||
this.btnDec.Font = new System.Drawing.Font("宋体", 12F);
|
btnDec.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
this.btnDec.ImageInterval = 1;
|
btnDec.ImageInterval = 1;
|
||||||
this.btnDec.Location = new System.Drawing.Point(0, 0);
|
btnDec.Location = new System.Drawing.Point(0, 0);
|
||||||
this.btnDec.Margin = new System.Windows.Forms.Padding(0);
|
btnDec.Margin = new System.Windows.Forms.Padding(0);
|
||||||
this.btnDec.MinimumSize = new System.Drawing.Size(1, 1);
|
btnDec.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
this.btnDec.Name = "btnDec";
|
btnDec.Name = "btnDec";
|
||||||
this.btnDec.Padding = new System.Windows.Forms.Padding(26, 4, 0, 0);
|
btnDec.Padding = new System.Windows.Forms.Padding(26, 4, 0, 0);
|
||||||
this.btnDec.RadiusSides = ((Sunny.UI.UICornerRadiusSides)((Sunny.UI.UICornerRadiusSides.LeftTop | Sunny.UI.UICornerRadiusSides.LeftBottom)));
|
btnDec.RadiusSides = UICornerRadiusSides.LeftTop | UICornerRadiusSides.LeftBottom;
|
||||||
this.btnDec.Size = new System.Drawing.Size(29, 29);
|
btnDec.ShowBuiltInResources = true;
|
||||||
this.btnDec.Symbol = 61544;
|
btnDec.Size = new System.Drawing.Size(29, 29);
|
||||||
this.btnDec.TabIndex = 0;
|
btnDec.Symbol = 61544;
|
||||||
this.btnDec.TipsText = null;
|
btnDec.TabIndex = 0;
|
||||||
this.btnDec.Click += new System.EventHandler(this.btnDec_Click);
|
btnDec.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||||||
|
btnDec.TipsText = null;
|
||||||
|
btnDec.Click += btnDec_Click;
|
||||||
//
|
//
|
||||||
// btnAdd
|
// btnAdd
|
||||||
//
|
//
|
||||||
this.btnAdd.Cursor = System.Windows.Forms.Cursors.Hand;
|
btnAdd.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
this.btnAdd.Dock = System.Windows.Forms.DockStyle.Right;
|
btnAdd.Dock = System.Windows.Forms.DockStyle.Right;
|
||||||
this.btnAdd.Font = new System.Drawing.Font("宋体", 12F);
|
btnAdd.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
this.btnAdd.ImageInterval = 1;
|
btnAdd.ImageInterval = 1;
|
||||||
this.btnAdd.Location = new System.Drawing.Point(87, 0);
|
btnAdd.Location = new System.Drawing.Point(87, 0);
|
||||||
this.btnAdd.Margin = new System.Windows.Forms.Padding(0);
|
btnAdd.Margin = new System.Windows.Forms.Padding(0);
|
||||||
this.btnAdd.MinimumSize = new System.Drawing.Size(1, 1);
|
btnAdd.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
this.btnAdd.Name = "btnAdd";
|
btnAdd.Name = "btnAdd";
|
||||||
this.btnAdd.Padding = new System.Windows.Forms.Padding(26, 3, 0, 0);
|
btnAdd.Padding = new System.Windows.Forms.Padding(26, 3, 0, 0);
|
||||||
this.btnAdd.RadiusSides = ((Sunny.UI.UICornerRadiusSides)((Sunny.UI.UICornerRadiusSides.RightTop | Sunny.UI.UICornerRadiusSides.RightBottom)));
|
btnAdd.RadiusSides = UICornerRadiusSides.RightTop | UICornerRadiusSides.RightBottom;
|
||||||
this.btnAdd.Size = new System.Drawing.Size(29, 29);
|
btnAdd.ShowBuiltInResources = true;
|
||||||
this.btnAdd.Symbol = 61543;
|
btnAdd.Size = new System.Drawing.Size(29, 29);
|
||||||
this.btnAdd.TabIndex = 1;
|
btnAdd.Symbol = 61543;
|
||||||
this.btnAdd.TipsText = null;
|
btnAdd.TabIndex = 1;
|
||||||
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
|
btnAdd.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||||||
|
btnAdd.TipsText = null;
|
||||||
|
btnAdd.Click += btnAdd_Click;
|
||||||
//
|
//
|
||||||
// pnlValue
|
// pnlValue
|
||||||
//
|
//
|
||||||
this.pnlValue.Dock = System.Windows.Forms.DockStyle.Fill;
|
pnlValue.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.pnlValue.Font = new System.Drawing.Font("宋体", 12F);
|
pnlValue.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
this.pnlValue.Location = new System.Drawing.Point(29, 0);
|
pnlValue.Location = new System.Drawing.Point(29, 0);
|
||||||
this.pnlValue.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
pnlValue.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
this.pnlValue.MinimumSize = new System.Drawing.Size(1, 1);
|
pnlValue.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
this.pnlValue.Name = "pnlValue";
|
pnlValue.Name = "pnlValue";
|
||||||
this.pnlValue.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
|
pnlValue.RadiusSides = UICornerRadiusSides.None;
|
||||||
this.pnlValue.RectSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((System.Windows.Forms.ToolStripStatusLabelBorderSides.Top | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom)));
|
pnlValue.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Top | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom;
|
||||||
this.pnlValue.Size = new System.Drawing.Size(58, 29);
|
pnlValue.ShowBuiltInResources = true;
|
||||||
this.pnlValue.TabIndex = 2;
|
pnlValue.Size = new System.Drawing.Size(58, 29);
|
||||||
this.pnlValue.Text = "0";
|
pnlValue.TabIndex = 2;
|
||||||
this.pnlValue.Click += new System.EventHandler(this.pnlValue_DoubleClick);
|
pnlValue.Text = "0";
|
||||||
|
pnlValue.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
pnlValue.Click += pnlValue_DoubleClick;
|
||||||
//
|
//
|
||||||
// UIIntegerUpDown
|
// UIIntegerUpDown
|
||||||
//
|
//
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
this.Controls.Add(this.pnlValue);
|
Controls.Add(pnlValue);
|
||||||
this.Controls.Add(this.btnAdd);
|
Controls.Add(btnAdd);
|
||||||
this.Controls.Add(this.btnDec);
|
Controls.Add(btnDec);
|
||||||
this.MinimumSize = new System.Drawing.Size(100, 0);
|
MinimumSize = new System.Drawing.Size(100, 0);
|
||||||
this.Name = "UIIntegerUpDown";
|
Name = "UIIntegerUpDown";
|
||||||
this.Size = new System.Drawing.Size(116, 29);
|
ShowBuiltInResources = true;
|
||||||
this.ResumeLayout(false);
|
Size = new System.Drawing.Size(116, 29);
|
||||||
|
ResumeLayout(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -31,7 +31,7 @@ namespace Sunny.UI
|
|||||||
/// LED显示屏
|
/// LED显示屏
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DefaultProperty("Text")]
|
[DefaultProperty("Text")]
|
||||||
public class UILedDisplay : Control, IFormTranslator
|
public class UILedDisplay : Control
|
||||||
{
|
{
|
||||||
#region 组件设计器生成的代码
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
@ -85,14 +85,6 @@ namespace Sunny.UI
|
|||||||
Version = UIGlobal.Version;
|
Version = UIGlobal.Version;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Browsable(false)]
|
|
||||||
[Description("控件在界面显示时需要多语翻译的属性名称数组"), Category("SunnyUI")]
|
|
||||||
public string[] FormTranslatorProperties => ["Text"];
|
|
||||||
|
|
||||||
[DefaultValue(false)]
|
|
||||||
[Description("控件是否显示多语内置资源"), Category("SunnyUI")]
|
|
||||||
public bool ShowBuiltInResources { get; set; } = false;
|
|
||||||
|
|
||||||
public string Version { get; }
|
public string Version { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -39,9 +39,6 @@ namespace Sunny.UI
|
|||||||
foreColor = UIStyles.Blue.LedLabelForeColor;
|
foreColor = UIStyles.Blue.LedLabelForeColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Browsable(false)]
|
|
||||||
public override string[] FormTranslatorProperties => ["Text"];
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 重载绘图
|
/// 重载绘图
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -97,6 +97,9 @@ namespace Sunny.UI
|
|||||||
timer.Start();
|
timer.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Browsable(false)]
|
||||||
|
public override string[] FormTranslatorProperties { get; }
|
||||||
|
|
||||||
public override void SetDPIScale()
|
public override void SetDPIScale()
|
||||||
{
|
{
|
||||||
base.SetDPIScale();
|
base.SetDPIScale();
|
||||||
@ -737,5 +740,10 @@ namespace Sunny.UI
|
|||||||
if (index < 0 || index >= Items.Count) return string.Empty;
|
if (index < 0 || index >= Items.Count) return string.Empty;
|
||||||
return GetItemText(Items[index]);
|
return GetItemText(Items[index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -315,294 +315,294 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.b0 = new Sunny.UI.UISymbolButton();
|
b0 = new UISymbolButton();
|
||||||
this.b1 = new Sunny.UI.UISymbolButton();
|
b1 = new UISymbolButton();
|
||||||
this.b3 = new Sunny.UI.UISymbolButton();
|
b3 = new UISymbolButton();
|
||||||
this.b2 = new Sunny.UI.UISymbolButton();
|
b2 = new UISymbolButton();
|
||||||
this.b7 = new Sunny.UI.UISymbolButton();
|
b7 = new UISymbolButton();
|
||||||
this.b6 = new Sunny.UI.UISymbolButton();
|
b6 = new UISymbolButton();
|
||||||
this.b5 = new Sunny.UI.UISymbolButton();
|
b5 = new UISymbolButton();
|
||||||
this.b4 = new Sunny.UI.UISymbolButton();
|
b4 = new UISymbolButton();
|
||||||
this.b15 = new Sunny.UI.UISymbolButton();
|
b15 = new UISymbolButton();
|
||||||
this.b14 = new Sunny.UI.UISymbolButton();
|
b14 = new UISymbolButton();
|
||||||
this.b13 = new Sunny.UI.UISymbolButton();
|
b13 = new UISymbolButton();
|
||||||
this.b12 = new Sunny.UI.UISymbolButton();
|
b12 = new UISymbolButton();
|
||||||
this.b11 = new Sunny.UI.UISymbolButton();
|
b11 = new UISymbolButton();
|
||||||
this.b10 = new Sunny.UI.UISymbolButton();
|
b10 = new UISymbolButton();
|
||||||
this.b9 = new Sunny.UI.UISymbolButton();
|
b9 = new UISymbolButton();
|
||||||
this.b8 = new Sunny.UI.UISymbolButton();
|
b8 = new UISymbolButton();
|
||||||
this.b16 = new Sunny.UI.UISymbolButton();
|
b16 = new UISymbolButton();
|
||||||
this.SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// b0
|
// b0
|
||||||
//
|
//
|
||||||
this.b0.Cursor = System.Windows.Forms.Cursors.Hand;
|
b0.Cursor = Cursors.Hand;
|
||||||
this.b0.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b0.Font = new Font("宋体", 10.5F);
|
||||||
this.b0.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
b0.ImageAlign = ContentAlignment.MiddleLeft;
|
||||||
this.b0.Location = new System.Drawing.Point(3, 4);
|
b0.Location = new Point(3, 4);
|
||||||
this.b0.MinimumSize = new System.Drawing.Size(1, 1);
|
b0.MinimumSize = new Size(1, 1);
|
||||||
this.b0.Name = "b0";
|
b0.Name = "b0";
|
||||||
this.b0.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
b0.Padding = new Padding(5, 0, 5, 0);
|
||||||
this.b0.Radius = 2;
|
b0.Radius = 2;
|
||||||
this.b0.Size = new System.Drawing.Size(32, 32);
|
b0.Size = new Size(32, 32);
|
||||||
this.b0.Symbol = 61700;
|
b0.Symbol = 61700;
|
||||||
this.b0.TabIndex = 0;
|
b0.TabIndex = 0;
|
||||||
this.b0.TagString = "<";
|
b0.TagString = "<";
|
||||||
this.b0.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
b0.TextAlign = ContentAlignment.MiddleRight;
|
||||||
this.b0.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b0.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||||
//
|
//
|
||||||
// b1
|
// b1
|
||||||
//
|
//
|
||||||
this.b1.Cursor = System.Windows.Forms.Cursors.Hand;
|
b1.Cursor = Cursors.Hand;
|
||||||
this.b1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b1.Font = new Font("宋体", 12F);
|
||||||
this.b1.Location = new System.Drawing.Point(81, 4);
|
b1.Location = new Point(81, 4);
|
||||||
this.b1.MinimumSize = new System.Drawing.Size(1, 1);
|
b1.MinimumSize = new Size(1, 1);
|
||||||
this.b1.Name = "b1";
|
b1.Name = "b1";
|
||||||
this.b1.Radius = 2;
|
b1.Radius = 2;
|
||||||
this.b1.Size = new System.Drawing.Size(29, 29);
|
b1.Size = new Size(29, 29);
|
||||||
this.b1.Symbol = 0;
|
b1.Symbol = 0;
|
||||||
this.b1.TabIndex = 1;
|
b1.TabIndex = 1;
|
||||||
this.b1.Text = "0";
|
b1.Text = "0";
|
||||||
this.b1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b1.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||||
//
|
//
|
||||||
// b3
|
// b3
|
||||||
//
|
//
|
||||||
this.b3.Cursor = System.Windows.Forms.Cursors.Hand;
|
b3.Cursor = Cursors.Hand;
|
||||||
this.b3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b3.Font = new Font("宋体", 12F);
|
||||||
this.b3.Location = new System.Drawing.Point(145, 4);
|
b3.Location = new Point(145, 4);
|
||||||
this.b3.MinimumSize = new System.Drawing.Size(1, 1);
|
b3.MinimumSize = new Size(1, 1);
|
||||||
this.b3.Name = "b3";
|
b3.Name = "b3";
|
||||||
this.b3.Radius = 2;
|
b3.Radius = 2;
|
||||||
this.b3.Size = new System.Drawing.Size(29, 29);
|
b3.Size = new Size(29, 29);
|
||||||
this.b3.Symbol = 0;
|
b3.Symbol = 0;
|
||||||
this.b3.TabIndex = 3;
|
b3.TabIndex = 3;
|
||||||
this.b3.Text = "0";
|
b3.Text = "0";
|
||||||
this.b3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b3.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||||
//
|
//
|
||||||
// b2
|
// b2
|
||||||
//
|
//
|
||||||
this.b2.Cursor = System.Windows.Forms.Cursors.Hand;
|
b2.Cursor = Cursors.Hand;
|
||||||
this.b2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b2.Font = new Font("宋体", 12F);
|
||||||
this.b2.Location = new System.Drawing.Point(113, 4);
|
b2.Location = new Point(113, 4);
|
||||||
this.b2.MinimumSize = new System.Drawing.Size(1, 1);
|
b2.MinimumSize = new Size(1, 1);
|
||||||
this.b2.Name = "b2";
|
b2.Name = "b2";
|
||||||
this.b2.Radius = 2;
|
b2.Radius = 2;
|
||||||
this.b2.Size = new System.Drawing.Size(29, 29);
|
b2.Size = new Size(29, 29);
|
||||||
this.b2.Symbol = 0;
|
b2.Symbol = 0;
|
||||||
this.b2.TabIndex = 2;
|
b2.TabIndex = 2;
|
||||||
this.b2.Text = "0";
|
b2.Text = "0";
|
||||||
this.b2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b2.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||||
//
|
//
|
||||||
// b7
|
// b7
|
||||||
//
|
//
|
||||||
this.b7.Cursor = System.Windows.Forms.Cursors.Hand;
|
b7.Cursor = Cursors.Hand;
|
||||||
this.b7.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b7.Font = new Font("宋体", 12F);
|
||||||
this.b7.Location = new System.Drawing.Point(273, 4);
|
b7.Location = new Point(273, 4);
|
||||||
this.b7.MinimumSize = new System.Drawing.Size(1, 1);
|
b7.MinimumSize = new Size(1, 1);
|
||||||
this.b7.Name = "b7";
|
b7.Name = "b7";
|
||||||
this.b7.Radius = 2;
|
b7.Radius = 2;
|
||||||
this.b7.Size = new System.Drawing.Size(29, 29);
|
b7.Size = new Size(29, 29);
|
||||||
this.b7.Symbol = 0;
|
b7.Symbol = 0;
|
||||||
this.b7.TabIndex = 7;
|
b7.TabIndex = 7;
|
||||||
this.b7.Text = "0";
|
b7.Text = "0";
|
||||||
this.b7.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b7.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||||
//
|
//
|
||||||
// b6
|
// b6
|
||||||
//
|
//
|
||||||
this.b6.Cursor = System.Windows.Forms.Cursors.Hand;
|
b6.Cursor = Cursors.Hand;
|
||||||
this.b6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b6.Font = new Font("宋体", 12F);
|
||||||
this.b6.Location = new System.Drawing.Point(241, 4);
|
b6.Location = new Point(241, 4);
|
||||||
this.b6.MinimumSize = new System.Drawing.Size(1, 1);
|
b6.MinimumSize = new Size(1, 1);
|
||||||
this.b6.Name = "b6";
|
b6.Name = "b6";
|
||||||
this.b6.Radius = 2;
|
b6.Radius = 2;
|
||||||
this.b6.Size = new System.Drawing.Size(29, 29);
|
b6.Size = new Size(29, 29);
|
||||||
this.b6.Symbol = 0;
|
b6.Symbol = 0;
|
||||||
this.b6.TabIndex = 6;
|
b6.TabIndex = 6;
|
||||||
this.b6.Text = "0";
|
b6.Text = "0";
|
||||||
this.b6.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b6.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||||
//
|
//
|
||||||
// b5
|
// b5
|
||||||
//
|
//
|
||||||
this.b5.Cursor = System.Windows.Forms.Cursors.Hand;
|
b5.Cursor = Cursors.Hand;
|
||||||
this.b5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b5.Font = new Font("宋体", 12F);
|
||||||
this.b5.Location = new System.Drawing.Point(209, 4);
|
b5.Location = new Point(209, 4);
|
||||||
this.b5.MinimumSize = new System.Drawing.Size(1, 1);
|
b5.MinimumSize = new Size(1, 1);
|
||||||
this.b5.Name = "b5";
|
b5.Name = "b5";
|
||||||
this.b5.Radius = 2;
|
b5.Radius = 2;
|
||||||
this.b5.Size = new System.Drawing.Size(29, 29);
|
b5.Size = new Size(29, 29);
|
||||||
this.b5.Symbol = 0;
|
b5.Symbol = 0;
|
||||||
this.b5.TabIndex = 5;
|
b5.TabIndex = 5;
|
||||||
this.b5.Text = "0";
|
b5.Text = "0";
|
||||||
this.b5.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b5.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||||
//
|
//
|
||||||
// b4
|
// b4
|
||||||
//
|
//
|
||||||
this.b4.Cursor = System.Windows.Forms.Cursors.Hand;
|
b4.Cursor = Cursors.Hand;
|
||||||
this.b4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b4.Font = new Font("宋体", 12F);
|
||||||
this.b4.Location = new System.Drawing.Point(177, 4);
|
b4.Location = new Point(177, 4);
|
||||||
this.b4.MinimumSize = new System.Drawing.Size(1, 1);
|
b4.MinimumSize = new Size(1, 1);
|
||||||
this.b4.Name = "b4";
|
b4.Name = "b4";
|
||||||
this.b4.Radius = 2;
|
b4.Radius = 2;
|
||||||
this.b4.Size = new System.Drawing.Size(29, 29);
|
b4.Size = new Size(29, 29);
|
||||||
this.b4.Symbol = 0;
|
b4.Symbol = 0;
|
||||||
this.b4.TabIndex = 4;
|
b4.TabIndex = 4;
|
||||||
this.b4.Text = "0";
|
b4.Text = "0";
|
||||||
this.b4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b4.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||||
//
|
//
|
||||||
// b15
|
// b15
|
||||||
//
|
//
|
||||||
this.b15.Cursor = System.Windows.Forms.Cursors.Hand;
|
b15.Cursor = Cursors.Hand;
|
||||||
this.b15.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b15.Font = new Font("宋体", 12F);
|
||||||
this.b15.Location = new System.Drawing.Point(529, 4);
|
b15.Location = new Point(529, 4);
|
||||||
this.b15.MinimumSize = new System.Drawing.Size(1, 1);
|
b15.MinimumSize = new Size(1, 1);
|
||||||
this.b15.Name = "b15";
|
b15.Name = "b15";
|
||||||
this.b15.Radius = 2;
|
b15.Radius = 2;
|
||||||
this.b15.Size = new System.Drawing.Size(29, 29);
|
b15.Size = new Size(29, 29);
|
||||||
this.b15.Symbol = 0;
|
b15.Symbol = 0;
|
||||||
this.b15.TabIndex = 15;
|
b15.TabIndex = 15;
|
||||||
this.b15.Text = "0";
|
b15.Text = "0";
|
||||||
this.b15.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b15.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||||
//
|
//
|
||||||
// b14
|
// b14
|
||||||
//
|
//
|
||||||
this.b14.Cursor = System.Windows.Forms.Cursors.Hand;
|
b14.Cursor = Cursors.Hand;
|
||||||
this.b14.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b14.Font = new Font("宋体", 12F);
|
||||||
this.b14.Location = new System.Drawing.Point(497, 4);
|
b14.Location = new Point(497, 4);
|
||||||
this.b14.MinimumSize = new System.Drawing.Size(1, 1);
|
b14.MinimumSize = new Size(1, 1);
|
||||||
this.b14.Name = "b14";
|
b14.Name = "b14";
|
||||||
this.b14.Radius = 2;
|
b14.Radius = 2;
|
||||||
this.b14.Size = new System.Drawing.Size(29, 29);
|
b14.Size = new Size(29, 29);
|
||||||
this.b14.Symbol = 0;
|
b14.Symbol = 0;
|
||||||
this.b14.TabIndex = 14;
|
b14.TabIndex = 14;
|
||||||
this.b14.Text = "0";
|
b14.Text = "0";
|
||||||
this.b14.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b14.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||||
//
|
//
|
||||||
// b13
|
// b13
|
||||||
//
|
//
|
||||||
this.b13.Cursor = System.Windows.Forms.Cursors.Hand;
|
b13.Cursor = Cursors.Hand;
|
||||||
this.b13.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b13.Font = new Font("宋体", 12F);
|
||||||
this.b13.Location = new System.Drawing.Point(465, 4);
|
b13.Location = new Point(465, 4);
|
||||||
this.b13.MinimumSize = new System.Drawing.Size(1, 1);
|
b13.MinimumSize = new Size(1, 1);
|
||||||
this.b13.Name = "b13";
|
b13.Name = "b13";
|
||||||
this.b13.Radius = 2;
|
b13.Radius = 2;
|
||||||
this.b13.Size = new System.Drawing.Size(29, 29);
|
b13.Size = new Size(29, 29);
|
||||||
this.b13.Symbol = 0;
|
b13.Symbol = 0;
|
||||||
this.b13.TabIndex = 13;
|
b13.TabIndex = 13;
|
||||||
this.b13.Text = "0";
|
b13.Text = "0";
|
||||||
this.b13.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b13.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||||
//
|
//
|
||||||
// b12
|
// b12
|
||||||
//
|
//
|
||||||
this.b12.Cursor = System.Windows.Forms.Cursors.Hand;
|
b12.Cursor = Cursors.Hand;
|
||||||
this.b12.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b12.Font = new Font("宋体", 12F);
|
||||||
this.b12.Location = new System.Drawing.Point(433, 4);
|
b12.Location = new Point(433, 4);
|
||||||
this.b12.MinimumSize = new System.Drawing.Size(1, 1);
|
b12.MinimumSize = new Size(1, 1);
|
||||||
this.b12.Name = "b12";
|
b12.Name = "b12";
|
||||||
this.b12.Radius = 2;
|
b12.Radius = 2;
|
||||||
this.b12.Size = new System.Drawing.Size(29, 29);
|
b12.Size = new Size(29, 29);
|
||||||
this.b12.Symbol = 0;
|
b12.Symbol = 0;
|
||||||
this.b12.TabIndex = 12;
|
b12.TabIndex = 12;
|
||||||
this.b12.Text = "0";
|
b12.Text = "0";
|
||||||
this.b12.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b12.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||||
//
|
//
|
||||||
// b11
|
// b11
|
||||||
//
|
//
|
||||||
this.b11.Cursor = System.Windows.Forms.Cursors.Hand;
|
b11.Cursor = Cursors.Hand;
|
||||||
this.b11.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b11.Font = new Font("宋体", 12F);
|
||||||
this.b11.Location = new System.Drawing.Point(401, 4);
|
b11.Location = new Point(401, 4);
|
||||||
this.b11.MinimumSize = new System.Drawing.Size(1, 1);
|
b11.MinimumSize = new Size(1, 1);
|
||||||
this.b11.Name = "b11";
|
b11.Name = "b11";
|
||||||
this.b11.Radius = 2;
|
b11.Radius = 2;
|
||||||
this.b11.Size = new System.Drawing.Size(29, 29);
|
b11.Size = new Size(29, 29);
|
||||||
this.b11.Symbol = 0;
|
b11.Symbol = 0;
|
||||||
this.b11.TabIndex = 11;
|
b11.TabIndex = 11;
|
||||||
this.b11.Text = "0";
|
b11.Text = "0";
|
||||||
this.b11.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b11.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||||
//
|
//
|
||||||
// b10
|
// b10
|
||||||
//
|
//
|
||||||
this.b10.Cursor = System.Windows.Forms.Cursors.Hand;
|
b10.Cursor = Cursors.Hand;
|
||||||
this.b10.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b10.Font = new Font("宋体", 12F);
|
||||||
this.b10.Location = new System.Drawing.Point(369, 4);
|
b10.Location = new Point(369, 4);
|
||||||
this.b10.MinimumSize = new System.Drawing.Size(1, 1);
|
b10.MinimumSize = new Size(1, 1);
|
||||||
this.b10.Name = "b10";
|
b10.Name = "b10";
|
||||||
this.b10.Radius = 2;
|
b10.Radius = 2;
|
||||||
this.b10.Size = new System.Drawing.Size(29, 29);
|
b10.Size = new Size(29, 29);
|
||||||
this.b10.Symbol = 0;
|
b10.Symbol = 0;
|
||||||
this.b10.TabIndex = 10;
|
b10.TabIndex = 10;
|
||||||
this.b10.Text = "0";
|
b10.Text = "0";
|
||||||
this.b10.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b10.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||||
//
|
//
|
||||||
// b9
|
// b9
|
||||||
//
|
//
|
||||||
this.b9.Cursor = System.Windows.Forms.Cursors.Hand;
|
b9.Cursor = Cursors.Hand;
|
||||||
this.b9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b9.Font = new Font("宋体", 12F);
|
||||||
this.b9.Location = new System.Drawing.Point(337, 4);
|
b9.Location = new Point(337, 4);
|
||||||
this.b9.MinimumSize = new System.Drawing.Size(1, 1);
|
b9.MinimumSize = new Size(1, 1);
|
||||||
this.b9.Name = "b9";
|
b9.Name = "b9";
|
||||||
this.b9.Radius = 2;
|
b9.Radius = 2;
|
||||||
this.b9.Size = new System.Drawing.Size(29, 29);
|
b9.Size = new Size(29, 29);
|
||||||
this.b9.Symbol = 0;
|
b9.Symbol = 0;
|
||||||
this.b9.TabIndex = 9;
|
b9.TabIndex = 9;
|
||||||
this.b9.Text = "0";
|
b9.Text = "0";
|
||||||
this.b9.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b9.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||||
//
|
//
|
||||||
// b8
|
// b8
|
||||||
//
|
//
|
||||||
this.b8.Cursor = System.Windows.Forms.Cursors.Hand;
|
b8.Cursor = Cursors.Hand;
|
||||||
this.b8.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b8.Font = new Font("宋体", 12F);
|
||||||
this.b8.Location = new System.Drawing.Point(305, 4);
|
b8.Location = new Point(305, 4);
|
||||||
this.b8.MinimumSize = new System.Drawing.Size(1, 1);
|
b8.MinimumSize = new Size(1, 1);
|
||||||
this.b8.Name = "b8";
|
b8.Name = "b8";
|
||||||
this.b8.Radius = 2;
|
b8.Radius = 2;
|
||||||
this.b8.Size = new System.Drawing.Size(29, 29);
|
b8.Size = new Size(29, 29);
|
||||||
this.b8.Symbol = 0;
|
b8.Symbol = 0;
|
||||||
this.b8.TabIndex = 8;
|
b8.TabIndex = 8;
|
||||||
this.b8.Text = "0";
|
b8.Text = "0";
|
||||||
this.b8.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b8.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||||
//
|
//
|
||||||
// b16
|
// b16
|
||||||
//
|
//
|
||||||
this.b16.Cursor = System.Windows.Forms.Cursors.Hand;
|
b16.Cursor = Cursors.Hand;
|
||||||
this.b16.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b16.Font = new Font("宋体", 10.5F);
|
||||||
this.b16.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
|
b16.ImageAlign = ContentAlignment.MiddleRight;
|
||||||
this.b16.Location = new System.Drawing.Point(561, 4);
|
b16.Location = new Point(561, 4);
|
||||||
this.b16.MinimumSize = new System.Drawing.Size(1, 1);
|
b16.MinimumSize = new Size(1, 1);
|
||||||
this.b16.Name = "b16";
|
b16.Name = "b16";
|
||||||
this.b16.Padding = new System.Windows.Forms.Padding(6, 0, 5, 0);
|
b16.Padding = new Padding(6, 0, 5, 0);
|
||||||
this.b16.Radius = 2;
|
b16.Radius = 2;
|
||||||
this.b16.Size = new System.Drawing.Size(32, 32);
|
b16.Size = new Size(32, 32);
|
||||||
this.b16.Symbol = 61701;
|
b16.Symbol = 61701;
|
||||||
this.b16.TabIndex = 16;
|
b16.TabIndex = 16;
|
||||||
this.b16.TagString = ">";
|
b16.TagString = ">";
|
||||||
this.b16.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
b16.TextAlign = ContentAlignment.MiddleLeft;
|
||||||
this.b16.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b16.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||||
//
|
//
|
||||||
// UIMiniPagination
|
// UIMiniPagination
|
||||||
//
|
//
|
||||||
this.Controls.Add(this.b16);
|
Controls.Add(b16);
|
||||||
this.Controls.Add(this.b15);
|
Controls.Add(b15);
|
||||||
this.Controls.Add(this.b14);
|
Controls.Add(b14);
|
||||||
this.Controls.Add(this.b13);
|
Controls.Add(b13);
|
||||||
this.Controls.Add(this.b12);
|
Controls.Add(b12);
|
||||||
this.Controls.Add(this.b11);
|
Controls.Add(b11);
|
||||||
this.Controls.Add(this.b10);
|
Controls.Add(b10);
|
||||||
this.Controls.Add(this.b9);
|
Controls.Add(b9);
|
||||||
this.Controls.Add(this.b8);
|
Controls.Add(b8);
|
||||||
this.Controls.Add(this.b7);
|
Controls.Add(b7);
|
||||||
this.Controls.Add(this.b6);
|
Controls.Add(b6);
|
||||||
this.Controls.Add(this.b5);
|
Controls.Add(b5);
|
||||||
this.Controls.Add(this.b4);
|
Controls.Add(b4);
|
||||||
this.Controls.Add(this.b3);
|
Controls.Add(b3);
|
||||||
this.Controls.Add(this.b2);
|
Controls.Add(b2);
|
||||||
this.Controls.Add(this.b1);
|
Controls.Add(b1);
|
||||||
this.Controls.Add(this.b0);
|
Controls.Add(b0);
|
||||||
this.Name = "UIMiniPagination";
|
Name = "UIMiniPagination";
|
||||||
this.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
|
RadiusSides = UICornerRadiusSides.None;
|
||||||
this.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
|
RectSides = ToolStripStatusLabelBorderSides.None;
|
||||||
this.Size = new System.Drawing.Size(641, 40);
|
ShowBuiltInResources = true;
|
||||||
this.ResumeLayout(false);
|
Size = new Size(641, 40);
|
||||||
|
ResumeLayout(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion InitializeComponent
|
#endregion InitializeComponent
|
||||||
|
@ -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">
|
||||||
|
@ -267,9 +267,10 @@ namespace Sunny.UI
|
|||||||
//
|
//
|
||||||
edit.Leave += edit_Leave;
|
edit.Leave += edit_Leave;
|
||||||
//
|
//
|
||||||
// UIKeyBoardTextBox
|
// UINumPadTextBox
|
||||||
//
|
//
|
||||||
Name = "UIKeyBoardTextBox";
|
Name = "UINumPadTextBox";
|
||||||
|
ShowBuiltInResources = true;
|
||||||
ButtonClick += UIKeyBoardTextBox_ButtonClick;
|
ButtonClick += UIKeyBoardTextBox_ButtonClick;
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
|
@ -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">
|
||||||
|
@ -647,6 +647,7 @@ namespace Sunny.UI
|
|||||||
edtPage.MinimumSize = new Size(1, 1);
|
edtPage.MinimumSize = new Size(1, 1);
|
||||||
edtPage.Name = "edtPage";
|
edtPage.Name = "edtPage";
|
||||||
edtPage.Padding = new Padding(5);
|
edtPage.Padding = new Padding(5);
|
||||||
|
edtPage.ShowBuiltInResources = true;
|
||||||
edtPage.ShowText = false;
|
edtPage.ShowText = false;
|
||||||
edtPage.Size = new Size(53, 29);
|
edtPage.Size = new Size(53, 29);
|
||||||
edtPage.TabIndex = 1;
|
edtPage.TabIndex = 1;
|
||||||
@ -723,6 +724,7 @@ namespace Sunny.UI
|
|||||||
Controls.Add(b0);
|
Controls.Add(b0);
|
||||||
Name = "UIPagination";
|
Name = "UIPagination";
|
||||||
RectSides = ToolStripStatusLabelBorderSides.None;
|
RectSides = ToolStripStatusLabelBorderSides.None;
|
||||||
|
ShowBuiltInResources = true;
|
||||||
Size = new Size(1139, 35);
|
Size = new Size(1139, 35);
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
|
@ -86,6 +86,9 @@ namespace Sunny.UI
|
|||||||
edit.MouseMove += Edit_MouseMove;
|
edit.MouseMove += Edit_MouseMove;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Browsable(false)]
|
||||||
|
public override string[] FormTranslatorProperties { get; }
|
||||||
|
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
@ -527,6 +530,7 @@ namespace Sunny.UI
|
|||||||
bar.Location = new Point(247, 4);
|
bar.Location = new Point(247, 4);
|
||||||
bar.MinimumSize = new Size(1, 1);
|
bar.MinimumSize = new Size(1, 1);
|
||||||
bar.Name = "bar";
|
bar.Name = "bar";
|
||||||
|
bar.ShowBuiltInResources = true;
|
||||||
bar.Size = new Size(19, 173);
|
bar.Size = new Size(19, 173);
|
||||||
bar.TabIndex = 2;
|
bar.TabIndex = 2;
|
||||||
bar.Text = "uiScrollBar1";
|
bar.Text = "uiScrollBar1";
|
||||||
@ -538,6 +542,7 @@ namespace Sunny.UI
|
|||||||
FillColor = Color.White;
|
FillColor = Color.White;
|
||||||
Name = "UIRichTextBox";
|
Name = "UIRichTextBox";
|
||||||
Padding = new Padding(2);
|
Padding = new Padding(2);
|
||||||
|
ShowBuiltInResources = true;
|
||||||
FontChanged += UIRichTextBox_FontChanged;
|
FontChanged += UIRichTextBox_FontChanged;
|
||||||
SizeChanged += UIRichTextBox_SizeChanged;
|
SizeChanged += UIRichTextBox_SizeChanged;
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
|
@ -52,6 +52,9 @@ namespace Sunny.UI
|
|||||||
timer.Tick += Timer_Tick;
|
timer.Tick += Timer_Tick;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Browsable(false)]
|
||||||
|
public override string[] FormTranslatorProperties => ["Text"];
|
||||||
|
|
||||||
[DefaultValue(false), Description("是否滚动"), Category("SunnyUI")]
|
[DefaultValue(false), Description("是否滚动"), Category("SunnyUI")]
|
||||||
public bool Active
|
public bool Active
|
||||||
{
|
{
|
||||||
|
2
SunnyUI/Controls/UITextBox.Designer.cs
generated
2
SunnyUI/Controls/UITextBox.Designer.cs
generated
@ -41,9 +41,9 @@
|
|||||||
Cursor = System.Windows.Forms.Cursors.IBeam;
|
Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||||
Name = "UITextBox";
|
Name = "UITextBox";
|
||||||
Padding = new System.Windows.Forms.Padding(5);
|
Padding = new System.Windows.Forms.Padding(5);
|
||||||
|
ShowBuiltInResources = true;
|
||||||
Size = new System.Drawing.Size(250, 29);
|
Size = new System.Drawing.Size(250, 29);
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -131,6 +131,7 @@ namespace Sunny.UI
|
|||||||
btn.Click += Btn_Click;
|
btn.Click += Btn_Click;
|
||||||
btn.Radius = 3;
|
btn.Radius = 3;
|
||||||
btn.SymbolOffset = new Point(-1, 1);
|
btn.SymbolOffset = new Point(-1, 1);
|
||||||
|
btn.ShowBuiltInResources = true;
|
||||||
|
|
||||||
edit.Invalidate();
|
edit.Invalidate();
|
||||||
Controls.Add(edit);
|
Controls.Add(edit);
|
||||||
@ -141,6 +142,7 @@ namespace Sunny.UI
|
|||||||
bar.Visible = false;
|
bar.Visible = false;
|
||||||
bar.ValueChanged += Bar_ValueChanged;
|
bar.ValueChanged += Bar_ValueChanged;
|
||||||
bar.MouseEnter += Bar_MouseEnter;
|
bar.MouseEnter += Bar_MouseEnter;
|
||||||
|
bar.ShowBuiltInResources = true;
|
||||||
TextAlignment = ContentAlignment.MiddleLeft;
|
TextAlignment = ContentAlignment.MiddleLeft;
|
||||||
|
|
||||||
lastEditHeight = edit.Height;
|
lastEditHeight = edit.Height;
|
||||||
@ -151,6 +153,9 @@ namespace Sunny.UI
|
|||||||
TextAlignmentChange += UITextBox_TextAlignmentChange;
|
TextAlignmentChange += UITextBox_TextAlignmentChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Browsable(false)]
|
||||||
|
public override string[] FormTranslatorProperties { get; }
|
||||||
|
|
||||||
private void Edit_FontChanged(object sender, EventArgs e)
|
private void Edit_FontChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!edit.Multiline)
|
if (!edit.Multiline)
|
||||||
|
@ -36,21 +36,21 @@ namespace Sunny.UI
|
|||||||
{
|
{
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// UITimePicker
|
// UITimePicker
|
||||||
//
|
//
|
||||||
this.Name = "UITimePicker";
|
Name = "UITimePicker";
|
||||||
this.Padding = new Padding(0, 0, 30, 0);
|
ShowBuiltInResources = true;
|
||||||
this.SymbolDropDown = 61555;
|
SymbolDropDown = 61555;
|
||||||
this.SymbolNormal = 61555;
|
SymbolNormal = 61555;
|
||||||
this.ButtonClick += this.UITimePicker_ButtonClick;
|
ButtonClick += UITimePicker_ButtonClick;
|
||||||
this.ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
this.PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
public override string[] FormTranslatorProperties { get; }
|
public override string[] FormTranslatorProperties => ["TimeFormat"];
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 必需的设计器变量。
|
/// 必需的设计器变量。
|
||||||
|
232
SunnyUI/Controls/UITransfer.Designer.cs
generated
232
SunnyUI/Controls/UITransfer.Designer.cs
generated
@ -30,139 +30,147 @@ namespace Sunny.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.b1 = new Sunny.UI.UISymbolButton();
|
b1 = new UISymbolButton();
|
||||||
this.b2 = new Sunny.UI.UISymbolButton();
|
b2 = new UISymbolButton();
|
||||||
this.b3 = new Sunny.UI.UISymbolButton();
|
b3 = new UISymbolButton();
|
||||||
this.b4 = new Sunny.UI.UISymbolButton();
|
b4 = new UISymbolButton();
|
||||||
this.l1 = new Sunny.UI.UIListBox();
|
l1 = new UIListBox();
|
||||||
this.l2 = new Sunny.UI.UIListBox();
|
l2 = new UIListBox();
|
||||||
this.SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// b1
|
// b1
|
||||||
//
|
//
|
||||||
this.b1.BackColor = System.Drawing.Color.Transparent;
|
b1.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.b1.Cursor = System.Windows.Forms.Cursors.Hand;
|
b1.Cursor = Cursors.Hand;
|
||||||
this.b1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b1.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
this.b1.Location = new System.Drawing.Point(228, 85);
|
b1.Location = new System.Drawing.Point(228, 85);
|
||||||
this.b1.Margin = new System.Windows.Forms.Padding(0);
|
b1.Margin = new Padding(0);
|
||||||
this.b1.MinimumSize = new System.Drawing.Size(1, 1);
|
b1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
this.b1.Name = "b1";
|
b1.Name = "b1";
|
||||||
this.b1.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
|
b1.Padding = new Padding(28, 0, 0, 0);
|
||||||
this.b1.Size = new System.Drawing.Size(44, 32);
|
b1.ShowBuiltInResources = true;
|
||||||
this.b1.Symbol = 61697;
|
b1.Size = new System.Drawing.Size(44, 32);
|
||||||
this.b1.TabIndex = 3;
|
b1.Symbol = 61697;
|
||||||
this.b1.TipsText = null;
|
b1.TabIndex = 3;
|
||||||
this.b1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b1.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||||||
this.b1.Click += new System.EventHandler(this.b1_Click);
|
b1.TipsText = null;
|
||||||
|
b1.Click += b1_Click;
|
||||||
//
|
//
|
||||||
// b2
|
// b2
|
||||||
//
|
//
|
||||||
this.b2.BackColor = System.Drawing.Color.Transparent;
|
b2.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.b2.Cursor = System.Windows.Forms.Cursors.Hand;
|
b2.Cursor = Cursors.Hand;
|
||||||
this.b2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b2.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
this.b2.Location = new System.Drawing.Point(228, 135);
|
b2.Location = new System.Drawing.Point(228, 135);
|
||||||
this.b2.Margin = new System.Windows.Forms.Padding(0);
|
b2.Margin = new Padding(0);
|
||||||
this.b2.MinimumSize = new System.Drawing.Size(1, 1);
|
b2.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
this.b2.Name = "b2";
|
b2.Name = "b2";
|
||||||
this.b2.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
|
b2.Padding = new Padding(28, 0, 0, 0);
|
||||||
this.b2.Size = new System.Drawing.Size(44, 32);
|
b2.ShowBuiltInResources = true;
|
||||||
this.b2.Symbol = 61701;
|
b2.Size = new System.Drawing.Size(44, 32);
|
||||||
this.b2.TabIndex = 4;
|
b2.Symbol = 61701;
|
||||||
this.b2.TipsText = null;
|
b2.TabIndex = 4;
|
||||||
this.b2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b2.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||||||
this.b2.Click += new System.EventHandler(this.b2_Click);
|
b2.TipsText = null;
|
||||||
|
b2.Click += b2_Click;
|
||||||
//
|
//
|
||||||
// b3
|
// b3
|
||||||
//
|
//
|
||||||
this.b3.BackColor = System.Drawing.Color.Transparent;
|
b3.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.b3.Cursor = System.Windows.Forms.Cursors.Hand;
|
b3.Cursor = Cursors.Hand;
|
||||||
this.b3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b3.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
this.b3.Location = new System.Drawing.Point(228, 183);
|
b3.Location = new System.Drawing.Point(228, 183);
|
||||||
this.b3.Margin = new System.Windows.Forms.Padding(0);
|
b3.Margin = new Padding(0);
|
||||||
this.b3.MinimumSize = new System.Drawing.Size(1, 1);
|
b3.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
this.b3.Name = "b3";
|
b3.Name = "b3";
|
||||||
this.b3.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
|
b3.Padding = new Padding(28, 0, 0, 0);
|
||||||
this.b3.Size = new System.Drawing.Size(44, 32);
|
b3.ShowBuiltInResources = true;
|
||||||
this.b3.Symbol = 61700;
|
b3.Size = new System.Drawing.Size(44, 32);
|
||||||
this.b3.TabIndex = 5;
|
b3.Symbol = 61700;
|
||||||
this.b3.TipsText = null;
|
b3.TabIndex = 5;
|
||||||
this.b3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b3.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||||||
this.b3.Click += new System.EventHandler(this.b3_Click);
|
b3.TipsText = null;
|
||||||
|
b3.Click += b3_Click;
|
||||||
//
|
//
|
||||||
// b4
|
// b4
|
||||||
//
|
//
|
||||||
this.b4.BackColor = System.Drawing.Color.Transparent;
|
b4.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.b4.Cursor = System.Windows.Forms.Cursors.Hand;
|
b4.Cursor = Cursors.Hand;
|
||||||
this.b4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
b4.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
this.b4.Location = new System.Drawing.Point(228, 233);
|
b4.Location = new System.Drawing.Point(228, 233);
|
||||||
this.b4.Margin = new System.Windows.Forms.Padding(0);
|
b4.Margin = new Padding(0);
|
||||||
this.b4.MinimumSize = new System.Drawing.Size(1, 1);
|
b4.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
this.b4.Name = "b4";
|
b4.Name = "b4";
|
||||||
this.b4.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
|
b4.Padding = new Padding(28, 0, 0, 0);
|
||||||
this.b4.Size = new System.Drawing.Size(44, 32);
|
b4.ShowBuiltInResources = true;
|
||||||
this.b4.Symbol = 61696;
|
b4.Size = new System.Drawing.Size(44, 32);
|
||||||
this.b4.TabIndex = 6;
|
b4.Symbol = 61696;
|
||||||
this.b4.TipsText = null;
|
b4.TabIndex = 6;
|
||||||
this.b4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
b4.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||||||
this.b4.Click += new System.EventHandler(this.b4_Click);
|
b4.TipsText = null;
|
||||||
|
b4.Click += b4_Click;
|
||||||
//
|
//
|
||||||
// l1
|
// l1
|
||||||
//
|
//
|
||||||
this.l1.BackColor = System.Drawing.Color.Transparent;
|
l1.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.l1.Dock = System.Windows.Forms.DockStyle.Left;
|
l1.Dock = DockStyle.Left;
|
||||||
this.l1.FillColor = System.Drawing.Color.White;
|
l1.FillColor = System.Drawing.Color.White;
|
||||||
this.l1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
l1.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
this.l1.Location = new System.Drawing.Point(1, 1);
|
l1.HoverColor = System.Drawing.Color.FromArgb(155, 200, 255);
|
||||||
this.l1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
l1.ItemSelectForeColor = System.Drawing.Color.White;
|
||||||
this.l1.MinimumSize = new System.Drawing.Size(1, 1);
|
l1.Location = new System.Drawing.Point(1, 1);
|
||||||
this.l1.Name = "l1";
|
l1.Margin = new Padding(4, 5, 4, 5);
|
||||||
this.l1.Padding = new System.Windows.Forms.Padding(2);
|
l1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
this.l1.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
|
l1.Name = "l1";
|
||||||
this.l1.ShowText = false;
|
l1.Padding = new Padding(2);
|
||||||
this.l1.Size = new System.Drawing.Size(210, 348);
|
l1.SelectionMode = SelectionMode.MultiExtended;
|
||||||
this.l1.TabIndex = 7;
|
l1.ShowBuiltInResources = true;
|
||||||
this.l1.Text = null;
|
l1.ShowText = false;
|
||||||
this.l1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
l1.Size = new System.Drawing.Size(210, 348);
|
||||||
this.l1.Click += new System.EventHandler(this.l1_ItemClick);
|
l1.TabIndex = 7;
|
||||||
this.l1.DoubleClick += new System.EventHandler(this.l1_DoubleClick);
|
l1.Text = null;
|
||||||
|
l1.Click += l1_ItemClick;
|
||||||
|
l1.DoubleClick += l1_DoubleClick;
|
||||||
//
|
//
|
||||||
// l2
|
// l2
|
||||||
//
|
//
|
||||||
this.l2.BackColor = System.Drawing.Color.Transparent;
|
l2.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.l2.Dock = System.Windows.Forms.DockStyle.Right;
|
l2.Dock = DockStyle.Right;
|
||||||
this.l2.FillColor = System.Drawing.Color.White;
|
l2.FillColor = System.Drawing.Color.White;
|
||||||
this.l2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
l2.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
this.l2.Location = new System.Drawing.Point(289, 1);
|
l2.HoverColor = System.Drawing.Color.FromArgb(155, 200, 255);
|
||||||
this.l2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
l2.ItemSelectForeColor = System.Drawing.Color.White;
|
||||||
this.l2.MinimumSize = new System.Drawing.Size(1, 1);
|
l2.Location = new System.Drawing.Point(289, 1);
|
||||||
this.l2.Name = "l2";
|
l2.Margin = new Padding(4, 5, 4, 5);
|
||||||
this.l2.Padding = new System.Windows.Forms.Padding(2);
|
l2.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
this.l2.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
|
l2.Name = "l2";
|
||||||
this.l2.ShowText = false;
|
l2.Padding = new Padding(2);
|
||||||
this.l2.Size = new System.Drawing.Size(210, 348);
|
l2.SelectionMode = SelectionMode.MultiExtended;
|
||||||
this.l2.TabIndex = 8;
|
l2.ShowBuiltInResources = true;
|
||||||
this.l2.Text = null;
|
l2.ShowText = false;
|
||||||
this.l2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
|
l2.Size = new System.Drawing.Size(210, 348);
|
||||||
this.l2.Click += new System.EventHandler(this.l2_ItemClick);
|
l2.TabIndex = 8;
|
||||||
this.l2.DoubleClick += new System.EventHandler(this.l2_DoubleClick);
|
l2.Text = null;
|
||||||
|
l2.Click += l2_ItemClick;
|
||||||
|
l2.DoubleClick += l2_DoubleClick;
|
||||||
//
|
//
|
||||||
// UITransfer
|
// UITransfer
|
||||||
//
|
//
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
AutoScaleMode = AutoScaleMode.None;
|
||||||
this.Controls.Add(this.l2);
|
Controls.Add(l2);
|
||||||
this.Controls.Add(this.l1);
|
Controls.Add(l1);
|
||||||
this.Controls.Add(this.b4);
|
Controls.Add(b4);
|
||||||
this.Controls.Add(this.b3);
|
Controls.Add(b3);
|
||||||
this.Controls.Add(this.b2);
|
Controls.Add(b2);
|
||||||
this.Controls.Add(this.b1);
|
Controls.Add(b1);
|
||||||
this.Margin = new System.Windows.Forms.Padding(7, 9, 7, 9);
|
Margin = new Padding(7, 9, 7, 9);
|
||||||
this.Name = "UITransfer";
|
Name = "UITransfer";
|
||||||
this.Padding = new System.Windows.Forms.Padding(1);
|
Padding = new Padding(1);
|
||||||
this.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
|
RadiusSides = UICornerRadiusSides.None;
|
||||||
this.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
|
RectSides = ToolStripStatusLabelBorderSides.None;
|
||||||
this.Size = new System.Drawing.Size(500, 350);
|
ShowBuiltInResources = true;
|
||||||
this.ResumeLayout(false);
|
Size = new System.Drawing.Size(500, 350);
|
||||||
|
ResumeLayout(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -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">
|
||||||
|
@ -934,14 +934,20 @@ namespace Sunny.UI
|
|||||||
view.BackColor = Color.White;
|
view.BackColor = Color.White;
|
||||||
view.BorderStyle = BorderStyle.None;
|
view.BorderStyle = BorderStyle.None;
|
||||||
view.DrawMode = TreeViewDrawMode.OwnerDrawAll;
|
view.DrawMode = TreeViewDrawMode.OwnerDrawAll;
|
||||||
|
view.FillColor = Color.White;
|
||||||
view.ForeColor = Color.FromArgb(48, 48, 48);
|
view.ForeColor = Color.FromArgb(48, 48, 48);
|
||||||
view.FullRowSelect = true;
|
view.FullRowSelect = true;
|
||||||
view.ItemHeight = 28;
|
view.ItemHeight = 28;
|
||||||
view.Location = new Point(2, 2);
|
view.Location = new Point(2, 2);
|
||||||
view.Name = "view";
|
view.Name = "view";
|
||||||
|
view.NodeClickChangeCheckBoxes = false;
|
||||||
|
view.SelectedColor = Color.FromArgb(80, 160, 255);
|
||||||
|
view.SelectedForeColor = Color.White;
|
||||||
view.ShowLines = false;
|
view.ShowLines = false;
|
||||||
|
view.ShowLinesEx = false;
|
||||||
view.Size = new Size(266, 176);
|
view.Size = new Size(266, 176);
|
||||||
view.TabIndex = 0;
|
view.TabIndex = 0;
|
||||||
|
view.TreeNodeStateSync = true;
|
||||||
view.AfterCollapse += view_AfterCollapse;
|
view.AfterCollapse += view_AfterCollapse;
|
||||||
view.AfterExpand += view_AfterExpand;
|
view.AfterExpand += view_AfterExpand;
|
||||||
view.DrawNode += view_DrawNode;
|
view.DrawNode += view_DrawNode;
|
||||||
@ -950,7 +956,9 @@ namespace Sunny.UI
|
|||||||
//
|
//
|
||||||
Bar.Font = new Font("宋体", 12F);
|
Bar.Font = new Font("宋体", 12F);
|
||||||
Bar.Location = new Point(247, 3);
|
Bar.Location = new Point(247, 3);
|
||||||
|
Bar.MinimumSize = new Size(1, 1);
|
||||||
Bar.Name = "Bar";
|
Bar.Name = "Bar";
|
||||||
|
Bar.ShowBuiltInResources = true;
|
||||||
Bar.Size = new Size(19, 173);
|
Bar.Size = new Size(19, 173);
|
||||||
Bar.Style = UIStyle.Custom;
|
Bar.Style = UIStyle.Custom;
|
||||||
Bar.StyleCustomMode = true;
|
Bar.StyleCustomMode = true;
|
||||||
@ -962,6 +970,7 @@ namespace Sunny.UI
|
|||||||
//
|
//
|
||||||
HBar.Font = new Font("宋体", 12F);
|
HBar.Font = new Font("宋体", 12F);
|
||||||
HBar.Location = new Point(247, 3);
|
HBar.Location = new Point(247, 3);
|
||||||
|
HBar.MinimumSize = new Size(1, 1);
|
||||||
HBar.Name = "HBar";
|
HBar.Name = "HBar";
|
||||||
HBar.Size = new Size(173, 19);
|
HBar.Size = new Size(173, 19);
|
||||||
HBar.Style = UIStyle.Custom;
|
HBar.Style = UIStyle.Custom;
|
||||||
@ -970,12 +979,14 @@ namespace Sunny.UI
|
|||||||
HBar.Visible = false;
|
HBar.Visible = false;
|
||||||
HBar.ValueChanged += HBar_ValueChanged;
|
HBar.ValueChanged += HBar_ValueChanged;
|
||||||
//
|
//
|
||||||
// UITreeViewEx
|
// UITreeView
|
||||||
//
|
//
|
||||||
Controls.Add(Bar);
|
Controls.Add(Bar);
|
||||||
Controls.Add(HBar);
|
Controls.Add(HBar);
|
||||||
Controls.Add(view);
|
Controls.Add(view);
|
||||||
FillColor = Color.White;
|
FillColor = Color.White;
|
||||||
|
Name = "UITreeView";
|
||||||
|
ShowBuiltInResources = true;
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,23 +160,6 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//protected bool IsDesignMode
|
|
||||||
//{
|
|
||||||
// get
|
|
||||||
// {
|
|
||||||
// if (LicenseManager.UsageMode == LicenseUsageMode.Designtime)
|
|
||||||
// {
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
// else if (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv")
|
|
||||||
// {
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
private ToolStripStatusLabelBorderSides _rectSides = ToolStripStatusLabelBorderSides.All;
|
private ToolStripStatusLabelBorderSides _rectSides = ToolStripStatusLabelBorderSides.All;
|
||||||
|
|
||||||
[DefaultValue(ToolStripStatusLabelBorderSides.All), Description("边框显示位置"), Category("SunnyUI")]
|
[DefaultValue(ToolStripStatusLabelBorderSides.All), Description("边框显示位置"), Category("SunnyUI")]
|
||||||
|
@ -24,9 +24,11 @@ using System;
|
|||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Design;
|
using System.Drawing.Design;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Sunny.UI
|
namespace Sunny.UI
|
||||||
@ -145,10 +147,13 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
public void Render()
|
public void Render()
|
||||||
{
|
{
|
||||||
if (!DesignMode && UIStyles.Style.IsValid())
|
if (DesignMode) return;
|
||||||
{
|
|
||||||
|
if (UIStyles.Style.IsValid())
|
||||||
SetInheritedStyle(UIStyles.Style);
|
SetInheritedStyle(UIStyles.Style);
|
||||||
}
|
|
||||||
|
if (!ShowBuiltInResources)
|
||||||
|
Translate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SetInheritedStyle(UIStyle style)
|
public virtual void SetInheritedStyle(UIStyle style)
|
||||||
@ -623,13 +628,10 @@ namespace Sunny.UI
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
bool ReturnFlag = DesignMode;
|
if (DesignMode) return true;
|
||||||
if (LicenseManager.UsageMode == LicenseUsageMode.Designtime)
|
if (LicenseManager.UsageMode == LicenseUsageMode.Designtime) return true;
|
||||||
ReturnFlag = true;
|
if (Process.GetCurrentProcess().ProcessName == "devenv") return true;
|
||||||
else if (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv")
|
return false;
|
||||||
ReturnFlag = true;
|
|
||||||
|
|
||||||
return ReturnFlag;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1064,18 +1066,21 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
#endregion IFrame实现
|
#endregion IFrame实现
|
||||||
|
|
||||||
|
[DefaultValue(false)]
|
||||||
|
[Description("控件是否显示多语内置资源"), Category("SunnyUI")]
|
||||||
|
public bool ShowBuiltInResources { get; set; } = false;
|
||||||
|
|
||||||
public virtual void Translate()
|
public virtual void Translate()
|
||||||
{
|
{
|
||||||
var controls = this.GetInterfaceControls<ITranslate>(true);
|
if (IsDesignMode) return;
|
||||||
|
|
||||||
|
var controls = this.GetInterfaceControls<ITranslate>(true).Where(p => p is not UIPage);
|
||||||
foreach (var control in controls)
|
foreach (var control in controls)
|
||||||
{
|
{
|
||||||
if (control is not UIPage)
|
control.Translate();
|
||||||
control.Translate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SelectedPage?.Translate();
|
SelectedPage?.Translate();
|
||||||
|
|
||||||
if (IsDesignMode) return;
|
|
||||||
this.TranslateOther();
|
this.TranslateOther();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
5
SunnyUI/Forms/UIEditForm.Designer.cs
generated
5
SunnyUI/Forms/UIEditForm.Designer.cs
generated
@ -62,11 +62,13 @@
|
|||||||
btnCancel.MinimumSize = new System.Drawing.Size(1, 1);
|
btnCancel.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
btnCancel.Name = "btnCancel";
|
btnCancel.Name = "btnCancel";
|
||||||
btnCancel.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
|
btnCancel.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
|
||||||
|
btnCancel.ShowBuiltInResources = true;
|
||||||
btnCancel.ShowFocusColor = true;
|
btnCancel.ShowFocusColor = true;
|
||||||
btnCancel.Size = new System.Drawing.Size(100, 35);
|
btnCancel.Size = new System.Drawing.Size(100, 35);
|
||||||
btnCancel.Symbol = 361453;
|
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, 134);
|
||||||
btnCancel.TipsText = null;
|
btnCancel.TipsText = null;
|
||||||
btnCancel.Click += btnCancel_Click;
|
btnCancel.Click += btnCancel_Click;
|
||||||
//
|
//
|
||||||
@ -80,11 +82,12 @@
|
|||||||
btnOK.MinimumSize = new System.Drawing.Size(1, 1);
|
btnOK.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
btnOK.Name = "btnOK";
|
btnOK.Name = "btnOK";
|
||||||
btnOK.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
|
btnOK.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
|
||||||
|
btnOK.ShowBuiltInResources = true;
|
||||||
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, 134);
|
||||||
btnOK.TipsText = null;
|
btnOK.TipsText = null;
|
||||||
btnOK.Click += btnOK_Click;
|
btnOK.Click += btnOK_Click;
|
||||||
//
|
//
|
||||||
|
1
SunnyUI/Forms/UIInputForm.Designer.cs
generated
1
SunnyUI/Forms/UIInputForm.Designer.cs
generated
@ -90,6 +90,7 @@
|
|||||||
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);
|
||||||
|
ShowBuiltInResources = true;
|
||||||
Style = UIStyle.Custom;
|
Style = UIStyle.Custom;
|
||||||
Text = "输入";
|
Text = "输入";
|
||||||
ZoomScaleRect = new System.Drawing.Rectangle(15, 15, 473, 182);
|
ZoomScaleRect = new System.Drawing.Rectangle(15, 15, 473, 182);
|
||||||
|
2
SunnyUI/Forms/UILoginForm.Designer.cs
generated
2
SunnyUI/Forms/UILoginForm.Designer.cs
generated
@ -113,7 +113,6 @@
|
|||||||
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.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||||||
@ -210,6 +209,7 @@
|
|||||||
MinimumSize = new System.Drawing.Size(750, 450);
|
MinimumSize = new System.Drawing.Size(750, 450);
|
||||||
Name = "UILoginForm";
|
Name = "UILoginForm";
|
||||||
Padding = new System.Windows.Forms.Padding(0);
|
Padding = new System.Windows.Forms.Padding(0);
|
||||||
|
ShowBuiltInResources = true;
|
||||||
ShowIcon = false;
|
ShowIcon = false;
|
||||||
ShowInTaskbar = false;
|
ShowInTaskbar = false;
|
||||||
ShowTitle = false;
|
ShowTitle = false;
|
||||||
|
10
SunnyUI/Forms/UIMessageForm.Designer.cs
generated
10
SunnyUI/Forms/UIMessageForm.Designer.cs
generated
@ -39,7 +39,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(224, 220);
|
btnCancel.Location = new System.Drawing.Point(224, 220);
|
||||||
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);
|
||||||
@ -48,6 +48,7 @@
|
|||||||
btnCancel.Style = UIStyle.Custom;
|
btnCancel.Style = UIStyle.Custom;
|
||||||
btnCancel.TabIndex = 6;
|
btnCancel.TabIndex = 6;
|
||||||
btnCancel.Text = "取消";
|
btnCancel.Text = "取消";
|
||||||
|
btnCancel.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||||||
btnCancel.TipsText = null;
|
btnCancel.TipsText = null;
|
||||||
btnCancel.Click += btnCancel_Click;
|
btnCancel.Click += btnCancel_Click;
|
||||||
//
|
//
|
||||||
@ -55,7 +56,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(2, 220);
|
btnOK.Location = new System.Drawing.Point(2, 220);
|
||||||
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);
|
||||||
@ -64,6 +65,7 @@
|
|||||||
btnOK.Style = UIStyle.Custom;
|
btnOK.Style = UIStyle.Custom;
|
||||||
btnOK.TabIndex = 5;
|
btnOK.TabIndex = 5;
|
||||||
btnOK.Text = "确定";
|
btnOK.Text = "确定";
|
||||||
|
btnOK.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||||||
btnOK.TipsText = null;
|
btnOK.TipsText = null;
|
||||||
btnOK.Click += btnOK_Click;
|
btnOK.Click += btnOK_Click;
|
||||||
//
|
//
|
||||||
@ -71,7 +73,7 @@
|
|||||||
//
|
//
|
||||||
lbMsg.BackColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
lbMsg.BackColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||||
lbMsg.FillColor = System.Drawing.Color.White;
|
lbMsg.FillColor = System.Drawing.Color.White;
|
||||||
lbMsg.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
lbMsg.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
lbMsg.Location = new System.Drawing.Point(14, 50);
|
lbMsg.Location = new System.Drawing.Point(14, 50);
|
||||||
lbMsg.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
lbMsg.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
lbMsg.MinimumSize = new System.Drawing.Size(1, 1);
|
lbMsg.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
@ -80,7 +82,6 @@
|
|||||||
lbMsg.RadiusSides = UICornerRadiusSides.None;
|
lbMsg.RadiusSides = UICornerRadiusSides.None;
|
||||||
lbMsg.ReadOnly = true;
|
lbMsg.ReadOnly = true;
|
||||||
lbMsg.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
|
lbMsg.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
|
||||||
lbMsg.ScrollBarStyleInherited = false;
|
|
||||||
lbMsg.ShowText = false;
|
lbMsg.ShowText = false;
|
||||||
lbMsg.Size = new System.Drawing.Size(422, 158);
|
lbMsg.Size = new System.Drawing.Size(422, 158);
|
||||||
lbMsg.Style = UIStyle.Custom;
|
lbMsg.Style = UIStyle.Custom;
|
||||||
@ -103,6 +104,7 @@
|
|||||||
MaximizeBox = false;
|
MaximizeBox = false;
|
||||||
MinimizeBox = false;
|
MinimizeBox = false;
|
||||||
Name = "UIMessageForm";
|
Name = "UIMessageForm";
|
||||||
|
ShowBuiltInResources = true;
|
||||||
ShowIcon = false;
|
ShowIcon = false;
|
||||||
ShowInTaskbar = false;
|
ShowInTaskbar = false;
|
||||||
Text = "UIMsgBox";
|
Text = "UIMsgBox";
|
||||||
|
1
SunnyUI/Forms/UIMessageForm2.Designer.cs
generated
1
SunnyUI/Forms/UIMessageForm2.Designer.cs
generated
@ -88,6 +88,7 @@
|
|||||||
MaximizeBox = false;
|
MaximizeBox = false;
|
||||||
MinimizeBox = false;
|
MinimizeBox = false;
|
||||||
Name = "UIMessageForm2";
|
Name = "UIMessageForm2";
|
||||||
|
ShowBuiltInResources = true;
|
||||||
ShowIcon = false;
|
ShowIcon = false;
|
||||||
ShowInTaskbar = false;
|
ShowInTaskbar = false;
|
||||||
StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
||||||
|
3
SunnyUI/Forms/UIProcessIndicatorForm.Designer.cs
generated
3
SunnyUI/Forms/UIProcessIndicatorForm.Designer.cs
generated
@ -36,7 +36,7 @@
|
|||||||
// uiProgressIndicator1
|
// uiProgressIndicator1
|
||||||
//
|
//
|
||||||
uiProgressIndicator1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
uiProgressIndicator1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
||||||
uiProgressIndicator1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
uiProgressIndicator1.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
uiProgressIndicator1.Location = new System.Drawing.Point(5, 5);
|
uiProgressIndicator1.Location = new System.Drawing.Point(5, 5);
|
||||||
uiProgressIndicator1.MinimumSize = new System.Drawing.Size(1, 1);
|
uiProgressIndicator1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
uiProgressIndicator1.Name = "uiProgressIndicator1";
|
uiProgressIndicator1.Name = "uiProgressIndicator1";
|
||||||
@ -53,6 +53,7 @@
|
|||||||
Controls.Add(uiProgressIndicator1);
|
Controls.Add(uiProgressIndicator1);
|
||||||
Name = "UIProcessIndicatorForm";
|
Name = "UIProcessIndicatorForm";
|
||||||
Padding = new System.Windows.Forms.Padding(2, 0, 2, 2);
|
Padding = new System.Windows.Forms.Padding(2, 0, 2, 2);
|
||||||
|
ShowBuiltInResources = true;
|
||||||
ShowTitle = false;
|
ShowTitle = false;
|
||||||
Text = "UIProcessIndicatorForm";
|
Text = "UIProcessIndicatorForm";
|
||||||
ZoomScaleRect = new System.Drawing.Rectangle(15, 15, 800, 450);
|
ZoomScaleRect = new System.Drawing.Rectangle(15, 15, 800, 450);
|
||||||
|
3
SunnyUI/Forms/UISelectForm.Designer.cs
generated
3
SunnyUI/Forms/UISelectForm.Designer.cs
generated
@ -42,12 +42,10 @@
|
|||||||
// 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
|
||||||
//
|
//
|
||||||
@ -89,6 +87,7 @@
|
|||||||
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);
|
||||||
|
ShowBuiltInResources = true;
|
||||||
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);
|
||||||
|
5
SunnyUI/Forms/UIStatusForm.Designer.cs
generated
5
SunnyUI/Forms/UIStatusForm.Designer.cs
generated
@ -38,7 +38,7 @@
|
|||||||
//
|
//
|
||||||
labelDescription.AutoSize = true;
|
labelDescription.AutoSize = true;
|
||||||
labelDescription.BackColor = System.Drawing.Color.Transparent;
|
labelDescription.BackColor = System.Drawing.Color.Transparent;
|
||||||
labelDescription.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
labelDescription.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
labelDescription.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
|
labelDescription.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
|
||||||
labelDescription.Location = new System.Drawing.Point(32, 55);
|
labelDescription.Location = new System.Drawing.Point(32, 55);
|
||||||
labelDescription.Name = "labelDescription";
|
labelDescription.Name = "labelDescription";
|
||||||
@ -50,7 +50,7 @@
|
|||||||
// processBar
|
// processBar
|
||||||
//
|
//
|
||||||
processBar.FillColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
processBar.FillColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||||
processBar.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
processBar.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
processBar.Location = new System.Drawing.Point(32, 91);
|
processBar.Location = new System.Drawing.Point(32, 91);
|
||||||
processBar.MinimumSize = new System.Drawing.Size(70, 23);
|
processBar.MinimumSize = new System.Drawing.Size(70, 23);
|
||||||
processBar.Name = "processBar";
|
processBar.Name = "processBar";
|
||||||
@ -75,6 +75,7 @@
|
|||||||
MaximizeBox = false;
|
MaximizeBox = false;
|
||||||
MinimizeBox = false;
|
MinimizeBox = false;
|
||||||
Name = "UIStatusForm";
|
Name = "UIStatusForm";
|
||||||
|
ShowBuiltInResources = true;
|
||||||
ShowIcon = false;
|
ShowIcon = false;
|
||||||
Text = "提示";
|
Text = "提示";
|
||||||
TopMost = true;
|
TopMost = true;
|
||||||
|
5
SunnyUI/Forms/UIWaitForm.designer.cs
generated
5
SunnyUI/Forms/UIWaitForm.designer.cs
generated
@ -36,7 +36,7 @@
|
|||||||
//
|
//
|
||||||
labelDescription.AutoSize = true;
|
labelDescription.AutoSize = true;
|
||||||
labelDescription.BackColor = System.Drawing.Color.Transparent;
|
labelDescription.BackColor = System.Drawing.Color.Transparent;
|
||||||
labelDescription.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
labelDescription.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
labelDescription.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
|
labelDescription.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
|
||||||
labelDescription.Location = new System.Drawing.Point(32, 55);
|
labelDescription.Location = new System.Drawing.Point(32, 55);
|
||||||
labelDescription.Name = "labelDescription";
|
labelDescription.Name = "labelDescription";
|
||||||
@ -48,7 +48,7 @@
|
|||||||
// Bar
|
// Bar
|
||||||
//
|
//
|
||||||
Bar.FillColor = System.Drawing.Color.FromArgb(243, 249, 255);
|
Bar.FillColor = System.Drawing.Color.FromArgb(243, 249, 255);
|
||||||
Bar.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
Bar.Font = new System.Drawing.Font("宋体", 12F);
|
||||||
Bar.ForeColor = System.Drawing.Color.FromArgb(80, 160, 255);
|
Bar.ForeColor = System.Drawing.Color.FromArgb(80, 160, 255);
|
||||||
Bar.Location = new System.Drawing.Point(32, 91);
|
Bar.Location = new System.Drawing.Point(32, 91);
|
||||||
Bar.MinimumSize = new System.Drawing.Size(70, 23);
|
Bar.MinimumSize = new System.Drawing.Size(70, 23);
|
||||||
@ -69,6 +69,7 @@
|
|||||||
MaximizeBox = false;
|
MaximizeBox = false;
|
||||||
MinimizeBox = false;
|
MinimizeBox = false;
|
||||||
Name = "UIWaitForm";
|
Name = "UIWaitForm";
|
||||||
|
ShowBuiltInResources = true;
|
||||||
ShowIcon = false;
|
ShowIcon = false;
|
||||||
Text = "提示";
|
Text = "提示";
|
||||||
TopMost = true;
|
TopMost = true;
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Design;
|
using System.Drawing.Design;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
@ -299,12 +300,13 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
public void Render()
|
public void Render()
|
||||||
{
|
{
|
||||||
if (!DesignMode && UIStyles.Style.IsValid())
|
if (DesignMode) return;
|
||||||
{
|
|
||||||
SetInheritedStyle(UIStyles.Style);
|
|
||||||
}
|
|
||||||
|
|
||||||
Translate();
|
if (UIStyles.Style.IsValid())
|
||||||
|
SetInheritedStyle(UIStyles.Style);
|
||||||
|
|
||||||
|
if (!ShowBuiltInResources)
|
||||||
|
Translate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private int _symbolSize = 24;
|
private int _symbolSize = 24;
|
||||||
@ -1128,28 +1130,30 @@ namespace Sunny.UI
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
bool ReturnFlag = DesignMode;
|
if (DesignMode) return true;
|
||||||
if (LicenseManager.UsageMode == LicenseUsageMode.Designtime)
|
if (LicenseManager.UsageMode == LicenseUsageMode.Designtime) return true;
|
||||||
ReturnFlag = true;
|
if (Process.GetCurrentProcess().ProcessName == "devenv") return true;
|
||||||
else if (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv")
|
return false;
|
||||||
ReturnFlag = true;
|
|
||||||
|
|
||||||
return ReturnFlag;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public event OnReceiveParams ReceiveParams;
|
||||||
|
|
||||||
public virtual void Translate()
|
public virtual void Translate()
|
||||||
{
|
{
|
||||||
|
if (IsDesignMode) return;
|
||||||
|
|
||||||
var controls = this.GetInterfaceControls<ITranslate>(true);
|
var controls = this.GetInterfaceControls<ITranslate>(true);
|
||||||
foreach (var control in controls)
|
foreach (var control in controls)
|
||||||
{
|
{
|
||||||
control.Translate();
|
control.Translate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsDesignMode) return;
|
|
||||||
this.TranslateOther();
|
this.TranslateOther();
|
||||||
}
|
}
|
||||||
|
|
||||||
public event OnReceiveParams ReceiveParams;
|
[DefaultValue(false)]
|
||||||
|
[Description("控件是否显示多语内置资源"), Category("SunnyUI")]
|
||||||
|
public bool ShowBuiltInResources { get; set; } = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -68,12 +68,18 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
string thisFullName = form.GetType().FullName;
|
string thisFullName = form.GetType().FullName;
|
||||||
string section = "Info";
|
string section = "Info";
|
||||||
|
const string warning = "注意:请先关闭应用程序,然后再修改此文档。否则修改可能会应用程序生成代码覆盖。";
|
||||||
var formControls = form.GetInterfaceControls<IFormTranslator>(true, false).Where(p => p.FormTranslatorProperties != null);
|
var formControls = form.GetInterfaceControls<IFormTranslator>(true, false).Where(p => p.FormTranslatorProperties != null);
|
||||||
|
Dir.CreateDir(Dir.CurrentDir() + "Language");
|
||||||
IniFile ini = new IniFile(Dir.CurrentDir() + "Language\\" + thisFullName + ".ini", System.Text.Encoding.UTF8);
|
IniFile ini = new IniFile(Dir.CurrentDir() + "Language\\" + thisFullName + ".ini", System.Text.Encoding.UTF8);
|
||||||
ini.Write(section, "Warning", "注意:请先关闭应用程序,然后再修改此文档。否则修改可能会应用程序生成代码覆盖。");
|
if (ini.Read(section, "Warning", "") != warning)
|
||||||
ini.Write(section, "Information", "提示:此节为代码自动生成,无需修改。");
|
ini.Write(section, "Warning", warning);
|
||||||
ini.Write(section, UIStyles.CultureInfo.LCID.ToString() + ".DisplayName", UIStyles.CultureInfo.DisplayName);
|
string key = UIStyles.CultureInfo.LCID.ToString() + ".DisplayName";
|
||||||
ini.Write(section, UIStyles.CultureInfo.LCID.ToString() + ".EnglishName", UIStyles.CultureInfo.EnglishName);
|
if (ini.Read(section, key, "") != UIStyles.CultureInfo.DisplayName)
|
||||||
|
ini.Write(section, key, UIStyles.CultureInfo.DisplayName);
|
||||||
|
key = UIStyles.CultureInfo.LCID.ToString() + ".EnglishName";
|
||||||
|
if (ini.Read(section, key, "") != UIStyles.CultureInfo.EnglishName)
|
||||||
|
ini.Write(section, UIStyles.CultureInfo.LCID.ToString() + ".EnglishName", UIStyles.CultureInfo.EnglishName);
|
||||||
|
|
||||||
section = UIStyles.CultureInfo.LCID + ".Form";
|
section = UIStyles.CultureInfo.LCID + ".Form";
|
||||||
foreach (var control in formControls)
|
foreach (var control in formControls)
|
||||||
@ -87,8 +93,7 @@ namespace Sunny.UI
|
|||||||
PropertyInfo pt = ctrl.GetType().GetProperty(propertyName);
|
PropertyInfo pt = ctrl.GetType().GetProperty(propertyName);
|
||||||
if (pt == null || !pt.CanWrite) continue;
|
if (pt == null || !pt.CanWrite) continue;
|
||||||
|
|
||||||
string key = ctrl.Name + "." + propertyName;
|
key = ctrl.Name + "." + propertyName;
|
||||||
|
|
||||||
string langStr = ini.Read(section, key, "");
|
string langStr = ini.Read(section, key, "");
|
||||||
string ctrlStr = pt.GetValue(ctrl, null)?.ToString();
|
string ctrlStr = pt.GetValue(ctrl, null)?.ToString();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user