private void ballStart_click(object sender, RoutedEventArgs e)
        {
            if (threads.Count() < 5)
            {
                ThreadWorker ballonworker = new BallonWorker();
                ballonworker.workerFinishedEvent += ballFinishedHandler;
                Thread ballThread = new Thread(new ThreadStart(ballonworker.work));
                MyThread mythread = new MyThread(ballThread, ballonworker);
                threads.Add(mythread);
                ballThread.Start();
                nbballThread++;
                updateTextblockDispatcher();
            }
            else {
                System.Windows.MessageBox.Show("Already 5 threads have been created");
            }

        }
 private void ballStart_click(object sender, RoutedEventArgs e)
 {
     if (threads.Count() < 5)
     {
         ThreadWorker ballonworker = new BallonWorker();
         ballonworker.workerFinishedEvent += ballFinishedHandler;
         Thread   ballThread = new Thread(new ThreadStart(ballonworker.work));
         MyThread mythread   = new MyThread(ballThread, ballonworker);
         threads.Add(mythread);
         ballThread.Start();
         nbballThread++;
         updateTextblockDispatcher();
     }
     else
     {
         System.Windows.MessageBox.Show("Already 5 threads have been created");
     }
 }