Elight.Utility/Other/UIUtils.cs
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
#if NETFRAMEWORK || WINDOWS
using Sunny.UI;
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
namespace Elight.Utility.Other
{
/// <summary>
/// UI控件多线程赋值专用
/// </summary>
public static class UIUtils
{
public delegate void InvokeBackColorDelegate(Control control, Color color);
public delegate void InvokeTextDelegate(Control control, string text);
public delegate void InvokeVisibleDelegate(Control control, bool enable);
public delegate void InvokeDataDelegate(Control control, DataTable dt);
public delegate void InvokeLineDelegate(Control control, string[] line);
public delegate void InvokeAppendLineDelegate(Control control, string line);
public delegate void InvokeAppendLineMaxDelegate(Control control, string line);
public delegate void InvokeTabIndex(UITabControl control, int index);
public delegate void InvokeLightStateDelegate(UILight light, UILightState state);
public static void InvokeLightState(this UILight light, UILightState state)
{
if (light.InvokeRequired)
{
light.BeginInvoke(new InvokeLightStateDelegate(InvokeLightState), new object[] { light, state });
}
else
{
light.State = state;
}
}
public static void InvokeBackColor(this Control control, Color color)
{
if (control.InvokeRequired)
{
control.BeginInvoke(new InvokeBackColorDelegate(InvokeBackColor), new object[] { control, color });
}
else
{
control.BackColor = color;
}
}
public static void InvokeVisible(this Control control, bool enable)
{
if (control.InvokeRequired)
{
control.BeginInvoke(new InvokeVisibleDelegate(InvokeVisible), new object[] { control, enable });
}
else
后面还有 199 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。