private void buttonArrivees_Click(object sender, EventArgs e) { jeScrute = new ResteEnEveille(); recupTranspondeur = new Thread(new ThreadStart(jeScrute.testSuspention)); recupTranspondeur.Start(); textBoxMessage.Text = "Lecture des transpondeurs en cours"; }
private void buttonDemarrer_Click(object sender, EventArgs e) { // démarrage de la course avec le thread if (comboBoxCourses.SelectedIndex != -1) { textBoxEnCours.Text = listeDesNomCourses[comboBoxCourses.SelectedIndex]; idxCourseEC = Convert.ToInt16(listeDesIdxCourses[comboBoxCourses.SelectedIndex]); Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); config.AppSettings.Settings.Remove("idxcourse"); config.AppSettings.Settings.Add("idxcourse", listeDesIdxCourses[comboBoxCourses.SelectedIndex]); config.Save(ConfigurationSaveMode.Modified); ConfigurationManager.RefreshSection("appSettings"); jeScrute = new ResteEnEveille(); recupTranspondeur = new Thread(new ThreadStart(jeScrute.testSuspention)); recupTranspondeur.Start(); textBoxMessage.Text = "Lecture des transpondeurs en cours"; } else { MessageBox.Show("Vous n'avez pas sélectioné de course !"); } }