Sorry for the late reply. It's for an IRC client so there are loads of events going on often. Most events will be passing data for example a OnJoinedEvent would pass nick, address, #channel
vb Code:
Public Class UserJoinedChannelEventArgs
Inherits EventArgs
Private ReadOnly m_nick As String
Private ReadOnly m_channel As String
Public ReadOnly Property Nick() As String
Get
Return Me.m_nick
End Get
End Property
Public ReadOnly Property Channel() As String
Get
Return Me.m_channel
End Get
End Property
Public Sub New(ByVal nick As String, ByVal channel As String)
Me.m_nick = nick
Me.m_channel = channel
End Sub
End Class
vb Code:
Public Class SomeIrcClass
Public Event OnUserJoining As EventHandler(Of UserJoinedChannelEventArgs)
Protected Overridable Sub OnUserJoined(ByVal e As UserJoinedChannelEventArgs)
RaiseEvent OnUserJoining(Me, e)
End Sub
Private Sub SomeEvent()
' read the stream
'
' user joined
Me.OnUserJoined(New UserJoinedChannelEventArgs("nick", "#channel"))
End Sub
End Class
This look about right? So each event should have it's own class? Looks like i have a lot of writing todo