日期:2014-05-17 浏览次数:20829 次
/// <summary>
/// 进度条委托方法
/// </summary>
/// <param name="ipos"></param>
private void SetProgressBarDelegate(int ipos)
{
if (this.InvokeRequired)
{
this.Invoke(new DelegateIntoInt(this.SetProgressBarDelegate), new object[] { ipos });
}
else
{
base.toolStripProgressBar1.Value = Convert.ToInt32(ipos);
}
}
/// <summary>
/// 执行主方法
/// </summary>
private void DoMainMethodDelegate()
{
if (this.InvokeRequired)
{
this.Invoke(new DelegateIntoNull(this.myMainMethod), new object[] { });
}
}
this.proBarThread = new Thread(new ThreadStart(this.SetToolStripProgressBar));
this.proBarThread.Start();
//执行主线程方法
this.mainThread = new Thread(new ThreadStart(this.DoMainMethodDelegate));