| | |
| | | using System.Text; |
| | | using System.Collections; |
| | | using vnxbqy.UI; |
| | | using System; |
| | | |
| | | public class ChatData |
| | | { |
| | | // public ChatData(string content) |
| | | // { |
| | | // _content = content; |
| | | // if (ChatCenter.s_VoiceRegex.IsMatch(_content)) |
| | | // { |
| | | // _content = ChatCenter.s_VoiceRegex.Replace(_content, string.Empty); |
| | | // } |
| | | // richText = new StringBuilder(); |
| | | // richText.Length = 0; |
| | | // createTime = DateTime.Now; |
| | | // } |
| | | public ChatData(string content) |
| | | { |
| | | _content = content; |
| | | if (ChatCenter.s_VoiceRegex.IsMatch(_content)) |
| | | { |
| | | _content = ChatCenter.s_VoiceRegex.Replace(_content, string.Empty); |
| | | } |
| | | richText = new StringBuilder(); |
| | | richText.Length = 0; |
| | | createTime = DateTime.Now; |
| | | } |
| | | |
| | | private string _content = string.Empty; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | // public ChatInfoType type { get; protected set; } |
| | | public ChatInfoType type { get; protected set; } |
| | | |
| | | // public DateTime createTime { get; set; } |
| | | public DateTime createTime { get; set; } |
| | | |
| | | // private ChatInfoType m_DetailType = ChatInfoType.World; |
| | | // public ChatInfoType detailType |
| | | // { |
| | | // get |
| | | // { |
| | | // return m_DetailType; |
| | | // } |
| | | // set |
| | | // { |
| | | // m_DetailType = value; |
| | | // } |
| | | // } |
| | | private ChatInfoType m_DetailType = ChatInfoType.World; |
| | | public ChatInfoType detailType |
| | | { |
| | | get |
| | | { |
| | | return m_DetailType; |
| | | } |
| | | set |
| | | { |
| | | m_DetailType = value; |
| | | } |
| | | } |
| | | |
| | | public StringBuilder richText; |
| | | |
| | |
| | | |
| | | public class ChatUeseData : ChatData |
| | | { |
| | | public ChatUeseData() |
| | | { |
| | | |
| | | } |
| | | |
| | | public ChatUeseData(string _content, int player, string name, string extra)// : base(_content) |
| | | public ChatUeseData(string _content, int player, string name, string extra) : base(_content) |
| | | { |
| | | this.player = player; |
| | | this.name = name; |
| | |
| | | |
| | | public class ChatSystemData : ChatData |
| | | { |
| | | // public ChatSystemData(string content) : base(content) |
| | | // { |
| | | // type = ChatInfoType.System; |
| | | // } |
| | | public ChatSystemData(string content) : base(content) |
| | | { |
| | | type = ChatInfoType.System; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | public class ChatWorldData : ChatUeseData |
| | | { |
| | | // public ChatWorldData(string content, int player, string name, string extra) : base(content, player, name, extra) |
| | | // { |
| | | // type = ChatInfoType.World; |
| | | // } |
| | | public ChatWorldData(string content, int player, string name, string extra) : base(content, player, name, extra) |
| | | { |
| | | type = ChatInfoType.World; |
| | | } |
| | | } |
| | | |
| | | public class ChatAreaData : ChatUeseData |
| | | { |
| | | // public ChatAreaData(string content, int player, string name, string extra) : base(content, player, name, extra) |
| | | // { |
| | | // type = ChatInfoType.Area; |
| | | // } |
| | | public ChatAreaData(string content, int player, string name, string extra) : base(content, player, name, extra) |
| | | { |
| | | type = ChatInfoType.Area; |
| | | } |
| | | } |
| | | |
| | | public class ChatCrossServerData : ChatUeseData |
| | | { |
| | | // public ChatCrossServerData(string content, int player, string name, string extra) : base(content, player, name, extra) |
| | | // { |
| | | // type = ChatInfoType.CrossServer; |
| | | // } |
| | | public ChatCrossServerData(string content, int player, string name, string extra) : base(content, player, name, extra) |
| | | { |
| | | type = ChatInfoType.CrossServer; |
| | | } |
| | | } |
| | | |
| | | public class ChatFactionData : ChatUeseData |
| | | { |
| | | // public ChatFactionData(string content, int player, string name, string extra, ChatInfoType detailType = ChatInfoType.default1) : base(content, player, name, extra) |
| | | // { |
| | | // type = ChatInfoType.default1; |
| | | // this.detailType = detailType; |
| | | // } |
| | | public ChatFactionData(string content, int player, string name, string extra, ChatInfoType detailType = ChatInfoType.default1) : base(content, player, name, extra) |
| | | { |
| | | type = ChatInfoType.default1; |
| | | this.detailType = detailType; |
| | | } |
| | | } |
| | | |
| | | public class ChatTeamData : ChatUeseData |
| | | { |
| | | // public ChatTeamData(string content, int player, string name, string extra, ChatInfoType detailType = ChatInfoType.Team) : base(content, player, name, extra) |
| | | // { |
| | | // type = ChatInfoType.Team; |
| | | // this.detailType = detailType; |
| | | // } |
| | | public ChatTeamData(string content, int player, string name, string extra, ChatInfoType detailType = ChatInfoType.Team) : base(content, player, name, extra) |
| | | { |
| | | type = ChatInfoType.Team; |
| | | this.detailType = detailType; |
| | | } |
| | | } |
| | | |
| | | public class ChatFamilyData : ChatUeseData |
| | | { |
| | | // public ChatFamilyData(string content, int player, string name, string extra, ChatInfoType detailType = ChatInfoType.Fairy) : base(content, player, name, extra) |
| | | // { |
| | | // type = ChatInfoType.Fairy; |
| | | // this.detailType = detailType; |
| | | // } |
| | | public ChatFamilyData(string content, int player, string name, string extra, ChatInfoType detailType = ChatInfoType.Fairy) : base(content, player, name, extra) |
| | | { |
| | | type = ChatInfoType.Fairy; |
| | | this.detailType = detailType; |
| | | } |
| | | } |
| | | |
| | | public class ChatInviteData : ChatUeseData |
| | | { |
| | | // public ChatInviteData(string content, int player, string name, string extra) : base(content, player, name, extra) |
| | | // { |
| | | // type = ChatInfoType.Invite; |
| | | // } |
| | | public ChatInviteData(string content, int player, string name, string extra) : base(content, player, name, extra) |
| | | { |
| | | type = ChatInfoType.Invite; |
| | | } |
| | | } |
| | | |
| | | public class ChatFriendData : ChatUeseData |
| | | { |
| | | // public ChatFriendData(string content, int player, string name, string extra, string toName, byte talkType, uint toPlayer) : base(content, player, name, extra) |
| | | // { |
| | | // type = ChatInfoType.Friend; |
| | | // this.toName = toName; |
| | | // this.talkType = talkType; |
| | | // this.toPlayer = (int)toPlayer; |
| | | // } |
| | | public ChatFriendData(string content, int player, string name, string extra, string toName, byte talkType, uint toPlayer) : base(content, player, name, extra) |
| | | { |
| | | type = ChatInfoType.Friend; |
| | | this.toName = toName; |
| | | this.talkType = talkType; |
| | | this.toPlayer = (int)toPlayer; |
| | | } |
| | | |
| | | public string toName { get; protected set; } |
| | | |