diff --git a/Bin/net40/SunnyUI.Demo.exe b/Bin/net40/SunnyUI.Demo.exe
index b89a1d18..12eb8bf2 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 67be79b2..38edfda8 100644
Binary files a/Bin/net40/SunnyUI.dll and b/Bin/net40/SunnyUI.dll differ
diff --git a/Bin/net5.0-windows/SunnyUI.dll b/Bin/net5.0-windows/SunnyUI.dll
index c687a1a1..701cabdf 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 c73cbb70..5350c152 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 675f80bf..3f2a603d 100644
Binary files a/Bin/netcoreapp3.1/SunnyUI.dll and b/Bin/netcoreapp3.1/SunnyUI.dll differ
diff --git a/SunnyUI.Demo/Controls/FOther.Designer.cs b/SunnyUI.Demo/Controls/FOther.Designer.cs
index 0e474a31..22f7f019 100644
--- a/SunnyUI.Demo/Controls/FOther.Designer.cs
+++ b/SunnyUI.Demo/Controls/FOther.Designer.cs
@@ -57,11 +57,13 @@
this.uiLabel3 = new Sunny.UI.UILabel();
this.uiToolTip1 = new Sunny.UI.UIToolTip(this.components);
this.uiProcessBar2 = new Sunny.UI.UIProcessBar();
+ this.uiRoundProcess1 = new Sunny.UI.UIRoundProcess();
this.PagePanel.SuspendLayout();
this.SuspendLayout();
//
// PagePanel
//
+ this.PagePanel.Controls.Add(this.uiRoundProcess1);
this.PagePanel.Controls.Add(this.uiProcessBar2);
this.PagePanel.Controls.Add(this.uiLabel3);
this.PagePanel.Controls.Add(this.uiLabel2);
@@ -167,7 +169,7 @@
this.uiProgressIndicator1.Location = new System.Drawing.Point(30, 298);
this.uiProgressIndicator1.MinimumSize = new System.Drawing.Size(1, 1);
this.uiProgressIndicator1.Name = "uiProgressIndicator1";
- this.uiProgressIndicator1.Size = new System.Drawing.Size(119, 132);
+ this.uiProgressIndicator1.Size = new System.Drawing.Size(120, 120);
this.uiProgressIndicator1.TabIndex = 26;
this.uiProgressIndicator1.Text = "uiProgressIndicator1";
//
@@ -265,7 +267,6 @@
this.uiLedBulb4.BlinkInterval = 500;
this.uiLedBulb4.Location = new System.Drawing.Point(507, 52);
this.uiLedBulb4.Name = "uiLedBulb4";
- this.uiLedBulb4.On = false;
this.uiLedBulb4.Size = new System.Drawing.Size(32, 32);
this.uiLedBulb4.TabIndex = 41;
this.uiLedBulb4.Text = "uiLedBulb4";
@@ -392,9 +393,24 @@
this.uiProcessBar2.Text = "50.0%";
this.uiProcessBar2.Value = 50;
//
+ // uiRoundProcess1
+ //
+ this.uiRoundProcess1.BackColor = System.Drawing.Color.Transparent;
+ this.uiRoundProcess1.Font = new System.Drawing.Font("微软雅黑", 12F);
+ this.uiRoundProcess1.Inner = 30;
+ this.uiRoundProcess1.Location = new System.Drawing.Point(228, 298);
+ this.uiRoundProcess1.MinimumSize = new System.Drawing.Size(1, 1);
+ this.uiRoundProcess1.Name = "uiRoundProcess1";
+ this.uiRoundProcess1.Outer = 50;
+ this.uiRoundProcess1.ProcessBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(200)))), ((int)(((byte)(255)))));
+ this.uiRoundProcess1.ProcessColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+ this.uiRoundProcess1.Size = new System.Drawing.Size(120, 120);
+ this.uiRoundProcess1.TabIndex = 57;
+ this.uiRoundProcess1.Text = "uiRoundProcess1";
+ this.uiRoundProcess1.Value = 80;
+ //
// FOther
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(800, 507);
this.Name = "FOther";
@@ -435,5 +451,6 @@
private UILabel uiLabel1;
private UIToolTip uiToolTip1;
private UIProcessBar uiProcessBar2;
+ private UIRoundProcess uiRoundProcess1;
}
}
\ No newline at end of file
diff --git a/SunnyUI.Demo/Controls/FOther.resx b/SunnyUI.Demo/Controls/FOther.resx
index 30293e22..031fc2d8 100644
--- a/SunnyUI.Demo/Controls/FOther.resx
+++ b/SunnyUI.Demo/Controls/FOther.resx
@@ -123,6 +123,9 @@
17, 17
+
+ 107, 17
+
35
diff --git a/SunnyUI/Controls/UIControl.cs b/SunnyUI/Controls/UIControl.cs
index b2122b6f..8c2f15c1 100644
--- a/SunnyUI/Controls/UIControl.cs
+++ b/SunnyUI/Controls/UIControl.cs
@@ -305,8 +305,6 @@ namespace Sunny.UI
/// e
protected override void OnPaint(PaintEventArgs e)
{
- base.OnPaint(e);
-
if (!Visible || Width <= 0 || Height <= 0) return;
Rectangle rect = new Rectangle(0, 0, Width - 1, Height - 1);
@@ -333,6 +331,7 @@ namespace Sunny.UI
path.Dispose();
PaintOther?.Invoke(this, e);
+ base.OnPaint(e);
}
public event PaintEventHandler PaintOther;
diff --git a/SunnyUI/Controls/UIRoundProcess.cs b/SunnyUI/Controls/UIRoundProcess.cs
new file mode 100644
index 00000000..5cc7e7c8
--- /dev/null
+++ b/SunnyUI/Controls/UIRoundProcess.cs
@@ -0,0 +1,70 @@
+/******************************************************************************
+ * SunnyUI 开源控件库、工具类库、扩展类库、多页面开发框架。
+ * CopyRight (C) 2012-2021 ShenYongHua(沈永华).
+ * QQ群:56829229 QQ:17612584 EMail:SunnyUI@QQ.Com
+ *
+ * Blog: https://www.cnblogs.com/yhuse
+ * Gitee: https://gitee.com/yhuse/SunnyUI
+ * GitHub: https://github.com/yhuse/SunnyUI
+ *
+ * SunnyUI.dll can be used for free under the GPL-3.0 license.
+ * If you use this code, please keep this note.
+ * 如果您使用此代码,请保留此说明。
+ ******************************************************************************
+ * 文件名称: UIRoundProcess.cs
+ * 文件说明: 圆形进度条
+ * 当前版本: V3.0
+ * 创建日期: 2021-04-08
+ *
+ * 2021-04-08: V3.0.2 增加文件说明
+******************************************************************************/
+
+using System.ComponentModel;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Windows.Forms;
+
+namespace Sunny.UI
+{
+ ///
+ /// 圆形滚动条
+ ///
+ [ToolboxItem(false)]
+ public class UIRoundProcess : UIControl
+ {
+ public UIRoundProcess()
+ {
+ Size = new Size(120, 120);
+ Inner = 30;
+ Outer = 50;
+
+ ProcessColor = UIColor.Blue;
+ ProcessBackColor = Color.FromArgb(155, 200, 255);
+ base.BackColor = Color.Transparent;
+ ShowText = false;
+ ShowRect = false;
+ }
+
+ public int Inner { get; set; }
+
+ public int Outer { get; set; }
+
+ public Color ProcessColor { get; set; }
+
+ public Color ProcessBackColor { get; set; }
+
+ public int Value { get; set; }
+
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ base.OnPaint(e);
+
+ }
+
+ protected override void OnPaintFill(Graphics g, GraphicsPath path)
+ {
+ g.FillFan(ProcessBackColor, ClientRectangle.Center(), Inner, Outer, 0, 360);
+ g.FillFan(ProcessColor, ClientRectangle.Center(), Inner, Outer, -90, Value / 100.0f * 360);
+ }
+ }
+}