private static void FillFriends(Member member) { AjaxChat c = GetChatObject(member.WebMemberID); // Clear friend list before refreshing it. c.Friends.Clear(); List <ChatOnline> chatFriendsList = ChatOnline.GetChatFriendsByMemberID(member.MemberID); foreach (ChatOnline chatFriend in chatFriendsList) { AjaxChat chat = GetChatObject(chatFriend.WebMemberID); if (chat == null) { AjaxChatFriend ajaxChatFriend = new AjaxChatFriend(); ajaxChatFriend.WebMemberID = chatFriend.WebMemberID; ajaxChatFriend.OnlineStatus = (OnlineStatus)chatFriend.Status; ajaxChatFriend.FirstName = chatFriend.FirstName; ajaxChatFriend.LastName = chatFriend.LastName; ajaxChatFriend.NickName = chatFriend.NickName; ajaxChatFriend.Email = chatFriend.Email; ajaxChatFriend.CustomMessage = chatFriend.CustomMessage; ajaxChatFriend.AvatorUrl = ParallelServer.Get(chatFriend.AvatorUrl) + @"user/" + chatFriend.AvatorUrl; chat = new AjaxChat(ajaxChatFriend); } chat = AddToChatData(chatFriend.WebMemberID, chat); chat.Token = Next2Friends.Misc.UniqueID.NewWebID(); c.Friends.Add(chat.Owner); } }
public static void Login(Member member) { AjaxChatFriend owner = new AjaxChatFriend(); owner.CustomMessage = member.MemberProfile[0].TagLine; owner.Email = member.Email; owner.FirstName = member.FirstName; owner.LastName = member.LastName; owner.NickName = member.NickName; owner.OnlineStatus = OnlineStatus.Online; owner.OnlineStatusString = OnlineStatus.Online.ToString(); owner.WebMemberID = member.WebMemberID; owner.LastCommDt = DateTime.Now; ResourceFile PhotoRes = new ResourceFile(member.ProfilePhotoResourceFileID); owner.AvatorUrl = ParallelServer.Get(PhotoRes.FullyQualifiedURL) + PhotoRes.FullyQualifiedURL;; AjaxChat c = new AjaxChat(owner); c = AddToChatData(member.WebMemberID, c); c.Owner.OnlineStatus = OnlineStatus.Online; c.Token = Next2Friends.Misc.UniqueID.NewWebID(); FillFriends(member); GetMessagesFromDB(member); }
private static void FillFriends(Member member) { AjaxChat c = GetChatObject(member.WebMemberID); // Clear friend list before refreshing it. c.Friends.Clear(); List<ChatOnline> chatFriendsList = ChatOnline.GetChatFriendsByMemberID(member.MemberID); foreach (ChatOnline chatFriend in chatFriendsList) { AjaxChat chat = GetChatObject(chatFriend.WebMemberID); if (chat == null) { AjaxChatFriend ajaxChatFriend = new AjaxChatFriend(); ajaxChatFriend.WebMemberID = chatFriend.WebMemberID; ajaxChatFriend.OnlineStatus = (OnlineStatus)chatFriend.Status; ajaxChatFriend.FirstName = chatFriend.FirstName; ajaxChatFriend.LastName = chatFriend.LastName; ajaxChatFriend.NickName = chatFriend.NickName; ajaxChatFriend.Email = chatFriend.Email; ajaxChatFriend.CustomMessage = chatFriend.CustomMessage; ajaxChatFriend.AvatorUrl = ParallelServer.Get(chatFriend.AvatorUrl) + @"user/" + chatFriend.AvatorUrl; chat = new AjaxChat(ajaxChatFriend); } chat = AddToChatData(chatFriend.WebMemberID, chat); chat.Token = Next2Friends.Misc.UniqueID.NewWebID(); c.Friends.Add( chat.Owner ); } }
public static void Login(Member member) { AjaxChatFriend owner = new AjaxChatFriend(); owner.CustomMessage = member.MemberProfile[0].TagLine; owner.Email = member.Email; owner.FirstName = member.FirstName; owner.LastName = member.LastName; owner.NickName = member.NickName; owner.OnlineStatus = OnlineStatus.Online; owner.OnlineStatusString = OnlineStatus.Online.ToString(); owner.WebMemberID = member.WebMemberID; owner.LastCommDt = DateTime.Now; ResourceFile PhotoRes = new ResourceFile(member.ProfilePhotoResourceFileID); owner.AvatorUrl = ParallelServer.Get(PhotoRes.FullyQualifiedURL) + PhotoRes.FullyQualifiedURL; ; AjaxChat c = new AjaxChat(owner); c = AddToChatData(member.WebMemberID, c); c.Owner.OnlineStatus = OnlineStatus.Online; c.Token = Next2Friends.Misc.UniqueID.NewWebID(); FillFriends(member); GetMessagesFromDB(member); }
public AjaxChat(AjaxChatFriend owner) { this.owner = owner; }