O'Reilly logo

C# 2008 and 2005 Threaded Programming: Beginner's Guide by Gastón C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - Running a multithreaded algorithm many times

Now, we are going to make some changes to the application to run the old star finder algorithm (now held in the previously defined method) in batch mode, processing all the images found in a hard disk folder:

  1. Stay in the project, OldStarsFinder.
  2. Add the following lines of code at the beginning of the form class definition (as we are going to use the System.IO.DirectoryInfo and System.IO. FileInfo classes):
    using System.IO;
    
  3. Add a button control showing a star finder icon and with its Text property set to Run batch old stars finder (butRunBatch). This button will call the FindOldStarsAndShowResult method and start it for each image file found in a folder.
  4. Open the Click event in the button ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required