日期:2014-05-17 浏览次数:20538 次
public partial class Form1 : Form
{
Thread th = null;
public Form1()
{
InitializeComponent();
}
public delegate void SetText(string text,int i); //声明委托
/// <summary>
/// 委托实现
/// </summary>
/// <param name="value">值</param>
/// <param name="i">1表示为本地版本控件,2表示服务器版本控件,3表示提示信息控件</param>
public void setTextVlue(string value,int i)
{
if (i == 1)
lblOld.Text = value;
else if (i == 2)
lblNew.Text = value;
else if (i == 3)
lblMessage.Text = value;
else if (i == 4)
button1.Enabled = true;
}
/// <summary>
/// 窗体加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Form1_Load(object sender, EventArgs e)
{
th = new Thread(new ThreadStart(threadFun));
th.Start();
button1.Enabled = false;
&nb