bsp; {
txtDisplay.Text = "调用失败";
}
else
{
txtDisplay.Text = e.Result.ToString();
}
}
void OnCancel(object sender, EventArgs args)
{
sum = 0;
cur_number = 0;
//取消异步操作
worker.CancelAsync();
}
}
using System.ComponentModel; //BackgroundWorker
using System.Threading;
using BackgroundWorker.Service; //wcf引用名空间
另外除了BackgroundWorker, silverlight 2目前还可以使用DispatcherTimer组件定时器来
进行一些需要定时运行的任务.
源码下载:
| /uploads/soft/1_080604064354.rar |