Пример #1
0
        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();
        }
Пример #2
0
        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();
            }
        }