public long Analyse() { m_Etat = Etat.EnCours; EtatModifier?.Invoke(this, EtatEngin); m_bgwAnalyse.RunWorkerAsync(); return(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(); } }
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()); }