小编Tin*_*ina的帖子

需要帮助来停止BackgroundWorker线程

需要帮助来停止BackgroundWorker线程.我试图阻止后台工作线程.这就是我在做的事情:

在停止按钮单击(UI图层):

if (backgroundWorker.IsBusy == true && 
    backgroundWorker.WorkerSupportsCancellation == true)
{
    backgroundWorker.CancelAsync();
}
Run Code Online (Sandbox Code Playgroud)

在DoWork事件(UI层)上:

if ((backgroundWorker.CancellationPending == true))
{
     e.Cancel = true;
}
else
{
    //Function which progresses the progress bar is called 
    //here with its definition in business layer 
}
Run Code Online (Sandbox Code Playgroud)

一旦DoWork事件被触发并且我的程序控件在Business层中定义的函数中,我如何恢复到DoWork事件以设置'e.Cancel = true'?

c# window

8
推荐指数
1
解决办法
7200
查看次数

想要了解MUMPS语法方面的帮助

你能否让我知道以下声明的含义?

S:%B= %B="@1" S:%E= %E="@999"
Run Code Online (Sandbox Code Playgroud)

syntax mumps

1
推荐指数
1
解决办法
346
查看次数

标签 统计

c# ×1

mumps ×1

syntax ×1

window ×1