Note that there are some explanatory texts on larger screens.

plurals
  1. POMultithreading: how to update UI to indicate progress
    primarykey
    data
    text
    <p>I've been working on the same project now since Christmas 2008. I've been asked to take it from a Console Application (which just prints out trace statements), to a full Windows App. Sure, that's fine. The only thing is there are parts of the App that can take several minutes to almost an hour to run. I need to multithread it to show the user status, or errors. But I have no idea where to begin.</p> <p>I've aready built a little UI in WPF. It's very basic, but I'd like to expand it as I need to. The app works by selecting a source, choosing a destination, and clicking start. I would like a listbox to update as the process goes along. Much in the same way SQL Server Installs, each step has a green check mark by its name as it completes.</p> <p>How does a newbie start multithreading? What libraries should I check out? Any advice would be greatly appreciated.</p> <p>p.s. I'm currently reading about this library, <a href="http://www.codeplex.com/smartthreadpool" rel="nofollow noreferrer">http://www.codeplex.com/smartthreadpool</a></p> <p>@Martin: Here is how my app is constructed:</p> <ol> <li>Engine: Runs all major components in pre-defined order</li> <li>Excel: Library I wrote to wrap COM to open/read/close/save Workbooks</li> <li>Library: Library which understands different types of workbook formats (5 total)</li> <li>Business Classes: Classes I've written to translate Excel data and prep it for Access</li> <li>Db Library: A Library I've written which uses ADO.NET to read in Access data</li> <li>AppSettings: you get the idea</li> <li>Serialier: Save data in-case of app crash</li> </ol> <p>I use everything from LINQ to ADO.NET to get data, transform it, and then output it.</p> <p><b>My main requirement is that I want to update my UI to indicate progress</b></p> <p>@Frank: What happens if something in the Background Worker throws an Exception (handled or otherwise)? How does my application recieve notice?</p> <p>@Eric Lippert: Yes, I'm investigating that right now. Before I complicate things.</p> <p>Let me know if you need more info. Currently I've running this application from a Unit Test, so I guess callig it a Console Application isn't true. I use Resharper to do this. I'm the only person right now who uses the app, but I'd like a more attractive interface</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload