private void ShowRunlight(string msg, RunLightInfo.Pos rpos, string username = "") { // 普通文本转换成富文本 var yellow = Cmd.GXColor.Yellow; var colorYellow = string.Format("#{0:X8}", (uint)yellow); var text = ChatChannel.FormatContent(msg); if (string.IsNullOrEmpty(username) == false) { text = string.Format("<color value=\"{0}\">[{1}]</color>{2}", colorYellow, username, text); } DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.RunLightPanel, data: new RunLightInfo() { pos = rpos, msg = text, showTime = 1, }); }
private ChatInfo ToChatInfo(uint OPDesThisid, string speakText, string name, CHATTYPE type, uint profession, uint timestmap, string voicefileid = "", uint voiceLength = 0) { speakText = speakText.Trim(); // var title = FormatCharTitle(Head, name, TimeSpan.FromTicks(timestmap).ToString(), speakText, OPDesThisid); var richText = FormatPrivateAddCharHead(Head, name, speakText, voicefileid); return(new ChatInfo() { IsMe = type == CHATTYPE.CHAT_SILENT ? Client.ClientGlobal.Instance().MainPlayer.GetName() == name : false, Id = OPDesThisid, Content = ChatChannel.FormatContent(speakText), Channel = type, Name = name, job = (int)profession, Timestamp = timestmap, voiceFileid = voicefileid, voiceLegth = voiceLength, RichText = richText }); }