How to Add a Friend / Contact
[Visual Basic]
Private Sub AddAContactToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddAContactToolStripMenuItem.Click
Dim addfr As New IMSDK_DEMO.FrmAddFriend
For i As Integer = 0 To IMCUser.Groups.Count - 1
If IMCUser.Groups.Item(i).GroupName <> "" Then
addfr.GroupsCB.Items.Add(IMCUser.Groups.Item(i).UID)
End If
Next
If addfr.ShowDialog = Windows.Forms.DialogResult.OK Then
IMC.BeginAddFriend(addfr.AddFriendTB.Text, addfr.GroupsCB.Text, addfr.AddFriMessageTB.Text)
End If
End Sub
[Visual Basic]
Private Sub IMC_OnNewFriendAdded(ByVal FriendUsername As String) Handles IMC.OnNewFriendAdded
Debug.WriteLine(FriendUsername & " Added but the Authorization status is unAuthorized")
End Sub
[Visual Basic]
Private Sub IMC_OnNewFriendAlreadyAdded(ByVal FriendUsername As String) Handles IMC.OnNewFriendAlreadyAdded
Debug.WriteLine(FriendUsername & " Already in your list")
End Sub
[Visual Basic]
Private Sub IMC_OnNewFriendDoesNotExsist(ByVal FriendUsername As String) Handles IMC.OnNewFriendDoesNotExsist
Debug.WriteLine(FriendUsername & " Does Not Exsist")
End Sub
[Visual Basic]
Private Sub IMC_OnFriendNotAuthorized(ByVal FriendUsername As String, ByVal Message As String) Handles IMC.OnFriendNotAuthorized
Debug.WriteLine("User : " & FriendUsername & " has denied your invitation with a message : " & Message)
End Sub
[Visual Basic]
Private Sub IMC_OnFriendAuthorized(ByVal FriendUsername As String, ByVal online As Boolean) Handles IMC.OnFriendAuthorized
Debug.WriteLine("user : " & FriendUsername & " has authorized you and is online :" & online.ToString)
End Sub
[Visual Basic]
Private Sub IMC_OnTotalNumberOfFriendsExceeds(ByVal FriendUsername As String) Handles IMC.OnTotalNumberOfFriendsExceeds
Debug.WriteLine("User cannot be added as Total Number Of Friends Exceeded :" & FriendUsername)
End Sub