Listening For and Raising Events in the BLL
- by OneSource
I'm working on a WinForms .Net Recording App and I have a RecordingMgr in my BLL to listen for new events captured by another class. I want to display the events in my UI and I'm stuck as to what's the best way to do this. I can think of a few scenarios to handle this but all of them seem sub-optimal:
Listen for and handle Recorded Events in both the UI and in the RecordingMgr
After receiving the event in the RecordingMgr, raise it again so that the UI can pick it up
Create a variable in RecordingMgr (e.g., a BindingList) that the UI can bind to and update it when an Event is received
Ditch the RecordingMgr and just put the event recording logic in the UI
What's the best approach? Something above or something else?