Getting progress status out of a class library method

Posted by Richard on Stack Overflow See other posts from Stack Overflow or by Richard
Published on 2010-04-26T01:44:56Z Indexed on 2010/04/26 1:53 UTC
Read the original article Hit count: 281

Filed under:
|

This app that I am doing uses a class library (if I dare call it that) to do the bulk of the work: 2 main methods in there (DoWork and UndoWork) use the other classes to achieve thier goal. Now that that works, I want to get out of the Console test enviroment and do a GUI.

How would I get the status of say, the DoWork() method to update a progress bar? Should I multilate the class library (which currently works with the Console and Windows.Forms) to update? The problem with that is that I would surely have to make the class library use Window.Forms which will mess up the console testing apps (And there are lots of them - I tested all the way through, and then all together).

Could you suggest some ideas, or places I can read up about ideas (the whole point of writing this this program is to learn, afer all)?

Oh, by the way, suggestions like "foresight" or "planning" probably won't help here...(now, anywyay!) - But certainly will in future projects!

© Stack Overflow or respective owner

Related posts about c#

Related posts about progressbar