首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 一种从窗口运行后台任务的简单方法。

一种从窗口运行后台任务的简单方法。

资 源 简 介

Purpose Make backgrounding tasks under Windows.Forms simple and easy. Example Usage example: ``` using Backgrounder; public class Form1 : Form { protected ProgressBar progressBar1; protected Button button1; private BackgroundHelper helper = new BackgroundHelper(); private void button1_Click(object sender, EventArgs e) { // Execute code in the background. helper.Background(() => { for (int i = 0; i <= 100; i++) { // Continually report progress to user. helper.Foreground(i, j => { progressBar1.Value = j; }); // Simulate doing I/O or whatever. Thread.Sleep(25); } }); } } ``` Example details When a button is clicked, the progress bar will slowly tick up. Meanwhile, the GUI will continue to respond normally - Thread.Sleep() is only done on the backgrou

文 件 列 表

Backgrounder.dll
Backgrounder.pdb
TestApp
Backgrounder.dll
Backgrounder.pdb
TestApp.exe
TestApp.pdb

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP