/// <summary> /// 获得好友分组及列表,显示是否在线 /// </summary> /// <param name="userId"></param> /// <returns></returns> public static string GetPerOnlineGroupFriendsStr(string userId) { List <GGGroup> groupList = ChatDBUtils.GetGroupFriendsInfo(userId); string res = ""; foreach (GGGroup group in groupList) { res += group.groupName + ":["; foreach (GGUserInfo user in group.memberList) { res += GGUserUtils.GetNickAndId(user); if (onlineUserStr.Contains(user.userId)) { res += "[在线]"; } else { res += "[离线]"; } res += ToolUtils.GetSpaces(); } res += "]"; } return(res); }
/// <summary> /// 初始化个人信息 /// </summary> private void InitPerInfo() { this.picHeadImg.Image = HeadImgUtils.ShowHeadImg(SingleUtils.LOGINER); this.lblNickName.Text = GGUserUtils.GetNickAndId(SingleUtils.LOGINER); this.lblQQSign.Text = SingleUtils.LOGINER.qqSign; this.Text = SingleUtils.LOGINER.socket.RemoteEndPoint + ""; }
private void UserControl1_Load(object sender, EventArgs e) { this.width = 180; this.height = 70; this.Size = new Size(this.width, this.height); this.head.Image = this.user.headImg; this.nick.Text = GGUserUtils.GetNickAndId(this.user); this.btnAdd.Tag = this.user; }
/// <summary> /// 获得好友列表 /// </summary> /// <param name="userId"></param> /// <returns></returns> public static string GetPerFriendsStr(string userId) { List <GGGroup> groupList = ChatDBUtils.GetGroupFriendsInfo(userId); string res = ""; foreach (GGGroup group in groupList) { foreach (GGUserInfo user in group.memberList) { res += GGUserUtils.GetNickAndId(user) + ToolUtils.GetSpaces(); } } return(res); }