生成pdf时的backgroundworker [英] backgroundworker while generating pdf

查看:88
本文介绍了生成pdf时的backgroundworker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我正在生成pdf文件,该文件将存储在路径中,并提及如何使用后台工作人员完成任务.其Winforms c#

Hello,
I am generating pdf which will get stored in a path mention how can i use background worker to accomplished the task. Its Winforms c#

推荐答案

在MSDN上的示例中,您可以了解BackgroundWorker的工作方式:
In a sample on MSDN you can learn how a BackgroundWorker operates: How to: Run an Operation in the Background[^]. The DoWork and RunWorkerCompleted event handlers you''ll hook up to the backgroundworker will do the brunt of the work. You''ll have to make sure though that the processing and/or save method is encapsulated in a class you should define. That way you won''t pollute your code and everything is neatly separated. It will also make it easier for you to track the progress of the processing and saving in the front end, especially when there is more than one process going on at any one time.

Regards,

Manfred


这篇关于生成pdf时的backgroundworker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆