Commit 5aae82d4 authored by 段廷瑞's avatar 段廷瑞

1、工具类去重

parent abf851c5
......@@ -370,7 +370,7 @@ namespace Tools.MyUtils
/// </summary>
/// <param name="frm"></param>
/// <param name="action"></param>
public static void AsyncUI(this Form frm, Action action)
public static void AsyncUI(this Control frm, Action action)
{
if (frm.Disposing || frm.IsDisposed)
return;
......@@ -654,29 +654,6 @@ namespace Tools.MyUtils
return a <= high && a >= low;
}
#endregion
#region (扩展)控件异步UI
/// <summary>
/// 异步UI:执行方法
/// </summary>
/// <param name="ctrl"></param>
/// <param name="action"></param>
public static void AsyncUI(this Control ctrl, Action action)
{
if (ctrl.Disposing || ctrl.IsDisposed)
return;
//
if (ctrl.InvokeRequired)
{
ctrl.Invoke(action);
}
else
{
action();
}
}
#endregion
#region 图片分离
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment