I would like to update a form's textbox
in winforms with data that is being processed from a class file.
Example:
Class.RunProcess();
Inside of RunProcess I would like to fire an event that will update the textbox with the text that I pass in on the win form.
I know you can do this with events so I don't have to make the textbox
public or pass it into the many methods I have, I am just not quite sure how to start.
Edit: Maybe I am just not clear.
I have a windows form with a text box on it.
I have a button that runs a process.
The process is in a class file outside of the form class.
Inside this process method I would like to be able to update the text box on the main form without having to pass the TextBox as a parameter to all the methods that I will have (I currently have 6 and will be more).
I thought I could subscribe to an event that would allow me to display a message in the text box while the processes ran in my class.