I have three components. A windows forms control (custom made), a main class and a plugin class.
The plugin generates an update event, where something should be added to the control. This could be a string, a string with an url, or another control, but maybe in the future, something else.
What is the best way to design something like this?
Edit:
I should have been a bit more clear. The problem I want to solve is how to respond differently on a specific item.
for example: A plugin may choose just to add some text. It dispatches an event, and the main class should call the corresponding methods. But another plugin may choose to add a custom control, so the main class needs to call different methods.
How can I desgin the part where the main class acts differently on a specific event.
(btw, don't take the word plugin too literaly. Right now, they're just classes in the project).