/// <summary> /// On completion of background worker /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { try { f1.Close(); } catch (Exception ex) { MessageBox.Show("CR27" + ex.Message, "IPCA", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void bwrk1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { try { if (frmLodingObj != null && isSend) { frmLodingObj.Close(); } } catch (Exception ex) { MessageBox.Show("SM" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void button1_Click(object sender, EventArgs e) { if (m_Popfrm == null) { m_Popfrm = new frmLoading(); m_Popfrm.Show(); DWGLoad(); System.Windows.Forms.Application.DoEvents(); m_Popfrm.Close(); m_Popfrm = null; System.Windows.Forms.Application.DoEvents(); if (m_pFeature == null) { MessageBox.Show("没有找到范围线\n", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } //backgroundWorker1.RunWorkerAsync(); } //m_threadDWG = new Thread(new ThreadStart(DWGLoad)); //// Start the thread //m_threadDWG.Start(); }
public static bool Hide() { loading.Close(); }
private void DWGLoaded(object sender, EventArgs e) //用thread有异常 { m_Popfrm.Close(); //线程不能调用m_Popfrm }