winform跨线程操作控件,比如给文本框控件赋值 ;要操作什么控件就得在NormalSet方法中自己加类型判断
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace GameCommon
{
/// <summary>
/// 公共类
/// 创建人:长江股神
/// 2015.10.10
/// </summary>
public class Common
{
#region 跨线程操作控件
private delegate void setTexBox(Form winForm, Control control, string s);
/// <summary>
/// 跨线程控件赋值
/// </summary>
/// <param name="winForm"></param>
/// <param name="control"></param>
/// <param name="txt"></param>
public static void ControlSetText(Form winForm, Control control, string txt)
{
if (control.Invo