/// <summary> /// stop /// </summary> /// <returns></returns> public Boolean Stop() { Boolean blnReturn = true; try { if (runnerDeleteData != null) { if (runnerDeleteData.Running) { runnerDeleteData.Stop(); blnReturn = false; } } if (runnerEXFO != null) { if (runnerEXFO.Running) { runnerEXFO.Stop(); blnReturn = false; } } } catch (Exception ex) { throw ex; } return(blnReturn); }
/// <summary> /// stop /// </summary> /// <returns></returns> public Boolean Stop() { Boolean blnReturn = true; runnerCDFO = new ThreadProcessCDFO(log); runnerLHFO = new ThreadProcessLHFO(log); try { if (runner != null) { if (runner.Running) { // 确认是否停止 //if (MessageBox.Show("后台线程正在执行,是否结束线程并退出?", "确认", MessageBoxButtons.OKCancel) != DialogResult.OK) //{ runner.Stop(); blnReturn = false; //} //else //{ // blnReturn = true; //} } } if (runnerEXFO != null) { if (runnerEXFO.Running) { runnerEXFO.Stop(); blnReturn = false; } } //add by Peng 20180321 if (runnerFoxconn != null) { if (runnerFoxconn.Running) { runnerFoxconn.Stop(); blnReturn = false; } } if (runnerJUEFEI != null) { if (runnerJUEFEI.Running) { runnerJUEFEI.Stop(); blnReturn = false; } } runnerLHFO.Stop(); runnerCDFO.Stop(); blnReturn = false; } catch (Exception ex) { throw ex; } return(blnReturn); }