mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-10-22 20:09:46 +08:00
Implement drop editor functions
This commit is contained in:
23
Source/GrasscutterTools/Utils/UIUtil.cs
Normal file
23
Source/GrasscutterTools/Utils/UIUtil.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace GrasscutterTools.Utils
|
||||
{
|
||||
public static class UIUtil
|
||||
{
|
||||
/// <summary>
|
||||
/// 播放按钮完成动画
|
||||
/// </summary>
|
||||
/// <param name="btn"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task ButtonComplete(Button btn)
|
||||
{
|
||||
var t = btn.Text;
|
||||
btn.Text = "√";
|
||||
btn.Enabled = false;
|
||||
await Task.Delay(300);
|
||||
btn.Text = t;
|
||||
btn.Enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user