You are here: MessengerYouLike.IMSDK > IMSDK Reference > IMSDK Namespace > Classes > Friends Class > Friends Classes > Friends.MFriend Class
MessengerYouLike
Friends.MFriend Class

This Class Exposes all the properties and methods of the Contacts which are added to IMClient

IMSDK.Friends.MFriend
C#
public class MFriend;
Visual Basic
Public Class MFriend
[Visual Basic]
 
'Create a new IMClient
Dim MC as new IMSDK.IMClient
 
 
 
'Create a new MCUser
 Public MCUser As New IMSDK.User
 
 
 
'Call the Listen Sub
MC.Listen()
 
 
 
'Now Try to login
MC.BeginLogin(TxtUsername.Text,TxtPassword.Text)
 
 
 
'if username and password is valid then
Private Sub MC_OnLoggedin(ByVal UserObject As IMSDK.User) Handles MC.OnLoggedin
    Debug.WriteLine("Username logged in : " & MCUser.Username & " , " & MCUser.Password)
 
        MCUser = New IMSDK.User
        MCUser = UserObject
        Msgbox("Username is " & MCUser.Username)
 
End Sub
 
 
 
'if username or password is invalid then
Private Sub MC_OnUsernameOrPasswordInvalid(ByVal Username As String, ByVal Password As String) Handles MC.OnUsernameOrPasswordInvalid
  Debug.WriteLine("Username password invalid : " & Username & " , " & Password)
End Sub
 
 
 
 
   Function loadlv2() As Boolean
        FriendsTV.Nodes.Clear()
 
 
 
        For i As Integer = 0 To MCUser.Groups.Count - 1
            Dim nd2 As New TreeNode
            With nd2
 
                .ToolTipText = "Online = " & MCUser.Groups.Item(i).TotalOnlineFriends.ToString & _
               "Offline = " & MCUser.Groups.Item(i).TotalOfflineFriends.ToString & _
               "Busy = " & MCUser.Groups.Item(i).TotalBusyFriends.ToString & _
               "unauthorized = " & MCUser.Groups.Item(i).TotalUnAuthFriends
 
                .Text = MCUser.Groups.Item(i).GroupName & " ( " & MCUser.Groups.Item(i).TotalOnlineFriends.ToString & " / " & MCUser.Groups.Item(i).TotalFriends.ToString & " )"
                .Tag = MCUser.Groups.Item(i).UID
            End With
 
            FriendsTV.Nodes.Add(nd2)
 
            Dim fr As IMSDK.Friends = MCUser.Groups.Item(i).Friends
 
            For j As Integer = 0 To fr.Count - 1
                Dim nd3 As New TreeNode
 
                With nd3
                    .Text = fr.Item(j).FriendUsername & " - " & fr.Item(j).FriendStatus.ToString & " - " & fr.Item(j).FriendAuthStatus.ToString & " - " & fr.Item(j).Blocked.ToString & " - " & fr.Item(j).AmIBlocked.ToString
                    .Tag = fr.Item(j).FriendUsername
                End With
 
                FriendsTV.Nodes.Item(FriendsTV.Nodes.IndexOf(nd2)).Nodes.Add(nd3)
 
            Next j
 
        Next i
 
        FriendsTV.ExpandAll()
        FriendsTV.Visible = True
 
End Function
Topics
Name 
Description 
 
 
Public Methods
Public Constructors
 
Name 
Description 
 
New 
This is New, a member of class MFriend. 
MFriend Properties
 
Name 
Description 
 
This Property shows that wether the logged in user is blocked by this Friend or not  
 
This Property shows that this friend is Blocked by the logged in user or not  
 
This Property shows the updated date time of the display picture in string format  
 
This Property shows the Local Path to the Display picture if there is no display picture this property is empty  
 
This Property shows the IMSDK.IMClient.AuthorizationStatus of this friend  
 
This Property show's the Email Address of the User the one they specified at time of registration  
 
This Property shows the IMSDK.IMClient.Status of this friend  
 
This Property shows the username of this friend  
 
UID 
This Property shows the unique ID for this Friend
This property is different for each Logged in session means if the user logs out and logs in all friends will be assigned a new GUID  
Public Constructors
 
Name 
Description 
 
New 
This is New, a member of class MFriend. 
Name 
Description 
 
 
 
Name 
Description 
 
This Property shows that wether the logged in user is blocked by this Friend or not  
 
This Property shows that this friend is Blocked by the logged in user or not  
 
This Property shows the updated date time of the display picture in string format  
 
This Property shows the Local Path to the Display picture if there is no display picture this property is empty  
 
This Property shows the IMSDK.IMClient.AuthorizationStatus of this friend  
 
This Property show's the Email Address of the User the one they specified at time of registration  
 
This Property shows the IMSDK.IMClient.Status of this friend  
 
This Property shows the username of this friend  
 
UID 
This Property shows the unique ID for this Friend
This property is different for each Logged in session means if the user logs out and logs in all friends will be assigned a new GUID  
Copyright (c) 2007. All rights reserved.