I have been working on the same project now since Christmas 2008. I was asked to take it from the Console application (which simply prints trace reports) to the full Windows application. Of course, thatโs good. The only thing that is in applications that can take several minutes to almost an hour to run. I need multithreading to show user status or errors. But I donโt know where to start.
I am creating a small user interface in WPF. It is very simple, but I would like to expand it as I need. The application works by choosing a source, choosing a destination and clicking the "Start" button. I want the list to be updated as the process progresses. Just like SQL Server Installs, each step has a green flag by its name as it completes.
How does a newbie start multithreading? What libraries should I check? Any advice would be greatly appreciated.
ps I am now reading about this library, http://www.codeplex.com/smartthreadpool
@Martin: This is how my application is built:
- Engine: starts all the main components in a predetermined order
- Excel: a library that I wrote to wrap COM to open / read / close / save workbooks.
- Library: a library that understands the different types of workbook formats (5 in total).
- Business Classes: Classes I wrote to translate Excel data and prepare for access
- Db library: a library that I wrote that uses ADO.NET to read in Access data
- AppSettings: you get the idea
- Serial number: save data in case of application failure.
I use everything from LINQ to ADO.NET to get data, convert it, and output.
My basic requirement is that I want to update my user interface to indicate progress
@Frank: what happens if something in the background desktop throws an exception (handled or otherwise)? How does my application receive notification?
@ Eric Lippert: Yes, I'm studying this right now. Before you complicate the situation.
Let me know if you need more information. I am currently running this application from Unit Test, so I assume that its console application is incorrect. I am using Resharper for this. I am the only person who uses the application now, but I need a more attractive interface
Chris
source share