private void nextButton_Click(object sender, EventArgs e) { if (_templateInfoList == null || _templateInfoList.Count == 0) { WorkWindow.ShowError("请先选择模板文件"); return; } WorkWindow.Cover.Visibility = Visibility.Visible; var task = new Thread(() => { string result; Tools.CreateReportFile(_templateInfoList, _regionList.ToList(), _regionTreeControl.AppType, out result); Dispatcher.Invoke(_createFinished, result); }); task.Start(); }