/// <summary> /// 异步从服务器下载 PDF 文件 /// </summary> /// <param name="filename"></param> private async void downloadWorkSheetPDFAsync(string filename) { await Task.Run(() => { if (YUtil.DownloadFtpFile($"ftp://{Configuration.ServerIp}/{filename}", PdfDirPath + filename)) { OnChangeProductionProcessPdf(filename); } else { UIMessageBox.Show("错误", $"下载工艺文件失败,请检查 [{filename}] 是否存在于服务器", 5000); } }); }