Commit a065554d authored by keyongyu's avatar keyongyu

2.0

parent 7e704d8b
...@@ -1028,13 +1028,16 @@ void checkupdate(bool showNew) ...@@ -1028,13 +1028,16 @@ void checkupdate(bool showNew)
} }
bool CancelTask() bool CancelTask()
{ {
bool bl=MyMsg.Question(LMSG.IfCancelTask); bool bl=false;
if(tasker !=null && tasker.IsRuning()){
bl=MyMsg.Question(LMSG.IfCancelTask);
if(bl){ if(bl){
if(tasker!=null) if(tasker!=null)
tasker.Cancel(); tasker.Cancel();
if(bgWorker1.IsBusy) if(bgWorker1.IsBusy)
bgWorker1.CancelAsync(); bgWorker1.CancelAsync();
} }
}
return bl; return bl;
} }
void Menuitem_cancelTaskClick(object sender, EventArgs e) void Menuitem_cancelTaskClick(object sender, EventArgs e)
......
No preview for this file type
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment