private void Init() { logger = new Logger(this); listBoxAvancement.Items.Clear(); listeAvancement = new List<string>(); ThreadRenamer threadRenamer = new ThreadRenamer(this); thread = new Thread(new ThreadStart(threadRenamer.Work)); thread.SetApartmentState(ApartmentState.STA); thread.Start(); }
private void btnLancer_Click(object sender, RoutedEventArgs e) { if(listBoxDossiers.Items.Count > 0) { logger = new Logger(this); listBoxAvancement.Items.Clear(); listeAvancement = new List<string>(); ThreadRenamer threadRenamer = new ThreadRenamer(this); thread = new Thread(new ThreadStart(threadRenamer.Work)); thread.SetApartmentState(ApartmentState.STA); thread.Start(); } }