Private Sub onMessage(ByVal sender As Object, ByVal msg As agsXMPP.protocol.client.Message)
If msg.Type = agsXMPP.protocol.client.MessageType.chat Or agsXMPP.protocol.client.MessageType.normal Then
If msg.Body = DBNull.Value.ToString Then
If msg.Chatstate = agsXMPP.protocol.extensions.chatstates.Chatstate.composing Then
ToolStripStatusLabel1.Text = "User is typing..."
End If
If msg.Chatstate = agsXMPP.protocol.extensions.chatstates.Chatstate.paused Then
ToolStripStatusLabel1.Text = "User has paused."
End If
If msg.Chatstate = agsXMPP.protocol.extensions.chatstates.Chatstate.gone Then
ToolStripStatusLabel1.Text = "User closed chat."
End If
If msg.Chatstate = agsXMPP.protocol.extensions.chatstates.Chatstate.inactive Then
ToolStripStatusLabel1.Text = "Incoming Monitor..."
End If
If msg.Chatstate = agsXMPP.protocol.extensions.chatstates.Chatstate.None Then
ToolStripStatusLabel1.Text = "None"
End If
Else
'MsgBox("From: " + msg.From.ToString + " - Body: " + msg.Body.ToString, MsgBoxStyle.Information + MsgBoxStyle.OkOnly, "Incoming Message")
Dim NewIMWindow = New frmConversation
NewIMWindow.Show()
End If
End If
End Sub