private static void StartPopup() { m_lastForm = new CFormProgression(); m_lastForm.TopMost = true; m_lastForm.Text = m_strTitre; m_lastForm.ShowDialog(); }
/// ///////////////////////////////////////////////////////////////// public static void StartThreadWithProgress(string strTitre, ThreadStart fonctionDemarrage) { if (m_form == null) { m_form = new CFormProgression(); } m_form.ResetSegmentsProgression(); m_form.TopMost = true; m_form.m_labelText.Text = strTitre; m_form.Show(); fonctionDemarrage.BeginInvoke(new AsyncCallback(m_form.OnEndProcess), null); }
/// /////////////////////////////////////////////// public static IIndicateurProgression GetNewIndicateurAndPopup(string strTitre) { Thread th = new Thread(new ThreadStart(StartPopup)); m_lastForm = null; m_strTitre = strTitre; th.Start(); while (m_lastForm == null) { Thread.Sleep(100); } return(m_lastForm); }
/// ///////////////////////////////////////////////////////////////// private void OnEndProcess(IAsyncResult result) { ResetSegmentsProgression(); Close(); m_form = null; }