public override void work() { ballonInstance.Go(); //if (OnUpdateStatus == null) return; EventArgs args = new EventArgs(); OnworkerFinishedEvent(args); }
// Déclenche la création d'un thread 'Ballon'. private void Ballon_Click(object sender, RoutedEventArgs e) { Ballon b = new Ballon(); b.FormClosed += (s, ev) => App.Current.Dispatcher.BeginInvoke( new Action(() => Ballon_CloseEvent(s, ev))); Thread t = new Thread(() => b.Go()); b.threadId = t.ManagedThreadId; t.Name = "Ballon"; t.Start(); AddThread(t); }