I have a small application that consists of multiple forms that each need to have the ability to be updated (not repainted, the data/components values redefined) when called to. So for instance, if I had a form that contained a count of some sort and another form modified that count I would need to update the form that displays the current count. With that being said it needs to implement an interface with these methods (see below). My issue comes when I want to add events to these methods so if I call the UpdateData event it would trigger the OnDataUpdate method, but because of the syntax of implementing methods and handling events you cannot do so.
So when it is implemented I would need to have:
Is there a better way to accomplish this or would I just need to create my own handle at runtime?
VB.NET:
Public Interface Updatable
Event DataUpdate()
Event DataUpdated()
'''<summary>ran when event DataUpdate raised, will update form's component values</summary>
Sub OnDataUpdate()
End Interface
So when it is implemented I would need to have:
VB.NET:
Public Sub OnDataUpdate() Implements Updatable.OnDataUpdate, Handles Me.DataUpdate 'this cannot be done here!
'code here
RaiseEvent DataUpdated
End Sub
Is there a better way to accomplish this or would I just need to create my own handle at runtime?