diff --git a/Bin/net40/SunnyUI.Demo.exe b/Bin/net40/SunnyUI.Demo.exe
index c9712fea..fb4d7d1e 100644
Binary files a/Bin/net40/SunnyUI.Demo.exe and b/Bin/net40/SunnyUI.Demo.exe differ
diff --git a/Bin/net40/SunnyUI.dll b/Bin/net40/SunnyUI.dll
index b6586ffe..12980d46 100644
Binary files a/Bin/net40/SunnyUI.dll and b/Bin/net40/SunnyUI.dll differ
diff --git a/Bin/net45/SunnyUI.dll b/Bin/net45/SunnyUI.dll
index 707b4cdf..f90fd0fc 100644
Binary files a/Bin/net45/SunnyUI.dll and b/Bin/net45/SunnyUI.dll differ
diff --git a/Bin/net5.0-windows/SunnyUI.dll b/Bin/net5.0-windows/SunnyUI.dll
index 056379a4..f7415e01 100644
Binary files a/Bin/net5.0-windows/SunnyUI.dll and b/Bin/net5.0-windows/SunnyUI.dll differ
diff --git a/Bin/netcoreapp3.1/SunnyUI.dll b/Bin/netcoreapp3.1/SunnyUI.dll
index 43341efa..e4b6507d 100644
Binary files a/Bin/netcoreapp3.1/SunnyUI.dll and b/Bin/netcoreapp3.1/SunnyUI.dll differ
diff --git a/SunnyUI.Demo/FColorful.Designer.cs b/SunnyUI.Demo/FColorful.Designer.cs
new file mode 100644
index 00000000..a60414d1
--- /dev/null
+++ b/SunnyUI.Demo/FColorful.Designer.cs
@@ -0,0 +1,262 @@
+
+namespace Sunny.UI.Demo
+{
+ partial class FColorful
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.uiPanel1 = new Sunny.UI.UIPanel();
+ this.uiPanel2 = new Sunny.UI.UIPanel();
+ this.uiPanel3 = new Sunny.UI.UIPanel();
+ this.uiPanel4 = new Sunny.UI.UIPanel();
+ this.uiPanel5 = new Sunny.UI.UIPanel();
+ this.uiPanel6 = new Sunny.UI.UIPanel();
+ this.uiPanel7 = new Sunny.UI.UIPanel();
+ this.uiPanel8 = new Sunny.UI.UIPanel();
+ this.uiPanel9 = new Sunny.UI.UIPanel();
+ this.uiPanel10 = new Sunny.UI.UIPanel();
+ this.SuspendLayout();
+ //
+ // uiPanel1
+ //
+ this.uiPanel1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(190)))), ((int)(((byte)(172)))));
+ this.uiPanel1.Font = new System.Drawing.Font("微软雅黑", 12F);
+ this.uiPanel1.ForeColor = System.Drawing.Color.White;
+ this.uiPanel1.Location = new System.Drawing.Point(23, 56);
+ this.uiPanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+ this.uiPanel1.MinimumSize = new System.Drawing.Size(1, 1);
+ this.uiPanel1.Name = "uiPanel1";
+ this.uiPanel1.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(190)))), ((int)(((byte)(172)))));
+ this.uiPanel1.Size = new System.Drawing.Size(120, 100);
+ this.uiPanel1.Style = Sunny.UI.UIStyle.Custom;
+ this.uiPanel1.StyleCustomMode = true;
+ this.uiPanel1.TabIndex = 0;
+ this.uiPanel1.Text = "蓝绿色";
+ this.uiPanel1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+ this.uiPanel1.Click += new System.EventHandler(this.uiPanel1_Click);
+ //
+ // uiPanel2
+ //
+ this.uiPanel2.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(152)))), ((int)(((byte)(0)))));
+ this.uiPanel2.Font = new System.Drawing.Font("微软雅黑", 12F);
+ this.uiPanel2.ForeColor = System.Drawing.Color.White;
+ this.uiPanel2.Location = new System.Drawing.Point(173, 56);
+ this.uiPanel2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+ this.uiPanel2.MinimumSize = new System.Drawing.Size(1, 1);
+ this.uiPanel2.Name = "uiPanel2";
+ this.uiPanel2.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(152)))), ((int)(((byte)(0)))));
+ this.uiPanel2.Size = new System.Drawing.Size(120, 100);
+ this.uiPanel2.Style = Sunny.UI.UIStyle.Custom;
+ this.uiPanel2.StyleCustomMode = true;
+ this.uiPanel2.TabIndex = 1;
+ this.uiPanel2.Text = "橙色";
+ this.uiPanel2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+ this.uiPanel2.Click += new System.EventHandler(this.uiPanel1_Click);
+ //
+ // uiPanel3
+ //
+ this.uiPanel3.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(190)))), ((int)(((byte)(60)))));
+ this.uiPanel3.Font = new System.Drawing.Font("微软雅黑", 12F);
+ this.uiPanel3.ForeColor = System.Drawing.Color.White;
+ this.uiPanel3.Location = new System.Drawing.Point(473, 56);
+ this.uiPanel3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+ this.uiPanel3.MinimumSize = new System.Drawing.Size(1, 1);
+ this.uiPanel3.Name = "uiPanel3";
+ this.uiPanel3.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(190)))), ((int)(((byte)(60)))));
+ this.uiPanel3.Size = new System.Drawing.Size(120, 100);
+ this.uiPanel3.Style = Sunny.UI.UIStyle.Custom;
+ this.uiPanel3.StyleCustomMode = true;
+ this.uiPanel3.TabIndex = 3;
+ this.uiPanel3.Text = "绿色";
+ this.uiPanel3.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+ this.uiPanel3.Click += new System.EventHandler(this.uiPanel1_Click);
+ //
+ // uiPanel4
+ //
+ this.uiPanel4.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(140)))), ((int)(((byte)(100)))), ((int)(((byte)(80)))));
+ this.uiPanel4.Font = new System.Drawing.Font("微软雅黑", 12F);
+ this.uiPanel4.ForeColor = System.Drawing.Color.White;
+ this.uiPanel4.Location = new System.Drawing.Point(323, 56);
+ this.uiPanel4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+ this.uiPanel4.MinimumSize = new System.Drawing.Size(1, 1);
+ this.uiPanel4.Name = "uiPanel4";
+ this.uiPanel4.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(140)))), ((int)(((byte)(100)))), ((int)(((byte)(80)))));
+ this.uiPanel4.Size = new System.Drawing.Size(120, 100);
+ this.uiPanel4.Style = Sunny.UI.UIStyle.Custom;
+ this.uiPanel4.StyleCustomMode = true;
+ this.uiPanel4.TabIndex = 2;
+ this.uiPanel4.Text = "咖啡色";
+ this.uiPanel4.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+ this.uiPanel4.Click += new System.EventHandler(this.uiPanel1_Click);
+ //
+ // uiPanel5
+ //
+ this.uiPanel5.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(98)))), ((int)(((byte)(161)))));
+ this.uiPanel5.Font = new System.Drawing.Font("微软雅黑", 12F);
+ this.uiPanel5.ForeColor = System.Drawing.Color.White;
+ this.uiPanel5.Location = new System.Drawing.Point(623, 56);
+ this.uiPanel5.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+ this.uiPanel5.MinimumSize = new System.Drawing.Size(1, 1);
+ this.uiPanel5.Name = "uiPanel5";
+ this.uiPanel5.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(98)))), ((int)(((byte)(161)))));
+ this.uiPanel5.Size = new System.Drawing.Size(120, 100);
+ this.uiPanel5.Style = Sunny.UI.UIStyle.Custom;
+ this.uiPanel5.StyleCustomMode = true;
+ this.uiPanel5.TabIndex = 4;
+ this.uiPanel5.Text = "粉色";
+ this.uiPanel5.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+ this.uiPanel5.Click += new System.EventHandler(this.uiPanel1_Click);
+ //
+ // uiPanel6
+ //
+ this.uiPanel6.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(94)))), ((int)(((byte)(99)))));
+ this.uiPanel6.Font = new System.Drawing.Font("微软雅黑", 12F);
+ this.uiPanel6.ForeColor = System.Drawing.Color.White;
+ this.uiPanel6.Location = new System.Drawing.Point(473, 174);
+ this.uiPanel6.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+ this.uiPanel6.MinimumSize = new System.Drawing.Size(1, 1);
+ this.uiPanel6.Name = "uiPanel6";
+ this.uiPanel6.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(94)))), ((int)(((byte)(99)))));
+ this.uiPanel6.Size = new System.Drawing.Size(120, 100);
+ this.uiPanel6.Style = Sunny.UI.UIStyle.Custom;
+ this.uiPanel6.StyleCustomMode = true;
+ this.uiPanel6.TabIndex = 8;
+ this.uiPanel6.Text = "红色";
+ this.uiPanel6.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+ this.uiPanel6.Click += new System.EventHandler(this.uiPanel1_Click);
+ //
+ // uiPanel7
+ //
+ this.uiPanel7.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(126)))), ((int)(((byte)(164)))));
+ this.uiPanel7.Font = new System.Drawing.Font("微软雅黑", 12F);
+ this.uiPanel7.ForeColor = System.Drawing.Color.White;
+ this.uiPanel7.Location = new System.Drawing.Point(323, 174);
+ this.uiPanel7.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+ this.uiPanel7.MinimumSize = new System.Drawing.Size(1, 1);
+ this.uiPanel7.Name = "uiPanel7";
+ this.uiPanel7.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(126)))), ((int)(((byte)(164)))));
+ this.uiPanel7.Size = new System.Drawing.Size(120, 100);
+ this.uiPanel7.Style = Sunny.UI.UIStyle.Custom;
+ this.uiPanel7.StyleCustomMode = true;
+ this.uiPanel7.TabIndex = 7;
+ this.uiPanel7.Text = "蓝灰色";
+ this.uiPanel7.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+ this.uiPanel7.Click += new System.EventHandler(this.uiPanel1_Click);
+ //
+ // uiPanel8
+ //
+ this.uiPanel8.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(188)))), ((int)(((byte)(212)))));
+ this.uiPanel8.Font = new System.Drawing.Font("微软雅黑", 12F);
+ this.uiPanel8.ForeColor = System.Drawing.Color.White;
+ this.uiPanel8.Location = new System.Drawing.Point(173, 174);
+ this.uiPanel8.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+ this.uiPanel8.MinimumSize = new System.Drawing.Size(1, 1);
+ this.uiPanel8.Name = "uiPanel8";
+ this.uiPanel8.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(188)))), ((int)(((byte)(212)))));
+ this.uiPanel8.Size = new System.Drawing.Size(120, 100);
+ this.uiPanel8.Style = Sunny.UI.UIStyle.Custom;
+ this.uiPanel8.StyleCustomMode = true;
+ this.uiPanel8.TabIndex = 6;
+ this.uiPanel8.Text = "蓝色";
+ this.uiPanel8.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+ this.uiPanel8.Click += new System.EventHandler(this.uiPanel1_Click);
+ //
+ // uiPanel9
+ //
+ this.uiPanel9.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(58)))), ((int)(((byte)(183)))));
+ this.uiPanel9.Font = new System.Drawing.Font("微软雅黑", 12F);
+ this.uiPanel9.ForeColor = System.Drawing.Color.White;
+ this.uiPanel9.Location = new System.Drawing.Point(23, 174);
+ this.uiPanel9.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+ this.uiPanel9.MinimumSize = new System.Drawing.Size(1, 1);
+ this.uiPanel9.Name = "uiPanel9";
+ this.uiPanel9.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(130)))), ((int)(((byte)(58)))), ((int)(((byte)(183)))));
+ this.uiPanel9.Size = new System.Drawing.Size(120, 100);
+ this.uiPanel9.Style = Sunny.UI.UIStyle.Custom;
+ this.uiPanel9.StyleCustomMode = true;
+ this.uiPanel9.TabIndex = 5;
+ this.uiPanel9.Text = "紫色";
+ this.uiPanel9.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+ this.uiPanel9.Click += new System.EventHandler(this.uiPanel1_Click);
+ //
+ // uiPanel10
+ //
+ this.uiPanel10.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(150)))), ((int)(((byte)(136)))));
+ this.uiPanel10.Font = new System.Drawing.Font("微软雅黑", 12F);
+ this.uiPanel10.ForeColor = System.Drawing.Color.White;
+ this.uiPanel10.Location = new System.Drawing.Point(623, 174);
+ this.uiPanel10.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+ this.uiPanel10.MinimumSize = new System.Drawing.Size(1, 1);
+ this.uiPanel10.Name = "uiPanel10";
+ this.uiPanel10.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(150)))), ((int)(((byte)(136)))));
+ this.uiPanel10.Size = new System.Drawing.Size(120, 100);
+ this.uiPanel10.Style = Sunny.UI.UIStyle.Custom;
+ this.uiPanel10.StyleCustomMode = true;
+ this.uiPanel10.TabIndex = 9;
+ this.uiPanel10.Text = "墨绿色";
+ this.uiPanel10.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+ this.uiPanel10.Click += new System.EventHandler(this.uiPanel1_Click);
+ //
+ // FColorful
+ //
+ this.AllowShowTitle = true;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(776, 543);
+ this.Controls.Add(this.uiPanel10);
+ this.Controls.Add(this.uiPanel6);
+ this.Controls.Add(this.uiPanel7);
+ this.Controls.Add(this.uiPanel8);
+ this.Controls.Add(this.uiPanel9);
+ this.Controls.Add(this.uiPanel5);
+ this.Controls.Add(this.uiPanel3);
+ this.Controls.Add(this.uiPanel4);
+ this.Controls.Add(this.uiPanel2);
+ this.Controls.Add(this.uiPanel1);
+ this.Name = "FColorful";
+ this.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0);
+ this.PageIndex = 999;
+ this.ShowTitle = true;
+ this.Text = "多彩主题";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private UIPanel uiPanel1;
+ private UIPanel uiPanel2;
+ private UIPanel uiPanel3;
+ private UIPanel uiPanel4;
+ private UIPanel uiPanel5;
+ private UIPanel uiPanel6;
+ private UIPanel uiPanel7;
+ private UIPanel uiPanel8;
+ private UIPanel uiPanel9;
+ private UIPanel uiPanel10;
+ }
+}
\ No newline at end of file
diff --git a/SunnyUI.Demo/FColorful.cs b/SunnyUI.Demo/FColorful.cs
new file mode 100644
index 00000000..11e23575
--- /dev/null
+++ b/SunnyUI.Demo/FColorful.cs
@@ -0,0 +1,18 @@
+using System.Drawing;
+
+namespace Sunny.UI.Demo
+{
+ public partial class FColorful : UIPage
+ {
+ public FColorful()
+ {
+ InitializeComponent();
+ }
+
+ private void uiPanel1_Click(object sender, System.EventArgs e)
+ {
+ var panel = (UIPanel)sender;
+ UIStyles.InitColorful(panel.FillColor, Color.White);
+ }
+ }
+}
diff --git a/SunnyUI.Demo/FColorful.resx b/SunnyUI.Demo/FColorful.resx
new file mode 100644
index 00000000..1af7de15
--- /dev/null
+++ b/SunnyUI.Demo/FColorful.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/SunnyUI.Demo/FMain.cs b/SunnyUI.Demo/FMain.cs
index 394f53a8..4836c62b 100644
--- a/SunnyUI.Demo/FMain.cs
+++ b/SunnyUI.Demo/FMain.cs
@@ -60,6 +60,8 @@ namespace Sunny.UI.Demo
Aside.CreateChildNode(parent, AddPage(new FBarChartEx()));
Aside.CreateChildNode(parent, AddPage(new FLineChart()));
+ AddPage(new FColorful());
+
Header.SetNodeSymbol(Header.Nodes[3], 61502);
var styles = UIStyles.PopularStyles();
foreach (UIStyle style in styles)
@@ -67,6 +69,7 @@ namespace Sunny.UI.Demo
Header.CreateChildNode(Header.Nodes[3], style.DisplayText(), style.Value());
}
+ Header.CreateChildNode(Header.Nodes[3], "多彩主题", UIStyle.Colorful.Value());
Aside.SelectFirst();
}
@@ -82,7 +85,11 @@ namespace Sunny.UI.Demo
case 3:
UIStyle style = (UIStyle)pageIndex;
- StyleManager.Style = style;
+ if (style != UIStyle.Colorful)
+ StyleManager.Style = style;
+ else
+ SelectPage(pageIndex);
+
break;
}
}
diff --git a/SunnyUI.Demo/SunnyUI.Demo.csproj b/SunnyUI.Demo/SunnyUI.Demo.csproj
index ead28299..454e6478 100644
--- a/SunnyUI.Demo/SunnyUI.Demo.csproj
+++ b/SunnyUI.Demo/SunnyUI.Demo.csproj
@@ -335,6 +335,12 @@
+
+ Form
+
+
+ FColorful.cs
+
FBarChartEx.cs
@@ -480,6 +486,9 @@
Resources.resx
True
+
+ FColorful.cs
+
.editorconfig