views:

38

answers:

2

I'm trying to develop an application in which I want the ability for certain forms to be able to notify any subscribers of events happening.

I understand that I'm going to have to have forms know about other interfaces in order to be able to subscribe to events etc. I'm just wondering if anybody has any hints and tips, or even a "favorite tutorial" that they could point me in the direction of so I could try to understand the programming involved in achieving such a task.

+4  A: 

This is typically handled via the Observer Pattern.

Luckily, C# built this right into the language, via Events.

Just use the standard event mechanisms in C#. It is intended for the exact purpose. See this tutorial for details.

Reed Copsey
Thanks for the guidance, appreciate it. I am pretty comfortable with events, my issue is understanding a design. Although, that Microsoft tutorial is pretty good, I'll earmark that to refer my colleagues (who are learning .NET) to. Thanks.
Hammerstein
+1  A: 

You can find best practices in common MS library: Composite UI Application Block

Yury
This is more what I was thinking of. I'm comfortable with events etc. but I just can't visualize how to piece things together to create what I want. Thanks for the response.
Hammerstein