diff --git a/Bin/net40/SunnyUI.Demo.exe b/Bin/net40/SunnyUI.Demo.exe index 3592c858..83d46240 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 0b719b65..9845d7bf 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 7da55b19..cd163a16 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 0ccadfb2..c7bae118 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 74f88b28..2b451949 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 cc95c138..007674bb 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 ccf714dd..af8dcdf9 100644 --- a/SunnyUI.Demo/Controls/FOther.Designer.cs +++ b/SunnyUI.Demo/Controls/FOther.Designer.cs @@ -179,6 +179,7 @@ namespace Sunny.UI.Demo // // uiScrollingText2 // + this.uiScrollingText2.Active = true; this.uiScrollingText2.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); this.uiScrollingText2.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.uiScrollingText2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); @@ -191,7 +192,7 @@ namespace Sunny.UI.Demo // // uiScrollingText1 // - this.uiScrollingText1.ClickPause = true; + this.uiScrollingText1.Active = true; this.uiScrollingText1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); this.uiScrollingText1.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiScrollingText1.ForeColor = System.Drawing.Color.Red; @@ -347,7 +348,6 @@ namespace Sunny.UI.Demo // FOther // this.AllowShowTitle = true; - this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(800, 450); this.Controls.Add(this.uiSignal6); diff --git a/SunnyUI/Controls/UIScrollingText.cs b/SunnyUI/Controls/UIScrollingText.cs index fb6eec15..726c0174 100644 --- a/SunnyUI/Controls/UIScrollingText.cs +++ b/SunnyUI/Controls/UIScrollingText.cs @@ -45,16 +45,33 @@ namespace Sunny.UI timer.Interval = interval; timer.Tick += Timer_Tick; - timer.Start(); + } + + [DefaultValue(false), Description("是否滚动"), Category("SunnyUI")] + public bool Active + { + get => timer.Enabled; + set + { + timer.Enabled = value; + if (!value) + { + Reset(); + } + } } [DefaultValue(false), Description("点击暂停滚动"), Category("SunnyUI")] - public bool ClickPause { get; set; } + public bool ClickPause + { + get; set; + } private void Reset() { XPos = int.MinValue; XPos1 = int.MaxValue; + Invalidate(); } ~UIScrollingText()