diff --git a/Bin/net40/SunnyUI.Demo.exe b/Bin/net40/SunnyUI.Demo.exe index 5dc3c50f..cad65cec 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 6fa947b1..9af15ae1 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 82e02102..255c9e5d 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 b84ba5c0..f3442d8b 100644 Binary files a/Bin/net5.0-windows/SunnyUI.dll and b/Bin/net5.0-windows/SunnyUI.dll differ diff --git a/Bin/net5.0-windows/ref/SunnyUI.dll b/Bin/net5.0-windows/ref/SunnyUI.dll index 5c613c14..d7f2c533 100644 Binary files a/Bin/net5.0-windows/ref/SunnyUI.dll and b/Bin/net5.0-windows/ref/SunnyUI.dll differ diff --git a/Bin/netcoreapp3.1/SunnyUI.dll b/Bin/netcoreapp3.1/SunnyUI.dll index 9b37cedb..db95874c 100644 Binary files a/Bin/netcoreapp3.1/SunnyUI.dll and b/Bin/netcoreapp3.1/SunnyUI.dll differ diff --git a/SunnyUI.Demo/Charts/FBarChart.Designer.cs b/SunnyUI.Demo/Charts/FBarChart.Designer.cs index 9c64d20d..9686a41f 100644 --- a/SunnyUI.Demo/Charts/FBarChart.Designer.cs +++ b/SunnyUI.Demo/Charts/FBarChart.Designer.cs @@ -1,4 +1,5 @@ -namespace Sunny.UI.Demo.Charts + +namespace Sunny.UI.Demo { partial class FBarChart { @@ -28,71 +29,40 @@ /// private void InitializeComponent() { - this.BarChart = new Sunny.UI.UIBarChart(); - this.uiLine1 = new Sunny.UI.UILine(); this.uiSymbolButton1 = new Sunny.UI.UISymbolButton(); this.uiImageButton3 = new Sunny.UI.UIImageButton(); this.uiImageButton2 = new Sunny.UI.UIImageButton(); this.uiImageButton1 = new Sunny.UI.UIImageButton(); - this.PagePanel.SuspendLayout(); + this.uiLine1 = new Sunny.UI.UILine(); + this.BarChart = new Sunny.UI.UIBarChart(); ((System.ComponentModel.ISupportInitialize)(this.uiImageButton3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.uiImageButton2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.uiImageButton1)).BeginInit(); this.SuspendLayout(); // - // PagePanel - // - this.PagePanel.Controls.Add(this.uiSymbolButton1); - this.PagePanel.Controls.Add(this.uiImageButton3); - this.PagePanel.Controls.Add(this.uiImageButton2); - this.PagePanel.Controls.Add(this.uiImageButton1); - this.PagePanel.Controls.Add(this.uiLine1); - this.PagePanel.Controls.Add(this.BarChart); - this.PagePanel.Size = new System.Drawing.Size(800, 528); - // - // BarChart - // - this.BarChart.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); - this.BarChart.Font = new System.Drawing.Font("微软雅黑", 12F); - this.BarChart.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(54)))), ((int)(((byte)(54)))), ((int)(((byte)(54))))); - this.BarChart.Location = new System.Drawing.Point(30, 48); - this.BarChart.Name = "BarChart"; - this.BarChart.Size = new System.Drawing.Size(670, 400); - this.BarChart.TabIndex = 0; - this.BarChart.Text = "uiBarChart1"; - // - // uiLine1 - // - this.uiLine1.Font = new System.Drawing.Font("微软雅黑", 12F); - this.uiLine1.Location = new System.Drawing.Point(30, 20); - this.uiLine1.MinimumSize = new System.Drawing.Size(16, 16); - this.uiLine1.Name = "uiLine1"; - this.uiLine1.Size = new System.Drawing.Size(670, 20); - this.uiLine1.TabIndex = 20; - this.uiLine1.Text = "UIBarChart"; - this.uiLine1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // uiSymbolButton1 // this.uiSymbolButton1.Cursor = System.Windows.Forms.Cursors.Hand; this.uiSymbolButton1.Font = new System.Drawing.Font("微软雅黑", 12F); - this.uiSymbolButton1.Location = new System.Drawing.Point(348, 466); + this.uiSymbolButton1.Location = new System.Drawing.Point(348, 503); + this.uiSymbolButton1.MinimumSize = new System.Drawing.Size(1, 1); this.uiSymbolButton1.Name = "uiSymbolButton1"; this.uiSymbolButton1.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0); this.uiSymbolButton1.Size = new System.Drawing.Size(100, 27); this.uiSymbolButton1.Symbol = 61952; - this.uiSymbolButton1.TabIndex = 28; + this.uiSymbolButton1.TabIndex = 34; this.uiSymbolButton1.Text = "数据"; this.uiSymbolButton1.Click += new System.EventHandler(this.uiSymbolButton1_Click); // // uiImageButton3 // this.uiImageButton3.Cursor = System.Windows.Forms.Cursors.Hand; + this.uiImageButton3.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiImageButton3.Image = global::Sunny.UI.Demo.Properties.Resources.ChartDarkStyle; - this.uiImageButton3.Location = new System.Drawing.Point(242, 466); + this.uiImageButton3.Location = new System.Drawing.Point(242, 503); this.uiImageButton3.Name = "uiImageButton3"; this.uiImageButton3.Size = new System.Drawing.Size(100, 27); - this.uiImageButton3.TabIndex = 27; + this.uiImageButton3.TabIndex = 33; this.uiImageButton3.TabStop = false; this.uiImageButton3.Text = " Dark"; this.uiImageButton3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -101,11 +71,12 @@ // uiImageButton2 // this.uiImageButton2.Cursor = System.Windows.Forms.Cursors.Hand; + this.uiImageButton2.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiImageButton2.Image = global::Sunny.UI.Demo.Properties.Resources.ChartPlainStyle; - this.uiImageButton2.Location = new System.Drawing.Point(136, 466); + this.uiImageButton2.Location = new System.Drawing.Point(136, 503); this.uiImageButton2.Name = "uiImageButton2"; this.uiImageButton2.Size = new System.Drawing.Size(100, 27); - this.uiImageButton2.TabIndex = 26; + this.uiImageButton2.TabIndex = 32; this.uiImageButton2.TabStop = false; this.uiImageButton2.Text = " Plain"; this.uiImageButton2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -114,25 +85,56 @@ // uiImageButton1 // this.uiImageButton1.Cursor = System.Windows.Forms.Cursors.Hand; + this.uiImageButton1.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiImageButton1.Image = global::Sunny.UI.Demo.Properties.Resources.ChartDefaultStyle; - this.uiImageButton1.Location = new System.Drawing.Point(30, 466); + this.uiImageButton1.Location = new System.Drawing.Point(30, 503); this.uiImageButton1.Name = "uiImageButton1"; this.uiImageButton1.Size = new System.Drawing.Size(100, 27); - this.uiImageButton1.TabIndex = 25; + this.uiImageButton1.TabIndex = 31; this.uiImageButton1.TabStop = false; this.uiImageButton1.Text = " Default"; this.uiImageButton1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.uiImageButton1.Click += new System.EventHandler(this.uiImageButton1_Click); // + // uiLine1 + // + this.uiLine1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.uiLine1.Location = new System.Drawing.Point(30, 55); + this.uiLine1.MinimumSize = new System.Drawing.Size(16, 16); + this.uiLine1.Name = "uiLine1"; + this.uiLine1.Size = new System.Drawing.Size(670, 20); + this.uiLine1.TabIndex = 30; + this.uiLine1.Text = "UIBarChart"; + this.uiLine1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // BarChart + // + this.BarChart.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); + this.BarChart.Font = new System.Drawing.Font("微软雅黑", 12F); + this.BarChart.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(54)))), ((int)(((byte)(54)))), ((int)(((byte)(54))))); + this.BarChart.Location = new System.Drawing.Point(30, 85); + this.BarChart.MinimumSize = new System.Drawing.Size(1, 1); + this.BarChart.Name = "BarChart"; + this.BarChart.Size = new System.Drawing.Size(670, 400); + this.BarChart.TabIndex = 29; + this.BarChart.Text = "uiBarChart1"; + // // FBarChart // - this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F); + this.AllowShowTitle = true; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.ClientSize = new System.Drawing.Size(800, 563); + this.ClientSize = new System.Drawing.Size(800, 606); + this.Controls.Add(this.uiSymbolButton1); + this.Controls.Add(this.uiImageButton3); + this.Controls.Add(this.uiImageButton2); + this.Controls.Add(this.uiImageButton1); + this.Controls.Add(this.uiLine1); + this.Controls.Add(this.BarChart); this.Name = "FBarChart"; + this.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0); + this.ShowTitle = true; this.Symbol = 61568; this.Text = "BarChart"; - this.PagePanel.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.uiImageButton3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.uiImageButton2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.uiImageButton1)).EndInit(); @@ -142,11 +144,11 @@ #endregion - private UIBarChart BarChart; - private UILine uiLine1; private UISymbolButton uiSymbolButton1; private UIImageButton uiImageButton3; private UIImageButton uiImageButton2; private UIImageButton uiImageButton1; + private UILine uiLine1; + private UIBarChart BarChart; } } \ No newline at end of file diff --git a/SunnyUI.Demo/Charts/FBarChart.cs b/SunnyUI.Demo/Charts/FBarChart.cs index 34faa3aa..0d6a6745 100644 --- a/SunnyUI.Demo/Charts/FBarChart.cs +++ b/SunnyUI.Demo/Charts/FBarChart.cs @@ -1,8 +1,8 @@ using System.Drawing; -namespace Sunny.UI.Demo.Charts +namespace Sunny.UI.Demo { - public partial class FBarChart : UITitlePage + public partial class FBarChart : UIPage { public FBarChart() { @@ -84,4 +84,4 @@ namespace Sunny.UI.Demo.Charts BarChart.ChartStyleType = UIChartStyleType.Dark; } } -} \ No newline at end of file +} diff --git a/SunnyUI.Demo/Charts/FBarChart.resx b/SunnyUI.Demo/Charts/FBarChart.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/SunnyUI.Demo/Charts/FBarChart.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/SunnyUI.Demo.csproj b/SunnyUI.Demo/SunnyUI.Demo.csproj index f55b185c..7ff53b14 100644 --- a/SunnyUI.Demo/SunnyUI.Demo.csproj +++ b/SunnyUI.Demo/SunnyUI.Demo.csproj @@ -57,12 +57,6 @@ - - Form - - - FBarChart.cs - Form @@ -159,6 +153,12 @@ FListBox.cs + + Form + + + FBarChart.cs + Form @@ -380,6 +380,9 @@ FListBox.cs + + FBarChart.cs + FMain.cs diff --git a/SunnyUI/Controls/UIHeaderButton.cs b/SunnyUI/Controls/UIHeaderButton.cs index aab51163..0a1ceb76 100644 --- a/SunnyUI/Controls/UIHeaderButton.cs +++ b/SunnyUI/Controls/UIHeaderButton.cs @@ -79,12 +79,20 @@ namespace Sunny.UI button.Selected = false; } - Selected = true; + if (ShowSelected) + { + Selected = true; + } + TabControl?.SelectPage(PageIndex); base.OnClick(e); } + [DefaultValue(true)] + [Description("显示选中状态"), Category("SunnyUI")] + public bool ShowSelected { get; set; } = true; + public event EventHandler SelectedChanged; private int _symbolSize = 48;