/// <summary> /// 添加新记录:单聊 /// </summary> /// <param name="_Sender">发送者</param> /// <param name="_Reciver">接收者</param> /// <param name="_SendContent">内容</param> public static void AddChatInfo(string _Sender, string _Reciver, string _SendContent) { HttpRuntime.Cache[_Reciver] = true; ChatInfo CiItem = new ChatInfo(); CiItem.Sender = _Sender; CiItem.SendContent = _SendContent; CiItem.Reciver = _Reciver; CiItem.SendTime = DateTime.Now; ListClass.Engin_ChatList.Add(CiItem); }
public bool PredicateChat(ChatInfo c) { if ((c.Reciver == UserId) && (c.Sender != UserId)) { return true; } else { return false; } }
/// <summary> /// 添加新记录:群聊 /// </summary> /// <param name="_Sender">发送者</param> /// <param name="_SendContent">内容</param> public static void AddChatInfo(string _Sender, string _SendContent) { foreach (UserInfo Uif in ListClass.Engin_UserList) { ChatInfo CiItem = new ChatInfo(); CiItem.Sender = _Sender; CiItem.Reciver = Uif.UserID; HttpRuntime.Cache[CiItem.Reciver] = true; CiItem.SendContent = _SendContent; CiItem.SendTime = DateTime.Now; ListClass.Engin_ChatList.Add(CiItem); } }