private void Button_Click(object sender, RoutedEventArgs e) { if (PartieEnCours == false) { gbw = new GameBackgroundWorker(maSimulation, this); btnStart.Content = "Arreter"; PartieEnCours = true; } else { gbw.CancelGame(); WriteLog("PARTIE FINIE: arret demandé"); } }