L
lltaylor
Hello,
Help, I am totally stuck, I am trying to write a sample program so I
can get to grips with Asynchronous Threads etc... However I can't come
up with a good workflow for my program.
Any help in what I should be doing/how I should structure my
application would be much appreciated.
I have written a sample application which bascially searches a set
folder structure and outputs all .txt files found within that
directory tree to the textbox on the UI, the current form of the
program is that the UI thread does all this - so there is no update to
the UI once the user presses scan, until it finishes - which is
obviously the wrong way to go about things.
I have two classes
1) The Search Class
This scans the directories and any .txt files it finds, it calls a
method
in the UI class, which inturn updates the textbox on the UI
2) The UI
i) With a button click event to start the search
ii)An update method which writes to the textbox
I want the updates to textbox to be carried out by the worker thread
so I can see the progress in real time.
Hows do I do this, and where?
I know I should be calling a BeginInvoke etc etc, but I can't for the
life of me figure out where it should go.
Any help would be a blessing.
Lloyd
Help, I am totally stuck, I am trying to write a sample program so I
can get to grips with Asynchronous Threads etc... However I can't come
up with a good workflow for my program.
Any help in what I should be doing/how I should structure my
application would be much appreciated.
I have written a sample application which bascially searches a set
folder structure and outputs all .txt files found within that
directory tree to the textbox on the UI, the current form of the
program is that the UI thread does all this - so there is no update to
the UI once the user presses scan, until it finishes - which is
obviously the wrong way to go about things.
I have two classes
1) The Search Class
This scans the directories and any .txt files it finds, it calls a
method
in the UI class, which inturn updates the textbox on the UI
2) The UI
i) With a button click event to start the search
ii)An update method which writes to the textbox
I want the updates to textbox to be carried out by the worker thread
so I can see the progress in real time.
Hows do I do this, and where?
I know I should be calling a BeginInvoke etc etc, but I can't for the
life of me figure out where it should go.
Any help would be a blessing.
Lloyd