* 更改了两个控件基类的SetStyle方法,放到之类中去。

This commit is contained in:
Sunny 2021-04-16 15:45:58 +08:00
parent 7571edbb7c
commit b35b60860b
56 changed files with 567 additions and 180 deletions

View File

@ -1,8 +0,0 @@
;<!--配置文件-->
[Setup]
ImagePath=
TCPPort=0
APIPort=0
IP=111.1.1.1

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -28,54 +28,54 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.Windows.Forms.TreeNode treeNode61 = new System.Windows.Forms.TreeNode("节点0"); System.Windows.Forms.TreeNode treeNode29 = new System.Windows.Forms.TreeNode("节点0");
System.Windows.Forms.TreeNode treeNode62 = new System.Windows.Forms.TreeNode("节点1"); System.Windows.Forms.TreeNode treeNode30 = new System.Windows.Forms.TreeNode("节点1");
System.Windows.Forms.TreeNode treeNode63 = new System.Windows.Forms.TreeNode("节点2"); System.Windows.Forms.TreeNode treeNode31 = new System.Windows.Forms.TreeNode("节点2");
System.Windows.Forms.TreeNode treeNode64 = new System.Windows.Forms.TreeNode("节点3"); System.Windows.Forms.TreeNode treeNode32 = new System.Windows.Forms.TreeNode("节点3");
System.Windows.Forms.TreeNode treeNode57 = new System.Windows.Forms.TreeNode("节点0"); System.Windows.Forms.TreeNode treeNode25 = new System.Windows.Forms.TreeNode("节点0");
System.Windows.Forms.TreeNode treeNode58 = new System.Windows.Forms.TreeNode("节点1"); System.Windows.Forms.TreeNode treeNode26 = new System.Windows.Forms.TreeNode("节点1");
System.Windows.Forms.TreeNode treeNode59 = new System.Windows.Forms.TreeNode("节点2"); System.Windows.Forms.TreeNode treeNode27 = new System.Windows.Forms.TreeNode("节点2");
System.Windows.Forms.TreeNode treeNode60 = new System.Windows.Forms.TreeNode("节点3"); System.Windows.Forms.TreeNode treeNode28 = new System.Windows.Forms.TreeNode("节点3");
System.Windows.Forms.TreeNode treeNode33 = new System.Windows.Forms.TreeNode("节点0"); System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("节点0");
System.Windows.Forms.TreeNode treeNode34 = new System.Windows.Forms.TreeNode("节点1"); System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("节点1");
System.Windows.Forms.TreeNode treeNode35 = new System.Windows.Forms.TreeNode("节点2"); System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("节点2");
System.Windows.Forms.TreeNode treeNode36 = new System.Windows.Forms.TreeNode("节点3"); System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("节点3");
System.Windows.Forms.TreeNode treeNode37 = new System.Windows.Forms.TreeNode("节点0", new System.Windows.Forms.TreeNode[] { System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("节点0", new System.Windows.Forms.TreeNode[] {
treeNode33, treeNode1,
treeNode34, treeNode2,
treeNode35, treeNode3,
treeNode36}); treeNode4});
System.Windows.Forms.TreeNode treeNode38 = new System.Windows.Forms.TreeNode("节点4"); System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("节点4");
System.Windows.Forms.TreeNode treeNode39 = new System.Windows.Forms.TreeNode("节点5"); System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("节点5");
System.Windows.Forms.TreeNode treeNode40 = new System.Windows.Forms.TreeNode("节点6"); System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("节点6");
System.Windows.Forms.TreeNode treeNode41 = new System.Windows.Forms.TreeNode("节点7"); System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("节点7");
System.Windows.Forms.TreeNode treeNode42 = new System.Windows.Forms.TreeNode("节点1", new System.Windows.Forms.TreeNode[] { System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("节点1", new System.Windows.Forms.TreeNode[] {
treeNode38, treeNode6,
treeNode39, treeNode7,
treeNode40, treeNode8,
treeNode41}); treeNode9});
System.Windows.Forms.TreeNode treeNode43 = new System.Windows.Forms.TreeNode("节点2"); System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("节点2");
System.Windows.Forms.TreeNode treeNode44 = new System.Windows.Forms.TreeNode("节点3"); System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("节点3");
System.Windows.Forms.TreeNode treeNode45 = new System.Windows.Forms.TreeNode("节点00"); System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("节点00");
System.Windows.Forms.TreeNode treeNode46 = new System.Windows.Forms.TreeNode("节点01"); System.Windows.Forms.TreeNode treeNode14 = new System.Windows.Forms.TreeNode("节点01");
System.Windows.Forms.TreeNode treeNode47 = new System.Windows.Forms.TreeNode("节点02"); System.Windows.Forms.TreeNode treeNode15 = new System.Windows.Forms.TreeNode("节点02");
System.Windows.Forms.TreeNode treeNode48 = new System.Windows.Forms.TreeNode("节点03"); System.Windows.Forms.TreeNode treeNode16 = new System.Windows.Forms.TreeNode("节点03");
System.Windows.Forms.TreeNode treeNode49 = new System.Windows.Forms.TreeNode("节点0", new System.Windows.Forms.TreeNode[] { System.Windows.Forms.TreeNode treeNode17 = new System.Windows.Forms.TreeNode("节点0", new System.Windows.Forms.TreeNode[] {
treeNode45, treeNode13,
treeNode46, treeNode14,
treeNode47, treeNode15,
treeNode48}); treeNode16});
System.Windows.Forms.TreeNode treeNode50 = new System.Windows.Forms.TreeNode("节点11"); System.Windows.Forms.TreeNode treeNode18 = new System.Windows.Forms.TreeNode("节点11");
System.Windows.Forms.TreeNode treeNode51 = new System.Windows.Forms.TreeNode("节点12"); System.Windows.Forms.TreeNode treeNode19 = new System.Windows.Forms.TreeNode("节点12");
System.Windows.Forms.TreeNode treeNode52 = new System.Windows.Forms.TreeNode("节点13"); System.Windows.Forms.TreeNode treeNode20 = new System.Windows.Forms.TreeNode("节点13");
System.Windows.Forms.TreeNode treeNode53 = new System.Windows.Forms.TreeNode("节点14"); System.Windows.Forms.TreeNode treeNode21 = new System.Windows.Forms.TreeNode("节点14");
System.Windows.Forms.TreeNode treeNode54 = new System.Windows.Forms.TreeNode("节点1", new System.Windows.Forms.TreeNode[] { System.Windows.Forms.TreeNode treeNode22 = new System.Windows.Forms.TreeNode("节点1", new System.Windows.Forms.TreeNode[] {
treeNode50, treeNode18,
treeNode51, treeNode19,
treeNode52, treeNode20,
treeNode53}); treeNode21});
System.Windows.Forms.TreeNode treeNode55 = new System.Windows.Forms.TreeNode("节点2"); System.Windows.Forms.TreeNode treeNode23 = new System.Windows.Forms.TreeNode("节点2");
System.Windows.Forms.TreeNode treeNode56 = new System.Windows.Forms.TreeNode("节点3"); System.Windows.Forms.TreeNode treeNode24 = new System.Windows.Forms.TreeNode("节点3");
this.uiLine8 = new Sunny.UI.UILine(); this.uiLine8 = new Sunny.UI.UILine();
this.uiDatetimePicker1 = new Sunny.UI.UIDatetimePicker(); this.uiDatetimePicker1 = new Sunny.UI.UIDatetimePicker();
this.uiColorPicker1 = new Sunny.UI.UIColorPicker(); this.uiColorPicker1 = new Sunny.UI.UIColorPicker();
@ -95,13 +95,11 @@
this.uiLine4 = new Sunny.UI.UILine(); this.uiLine4 = new Sunny.UI.UILine();
this.uiComboboxEx1 = new Sunny.UI.UIComboboxEx(); this.uiComboboxEx1 = new Sunny.UI.UIComboboxEx();
this.uiComboboxEx2 = new Sunny.UI.UIComboboxEx(); this.uiComboboxEx2 = new Sunny.UI.UIComboboxEx();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.PagePanel.SuspendLayout(); this.PagePanel.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// PagePanel // PagePanel
// //
this.PagePanel.Controls.Add(this.dateTimePicker1);
this.PagePanel.Controls.Add(this.uiComboboxEx2); this.PagePanel.Controls.Add(this.uiComboboxEx2);
this.PagePanel.Controls.Add(this.uiComboboxEx1); this.PagePanel.Controls.Add(this.uiComboboxEx1);
this.PagePanel.Controls.Add(this.uiLine4); this.PagePanel.Controls.Add(this.uiLine4);
@ -304,19 +302,19 @@
this.uiComboTreeView1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.uiComboTreeView1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiComboTreeView1.MinimumSize = new System.Drawing.Size(63, 0); this.uiComboTreeView1.MinimumSize = new System.Drawing.Size(63, 0);
this.uiComboTreeView1.Name = "uiComboTreeView1"; this.uiComboTreeView1.Name = "uiComboTreeView1";
treeNode61.Name = "节点0"; treeNode29.Name = "节点0";
treeNode61.Text = "节点0"; treeNode29.Text = "节点0";
treeNode62.Name = "节点1"; treeNode30.Name = "节点1";
treeNode62.Text = "节点1"; treeNode30.Text = "节点1";
treeNode63.Name = "节点2"; treeNode31.Name = "节点2";
treeNode63.Text = "节点2"; treeNode31.Text = "节点2";
treeNode64.Name = "节点3"; treeNode32.Name = "节点3";
treeNode64.Text = "节点3"; treeNode32.Text = "节点3";
this.uiComboTreeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { this.uiComboTreeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode61, treeNode29,
treeNode62, treeNode30,
treeNode63, treeNode31,
treeNode64}); treeNode32});
this.uiComboTreeView1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2); this.uiComboTreeView1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
this.uiComboTreeView1.Size = new System.Drawing.Size(150, 29); this.uiComboTreeView1.Size = new System.Drawing.Size(150, 29);
this.uiComboTreeView1.TabIndex = 43; this.uiComboTreeView1.TabIndex = 43;
@ -344,19 +342,19 @@
this.uiComboTreeView2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.uiComboTreeView2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiComboTreeView2.MinimumSize = new System.Drawing.Size(63, 0); this.uiComboTreeView2.MinimumSize = new System.Drawing.Size(63, 0);
this.uiComboTreeView2.Name = "uiComboTreeView2"; this.uiComboTreeView2.Name = "uiComboTreeView2";
treeNode57.Name = "节点0"; treeNode25.Name = "节点0";
treeNode57.Text = "节点0"; treeNode25.Text = "节点0";
treeNode58.Name = "节点1"; treeNode26.Name = "节点1";
treeNode58.Text = "节点1"; treeNode26.Text = "节点1";
treeNode59.Name = "节点2"; treeNode27.Name = "节点2";
treeNode59.Text = "节点2"; treeNode27.Text = "节点2";
treeNode60.Name = "节点3"; treeNode28.Name = "节点3";
treeNode60.Text = "节点3"; treeNode28.Text = "节点3";
this.uiComboTreeView2.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { this.uiComboTreeView2.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode57, treeNode25,
treeNode58, treeNode26,
treeNode59, treeNode27,
treeNode60}); treeNode28});
this.uiComboTreeView2.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2); this.uiComboTreeView2.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
this.uiComboTreeView2.Size = new System.Drawing.Size(150, 29); this.uiComboTreeView2.Size = new System.Drawing.Size(150, 29);
this.uiComboTreeView2.TabIndex = 46; this.uiComboTreeView2.TabIndex = 46;
@ -373,35 +371,35 @@
this.uiComboTreeView3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.uiComboTreeView3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiComboTreeView3.MinimumSize = new System.Drawing.Size(63, 0); this.uiComboTreeView3.MinimumSize = new System.Drawing.Size(63, 0);
this.uiComboTreeView3.Name = "uiComboTreeView3"; this.uiComboTreeView3.Name = "uiComboTreeView3";
treeNode33.Name = "节点0"; treeNode1.Name = "节点0";
treeNode33.Text = "节点0"; treeNode1.Text = "节点0";
treeNode34.Name = "节点1"; treeNode2.Name = "节点1";
treeNode34.Text = "节点1"; treeNode2.Text = "节点1";
treeNode35.Name = "节点2"; treeNode3.Name = "节点2";
treeNode35.Text = "节点2"; treeNode3.Text = "节点2";
treeNode36.Name = "节点3"; treeNode4.Name = "节点3";
treeNode36.Text = "节点3"; treeNode4.Text = "节点3";
treeNode37.Name = "节点0"; treeNode5.Name = "节点0";
treeNode37.Text = "节点0"; treeNode5.Text = "节点0";
treeNode38.Name = "节点4"; treeNode6.Name = "节点4";
treeNode38.Text = "节点4"; treeNode6.Text = "节点4";
treeNode39.Name = "节点5"; treeNode7.Name = "节点5";
treeNode39.Text = "节点5"; treeNode7.Text = "节点5";
treeNode40.Name = "节点6"; treeNode8.Name = "节点6";
treeNode40.Text = "节点6"; treeNode8.Text = "节点6";
treeNode41.Name = "节点7"; treeNode9.Name = "节点7";
treeNode41.Text = "节点7"; treeNode9.Text = "节点7";
treeNode42.Name = "节点1"; treeNode10.Name = "节点1";
treeNode42.Text = "节点1"; treeNode10.Text = "节点1";
treeNode43.Name = "节点2"; treeNode11.Name = "节点2";
treeNode43.Text = "节点2"; treeNode11.Text = "节点2";
treeNode44.Name = "节点3"; treeNode12.Name = "节点3";
treeNode44.Text = "节点3"; treeNode12.Text = "节点3";
this.uiComboTreeView3.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { this.uiComboTreeView3.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode37, treeNode5,
treeNode42, treeNode10,
treeNode43, treeNode11,
treeNode44}); treeNode12});
this.uiComboTreeView3.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2); this.uiComboTreeView3.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
this.uiComboTreeView3.ShowLines = true; this.uiComboTreeView3.ShowLines = true;
this.uiComboTreeView3.Size = new System.Drawing.Size(150, 29); this.uiComboTreeView3.Size = new System.Drawing.Size(150, 29);
@ -417,35 +415,35 @@
this.uiComboTreeView4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.uiComboTreeView4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiComboTreeView4.MinimumSize = new System.Drawing.Size(63, 0); this.uiComboTreeView4.MinimumSize = new System.Drawing.Size(63, 0);
this.uiComboTreeView4.Name = "uiComboTreeView4"; this.uiComboTreeView4.Name = "uiComboTreeView4";
treeNode45.Name = "节点0"; treeNode13.Name = "节点0";
treeNode45.Text = "节点00"; treeNode13.Text = "节点00";
treeNode46.Name = "节点1"; treeNode14.Name = "节点1";
treeNode46.Text = "节点01"; treeNode14.Text = "节点01";
treeNode47.Name = "节点2"; treeNode15.Name = "节点2";
treeNode47.Text = "节点02"; treeNode15.Text = "节点02";
treeNode48.Name = "节点3"; treeNode16.Name = "节点3";
treeNode48.Text = "节点03"; treeNode16.Text = "节点03";
treeNode49.Name = "节点0"; treeNode17.Name = "节点0";
treeNode49.Text = "节点0"; treeNode17.Text = "节点0";
treeNode50.Name = "节点4"; treeNode18.Name = "节点4";
treeNode50.Text = "节点11"; treeNode18.Text = "节点11";
treeNode51.Name = "节点5"; treeNode19.Name = "节点5";
treeNode51.Text = "节点12"; treeNode19.Text = "节点12";
treeNode52.Name = "节点6"; treeNode20.Name = "节点6";
treeNode52.Text = "节点13"; treeNode20.Text = "节点13";
treeNode53.Name = "节点7"; treeNode21.Name = "节点7";
treeNode53.Text = "节点14"; treeNode21.Text = "节点14";
treeNode54.Name = "节点1"; treeNode22.Name = "节点1";
treeNode54.Text = "节点1"; treeNode22.Text = "节点1";
treeNode55.Name = "节点2"; treeNode23.Name = "节点2";
treeNode55.Text = "节点2"; treeNode23.Text = "节点2";
treeNode56.Name = "节点3"; treeNode24.Name = "节点3";
treeNode56.Text = "节点3"; treeNode24.Text = "节点3";
this.uiComboTreeView4.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { this.uiComboTreeView4.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode49, treeNode17,
treeNode54, treeNode22,
treeNode55, treeNode23,
treeNode56}); treeNode24});
this.uiComboTreeView4.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2); this.uiComboTreeView4.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
this.uiComboTreeView4.ShowLines = true; this.uiComboTreeView4.ShowLines = true;
this.uiComboTreeView4.Size = new System.Drawing.Size(150, 29); this.uiComboTreeView4.Size = new System.Drawing.Size(150, 29);
@ -494,13 +492,6 @@
this.uiComboboxEx2.Size = new System.Drawing.Size(150, 30); this.uiComboboxEx2.Size = new System.Drawing.Size(150, 30);
this.uiComboboxEx2.TabIndex = 51; this.uiComboboxEx2.TabIndex = 51;
// //
// dateTimePicker1
//
this.dateTimePicker1.Location = new System.Drawing.Point(390, 277);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(200, 29);
this.dateTimePicker1.TabIndex = 52;
//
// FCombobox // FCombobox
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@ -534,6 +525,5 @@
private UILine uiLine4; private UILine uiLine4;
private UIComboboxEx uiComboboxEx2; private UIComboboxEx uiComboboxEx2;
private UIComboboxEx uiComboboxEx1; private UIComboboxEx uiComboboxEx1;
private System.Windows.Forms.DateTimePicker dateTimePicker1;
} }
} }

View File

@ -32,6 +32,7 @@ namespace Sunny.UI
{ {
public UIChart() public UIChart()
{ {
SetStyleFlags(true, false);
ShowText = false; ShowText = false;
fillColor = UIChartStyles.Plain.BackColor; fillColor = UIChartStyles.Plain.BackColor;
foreColor = UIChartStyles.Plain.ForeColor; foreColor = UIChartStyles.Plain.ForeColor;

View File

@ -47,14 +47,7 @@ namespace Sunny.UI
public UIDropControl() public UIDropControl()
{ {
InitializeComponent(); InitializeComponent();
SetStyleFlags();
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
SetStyle(ControlStyles.Selectable, true);
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
base.DoubleBuffered = true;
UpdateStyles();
edit.Font = UIFontColor.Font; edit.Font = UIFontColor.Font;
edit.Left = 3; edit.Left = 3;

View File

@ -36,6 +36,7 @@ namespace Sunny.UI
public UIDropDownItem() public UIDropDownItem()
{ {
InitializeComponent(); InitializeComponent();
SetStyleFlags(true, false);
} }
/// <summary> /// <summary>

View File

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

View File

@ -83,8 +83,7 @@ namespace Sunny.UI
public UIAnalogMeter() public UIAnalogMeter()
{ {
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.SupportsTransparentBackColor | ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.OptimizedDoubleBuffer | ControlStyles.DoubleBuffer, true); SetStyleFlags(true, false, true);
base.DoubleBuffered = true;
// Properties initialization // Properties initialization
needleColor = Color.Yellow; needleColor = Color.Yellow;

View File

@ -60,6 +60,7 @@ namespace Sunny.UI
/// </summary> /// </summary>
public UIAvatar() public UIAvatar()
{ {
SetStyleFlags(true, false);
Width = Height = 60; Width = Height = 60;
ShowText = false; ShowText = false;
ShowRect = false; ShowRect = false;

View File

@ -43,6 +43,7 @@ namespace Sunny.UI
public UIBattery() public UIBattery()
{ {
SetStyleFlags(true, false);
ShowRect = false; ShowRect = false;
fillColor = UIStyles.Blue.PlainColor; fillColor = UIStyles.Blue.PlainColor;
Width = 48; Width = 48;

View File

@ -37,6 +37,7 @@ namespace Sunny.UI
{ {
public UIBreadcrumb() public UIBreadcrumb()
{ {
SetStyleFlags(true, false);
ShowText = false; ShowText = false;
ShowRect = false; ShowRect = false;
Height = 29; Height = 29;

View File

@ -41,6 +41,7 @@ namespace Sunny.UI
{ {
public UIButton() public UIButton()
{ {
SetStyleFlags();
TabStop = true; TabStop = true;
Width = 100; Width = 100;
Height = 35; Height = 35;

View File

@ -36,6 +36,7 @@ namespace Sunny.UI
{ {
public UICheckBox() public UICheckBox()
{ {
SetStyleFlags();
Cursor = Cursors.Hand; Cursor = Cursors.Hand;
ShowRect = false; ShowRect = false;
Size = new Size(150, 29); Size = new Size(150, 29);

View File

@ -38,15 +38,6 @@ namespace Sunny.UI
public UIComboBox() public UIComboBox()
{ {
InitializeComponent(); InitializeComponent();
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
SetStyle(ControlStyles.Selectable, true);
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
DoubleBuffered = true;
UpdateStyles();
box.SelectedIndexChanged += Box_SelectedIndexChanged; box.SelectedIndexChanged += Box_SelectedIndexChanged;
box.DataSourceChanged += Box_DataSourceChanged; box.DataSourceChanged += Box_DataSourceChanged;
box.DisplayMemberChanged += Box_DisplayMemberChanged; box.DisplayMemberChanged += Box_DisplayMemberChanged;

View File

@ -39,21 +39,25 @@ namespace Sunny.UI
/// </summary> /// </summary>
public UIControl() public UIControl()
{ {
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
SetStyle(ControlStyles.Selectable, true);
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
base.DoubleBuffered = true;
UpdateStyles();
Version = UIGlobal.Version; Version = UIGlobal.Version;
base.Font = UIFontColor.Font; base.Font = UIFontColor.Font;
Size = new Size(100, 35); Size = new Size(100, 35);
base.MinimumSize = new Size(1, 1); base.MinimumSize = new Size(1, 1);
} }
protected void SetStyleFlags(bool supportTransparent = true, bool selectable = true, bool resizeRedraw = false)
{
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
if (supportTransparent) SetStyle(ControlStyles.SupportsTransparentBackColor, true);
if (selectable) SetStyle(ControlStyles.Selectable, true);
if (resizeRedraw) SetStyle(ControlStyles.ResizeRedraw, true);
base.DoubleBuffered = true;
UpdateStyles();
}
protected override void OnSizeChanged(EventArgs e) protected override void OnSizeChanged(EventArgs e)
{ {
base.OnSizeChanged(e); base.OnSizeChanged(e);

View File

@ -37,6 +37,9 @@ namespace Sunny.UI
public UIDoubleUpDown() public UIDoubleUpDown()
{ {
InitializeComponent(); InitializeComponent();
SetStyleFlags();
ShowText = false; ShowText = false;
edit.Type = UITextBox.UIEditType.Double; edit.Type = UITextBox.UIEditType.Double;
edit.Parent = pnlValue; edit.Parent = pnlValue;

View File

@ -37,7 +37,7 @@ namespace Sunny.UI
public UIFlowLayoutPanel() public UIFlowLayoutPanel()
{ {
InitializeComponent(); InitializeComponent();
SetStyleFlags(true, false);
ShowText = false; ShowText = false;
Panel.AutoScroll = true; Panel.AutoScroll = true;

View File

@ -32,6 +32,7 @@ namespace Sunny.UI
public UIGroupBox() public UIGroupBox()
{ {
InitializeComponent(); InitializeComponent();
SetStyleFlags(true, false);
} }
protected override void OnPaintFill(Graphics g, GraphicsPath path) protected override void OnPaintFill(Graphics g, GraphicsPath path)

View File

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

View File

@ -38,6 +38,7 @@ namespace Sunny.UI
{ {
public UIHeaderButton() public UIHeaderButton()
{ {
SetStyleFlags();
Size = new Size(100, 88); Size = new Size(100, 88);
ShowText = false; ShowText = false;
ShowRect = false; ShowRect = false;

View File

@ -33,6 +33,7 @@ namespace Sunny.UI
{ {
public UIHorScrollBar() public UIHorScrollBar()
{ {
SetStyleFlags(true, false);
Maximum = 100; Maximum = 100;
left_state = value_state = right_state = DrawItemState.None; left_state = value_state = right_state = DrawItemState.None;
timer.Interval = 150; timer.Interval = 150;

View File

@ -32,6 +32,7 @@ namespace Sunny.UI
{ {
public UIHorScrollBarEx() public UIHorScrollBarEx()
{ {
SetStyleFlags(true, false);
ShowText = false; ShowText = false;
ShowRect = false; ShowRect = false;
Height = ScrollBarInfo.HorizontalScrollBarHeight() + 1; Height = ScrollBarInfo.HorizontalScrollBarHeight() + 1;

View File

@ -40,6 +40,7 @@ namespace Sunny.UI
public UIImageListBox() public UIImageListBox()
{ {
InitializeComponent(); InitializeComponent();
SetStyleFlags(true, false);
ShowText = false; ShowText = false;
Padding = new Padding(2); Padding = new Padding(2);

View File

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

View File

@ -37,6 +37,7 @@ namespace Sunny.UI
public UIIntegerUpDown() public UIIntegerUpDown()
{ {
InitializeComponent(); InitializeComponent();
SetStyleFlags();
ShowText = false; ShowText = false;
edit.Type = UITextBox.UIEditType.Integer; edit.Type = UITextBox.UIEditType.Integer;
edit.Parent = pnlValue; edit.Parent = pnlValue;

View File

@ -125,6 +125,7 @@ namespace Sunny.UI
public UISymbolLabel() public UISymbolLabel()
{ {
SetStyleFlags(true, false);
ShowRect = false; ShowRect = false;
foreColor = UIFontColor.Primary; foreColor = UIFontColor.Primary;
symbolColor = UIFontColor.Primary; symbolColor = UIFontColor.Primary;

View File

@ -33,6 +33,7 @@ namespace Sunny.UI
{ {
public UILedLabel() public UILedLabel()
{ {
SetStyleFlags(true, false);
ShowText = ShowRect = ShowFill = false; ShowText = ShowRect = ShowFill = false;
foreColor = UIColor.Blue; foreColor = UIColor.Blue;
} }

View File

@ -41,6 +41,7 @@ namespace Sunny.UI
public UILight() public UILight()
{ {
SetStyleFlags(true, false);
ShowRect = false; ShowRect = false;
ShowText = false; ShowText = false;
Radius = Width = Height = 35; Radius = Width = Height = 35;

View File

@ -31,6 +31,7 @@ namespace Sunny.UI
{ {
public UILine() public UILine()
{ {
SetStyleFlags(true, false);
Size = new Size(360, 29); Size = new Size(360, 29);
MinimumSize = new Size(2, 2); MinimumSize = new Size(2, 2);
foreColor = UIStyles.Blue.LineForeColor; foreColor = UIStyles.Blue.LineForeColor;

View File

@ -41,6 +41,7 @@ namespace Sunny.UI
public UIListBox() public UIListBox()
{ {
InitializeComponent(); InitializeComponent();
SetStyleFlags(true, false);
ShowText = false; ShowText = false;
Padding = new Padding(2); Padding = new Padding(2);

View File

@ -34,6 +34,7 @@ namespace Sunny.UI
[ToolboxItem(true)] [ToolboxItem(true)]
public UILogo() public UILogo()
{ {
SetStyleFlags(true, false);
ShowText = ShowRect = false; ShowText = ShowRect = false;
Width = 300; Width = 300;
Height = 80; Height = 80;

View File

@ -45,7 +45,6 @@ namespace Sunny.UI
SetStyle(ControlStyles.SupportsTransparentBackColor, true); SetStyle(ControlStyles.SupportsTransparentBackColor, true);
SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true); SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
SetStyle(ControlStyles.ResizeRedraw, true);
DoubleBuffered = true; DoubleBuffered = true;
UpdateStyles(); UpdateStyles();
Font = UIFontColor.Font; Font = UIFontColor.Font;

View File

@ -84,6 +84,7 @@ namespace Sunny.UI
public UIPagination() public UIPagination()
{ {
InitializeComponent(); InitializeComponent();
SetStyleFlags(true, false);
ShowText = false; ShowText = false;
buttons.TryAdd(0, b0); buttons.TryAdd(0, b0);

View File

@ -60,6 +60,19 @@ namespace Sunny.UI
base.MinimumSize = new System.Drawing.Size(1, 1); base.MinimumSize = new System.Drawing.Size(1, 1);
} }
protected void SetStyleFlags(bool supportTransparent = true, bool selectable = true, bool resizeRedraw = false)
{
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
if (supportTransparent) SetStyle(ControlStyles.SupportsTransparentBackColor, true);
if (selectable) SetStyle(ControlStyles.Selectable, true);
if (resizeRedraw) SetStyle(ControlStyles.ResizeRedraw, true);
base.DoubleBuffered = true;
UpdateStyles();
}
protected override void OnSizeChanged(EventArgs e) protected override void OnSizeChanged(EventArgs e)
{ {
base.OnSizeChanged(e); base.OnSizeChanged(e);

View File

@ -41,6 +41,7 @@ namespace Sunny.UI
public UIProcessBar() public UIProcessBar()
{ {
SetStyleFlags(true, false);
MinimumSize = new Size(70, 5); MinimumSize = new Size(70, 5);
Size = new Size(300, 29); Size = new Size(300, 29);
ShowText = false; ShowText = false;

View File

@ -35,6 +35,7 @@ namespace Sunny.UI
public UIProgressIndicator() public UIProgressIndicator()
{ {
SetStyleFlags(true, false);
Width = Height = 100; Width = Height = 100;
timer.Interval = 200; timer.Interval = 200;

View File

@ -41,6 +41,7 @@ namespace Sunny.UI
public UIRadioButton() public UIRadioButton()
{ {
SetStyleFlags();
Cursor = Cursors.Hand; Cursor = Cursors.Hand;
ShowRect = false; ShowRect = false;
Size = new Size(150, 29); Size = new Size(150, 29);

View File

@ -17,7 +17,7 @@ namespace Sunny.UI
public UIRichTextBox() public UIRichTextBox()
{ {
InitializeComponent(); InitializeComponent();
SetStyleFlags();
ShowText = false; ShowText = false;
edit.MouseWheel += OnMouseWheel; edit.MouseWheel += OnMouseWheel;

View File

@ -88,7 +88,7 @@ namespace Sunny.UI
public UIRoundMeter() public UIRoundMeter()
{ {
InitializeComponent(); InitializeComponent();
SetStyleFlags(true, false);
MeterType = TMeterType.Gps; MeterType = TMeterType.Gps;
_runType = TRunType.ClockWise; _runType = TRunType.ClockWise;

View File

@ -36,6 +36,7 @@ namespace Sunny.UI
{ {
public UIRoundProcess() public UIRoundProcess()
{ {
SetStyleFlags(true, false);
Size = new Size(120, 120); Size = new Size(120, 120);
Inner = 30; Inner = 30;
Outer = 50; Outer = 50;

View File

@ -34,6 +34,7 @@ namespace Sunny.UI
{ {
public UIScrollBar() public UIScrollBar()
{ {
SetStyleFlags(true, false);
Maximum = 100; Maximum = 100;
up_state = value_state = down_state = DrawItemState.None; up_state = value_state = down_state = DrawItemState.None;
timer.Interval = 150; timer.Interval = 150;

View File

@ -38,6 +38,7 @@ namespace Sunny.UI
public UIScrollingText() public UIScrollingText()
{ {
SetStyleFlags(true, false);
fillColor = UIStyles.Blue.PlainColor; fillColor = UIStyles.Blue.PlainColor;
foreColor = UIStyles.Blue.RectColor; foreColor = UIStyles.Blue.RectColor;
Reset(); Reset();

View File

@ -47,6 +47,7 @@ namespace Sunny.UI
public UISwitch() public UISwitch()
{ {
SetStyleFlags();
Height = 29; Height = 29;
Width = 75; Width = 75;
ShowText = false; ShowText = false;

View File

@ -31,7 +31,12 @@ namespace Sunny.UI
{ {
public UITabControlMenu() public UITabControlMenu()
{ {
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
DoubleBuffered = true;
UpdateStyles();
ItemSize = new Size(40, 200); ItemSize = new Size(40, 200);
DrawMode = TabDrawMode.OwnerDrawFixed; DrawMode = TabDrawMode.OwnerDrawFixed;

View File

@ -40,7 +40,7 @@ namespace Sunny.UI
public UITextBox() public UITextBox()
{ {
InitializeComponent(); InitializeComponent();
SetStyleFlags();
CalcEditHeight(); CalcEditHeight();
Height = MiniHeight; Height = MiniHeight;
ShowText = false; ShowText = false;

View File

@ -60,6 +60,7 @@ namespace Sunny.UI
public UITitlePanel() public UITitlePanel()
{ {
InitializeComponent(); InitializeComponent();
SetStyleFlags(true, false);
ShowText = false; ShowText = false;
foreColor = Color.White; foreColor = Color.White;
CalcSystemBoxPos(); CalcSystemBoxPos();

View File

@ -37,6 +37,7 @@ namespace Sunny.UI
public UITrackBar() public UITrackBar()
{ {
SetStyleFlags();
Width = 150; Width = 150;
Height = 29; Height = 29;

View File

@ -40,6 +40,7 @@ namespace Sunny.UI
{ {
InitializeComponent(); InitializeComponent();
ShowText = false; ShowText = false;
SetStyleFlags(true, false);
l1.ItemsCountChange += L1_ItemsCountChange; l1.ItemsCountChange += L1_ItemsCountChange;
l2.ItemsCountChange += L2_ItemsCountChange; l2.ItemsCountChange += L2_ItemsCountChange;

View File

@ -10,6 +10,11 @@ namespace Sunny.UI
{ {
private int _opacity = 150; private int _opacity = 150;
public UITransparentPanel()
{
SetStyleFlags(true, false);
}
[Bindable(true), Category("Custom"), DefaultValue(150), Description("背景的透明度. 有效值0-255")] [Bindable(true), Category("Custom"), DefaultValue(150), Description("背景的透明度. 有效值0-255")]
public int Opacity public int Opacity
{ {

View File

@ -41,6 +41,7 @@ namespace Sunny.UI
public UITreeView() public UITreeView()
{ {
InitializeComponent(); InitializeComponent();
SetStyleFlags(true, false);
ShowText = false; ShowText = false;
SetScrollInfo(); SetScrollInfo();

View File

@ -32,6 +32,7 @@ namespace Sunny.UI
{ {
public UIVerScrollBarEx() public UIVerScrollBarEx()
{ {
SetStyleFlags(true, false);
ShowText = false; ShowText = false;
ShowRect = false; ShowRect = false;
Width = ScrollBarInfo.VerticalScrollBarWidth() + 1; Width = ScrollBarInfo.VerticalScrollBarWidth() + 1;

View File

@ -33,6 +33,7 @@ namespace Sunny.UI
public UIWaitingBar() public UIWaitingBar()
{ {
SetStyleFlags(true, false);
MinimumSize = new Size(70, 23); MinimumSize = new Size(70, 23);
Size = new Size(300, 29); Size = new Size(300, 29);
ShowText = false; ShowText = false;