//线程组
Task.Factory.StartNew(() =>
{
#region 计时
Stopwatch pdfTime = new Stopwatch();
// 开始计时
pdfTime.Start();
// Word转PDF
EB.Common.Tools.AsposeWordUtil.WordToPdf(FiveMworld);
//停止计时
pdfTime.Stop();
//时间毫秒为单位
var pdfTimems = pdfTime.ElapsedMilliseconds;
// 委托
// 防止委托时关闭页面中断报错
if (this.IsHandleCreated)
{
this.Invoke(new Action(() =>
{
this.lbl_worldtopdf.Text = "约为" + Convert.ToString(pdfTimems * 4 / 1000) + "秒";
this.lbl_worldtopdf.Visible = true;
this.loadingCircle14.Visible = false;
}));
}
#endregion
});