Ejemplo n.º 1
0
 public long Analyse()
 {
     m_Etat = Etat.EnCours;
     EtatModifier?.Invoke(this, EtatEngin);
     m_bgwAnalyse.RunWorkerAsync();
     return(0);
 }
Ejemplo n.º 2
0
 ///****************************************************************************************
 /// <summary>
 /// Annule l'analyse en cours.
 /// </summary>
 ///****************************************************************************************
 public void AnnulerAnalyse()
 {
     if (m_bgwAnalyse != null)
     {
         m_Etat = Etat.AnnulationEnAttente;
         EtatModifier?.Invoke(this, EtatEngin);
         m_bgwAnalyse.CancelAsync();
     }
 }
Ejemplo n.º 3
0
        private void BgwAnalyse_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (e.Cancelled)
            {
                m_Etat = Etat.Annuler;
            }
            else
            {
                m_Etat = Etat.EnAttente;
            }

            EtatModifier?.Invoke(this, EtatEngin);
            AnalyseCompleter?.Invoke(this, new Item());
        }