更新整理
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 824 B |
@@ -76,7 +76,7 @@ public class ProgressRing : System.Windows.Controls.Control
|
||||
/// </summary>
|
||||
protected static void OnProgressChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
if(d is not ProgressRing control)
|
||||
if (d is not ProgressRing control)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -91,12 +91,12 @@ public class ProgressRing : System.Windows.Controls.Control
|
||||
{
|
||||
var percentage = Progress;
|
||||
|
||||
if(percentage > 100)
|
||||
if (percentage > 100)
|
||||
{
|
||||
percentage = 100;
|
||||
}
|
||||
|
||||
if(percentage < 0)
|
||||
if (percentage < 0)
|
||||
{
|
||||
percentage = 0;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public class ProgressRing : System.Windows.Controls.Control
|
||||
// (360 / 100) * percentage
|
||||
var endAngle = 3.6d * percentage;
|
||||
|
||||
if(endAngle >= 360)
|
||||
if (endAngle >= 360)
|
||||
{
|
||||
endAngle = 359;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user