public PeTipMsg(string content, string iconName, EMsgLevel level, EMsgType msgType = EMsgType.Misc, int musicID = -1) { m_IconName = iconName; m_Content = content; m_MsgType = msgType; m_MusicID = musicID; m_Style = EStyle.Icon; if (level == EMsgLevel.Norm) { m_Color = s_NormalColor; } else if (level == EMsgLevel.Warning) { m_Color = s_WarningColor; } else if (level == EMsgLevel.Error) { m_Color = s_ErrorColor; } else if (level == EMsgLevel.HighLightRed) { m_Color = s_HighLightRed; } PeTipsMsgMan.Instance.AddTipMsg(this); }
public void DoLog(EMsgType msgType, string msg) { foreach (var logger in m_Loggers) { logger.Write(msgType, msg); } }
public Mesage(EMsgType msgType, string msginfo, string sender, string msg, string repliedTo) { this.msginfo = msginfo; this.sender = sender; this.msg = msg; this.repliedTo = repliedTo; this.msgType = msgType; }
private byte[] FillMessageData(EMsgType eMsgType, byte[] dataBuffer) { var tmpBuff = BitConverter.GetBytes((ushort)eMsgType); Utility.ConvertToBigEndianShort(tmpBuff); //Debug.LogFormat("tmpBuff [0] = {0} 1 = {1} ", tmpBuff[0], tmpBuff[1]); var dstBuffer = new byte[2 + dataBuffer.Length]; Array.Copy(tmpBuff, dstBuffer, 2); Array.Copy(dataBuffer, 0, dstBuffer, 2, dataBuffer.Length); return(dstBuffer); }
public bool LoadFromNode(XmlElement Node) { Description = Node.GetAttribute("Description"); Driver = Node.GetAttribute("Driver"); Message_No = Convert.ToInt32(Node.GetAttribute("Message_No")); MsgType = (EMsgType)Convert.ToInt32(Node.GetAttribute("Type")); Function = Node.GetAttribute("Function"); Starting = Node.GetAttribute("Starting"); Number = Node.GetAttribute("Number"); Delay_Time = Convert.ToInt32(Node.GetAttribute("Delay_Time")); QuLen = Convert.ToInt32(Node.GetAttribute("QuLen")); ReLen = Convert.ToInt32(Node.GetAttribute("ReLen")); Priority = (EMsgPriority)Convert.ToInt32(Node.GetAttribute("Priority")); return(true); }
private void Log(string log, EMsgType msgType, bool isClearBefore) { Action <String> updateAction = new Action <string>((logMsg) => { string msgT = string.Empty; switch (msgType) { case EMsgType.Msg_Warning: msgT = "警告:"; break; case EMsgType.Msg_Error: msgT = "错误:"; break; default: msgT = "信息:"; break; } if (isClearBefore) { sv_output.Content = string.Empty; } else { StringBuilder s = new StringBuilder(); s.Append(" "); s.Append(msgT); s.Append(logMsg); s.Append("\n"); sv_output.Content += s.ToString(); } sv_output.ScrollToBottom(); }); this.Dispatcher.BeginInvoke(updateAction, log); }
/// <summary> /// 构造Socket信息对象 /// </summary> /// <param name="msgType">消息类型</param> /// <param name="message">消息内容</param> public ModClientMessage(EMsgType msgType, string message) { MsgType = msgType; Message = string.IsNullOrEmpty(message) ? ISDefault.DefMessage : message; }
public static void Register(string content, Texture iconTex, EMsgLevel level, EMsgType msgType = EMsgType.Misc, int musicID = -1) { new PeTipMsg(content, iconTex, level, msgType, musicID); }
public Msg(EMsgType type, string text) { this.type = type; this.text = text; }
/// <summary> /// /// </summary> public MessageAddCommand(string phone, string code, EMsgType msgType) { Phone = phone; Code = code; MessageType = msgType; }
public MsgBase(EMsgType msg_type) { EventType = msg_type; }
public static void error(string str, EMsgType type = EMsgType.None) { Debug.LogError(_frameNum + " : " + str); }
public MessageBase(EMsgDirection _dir, EMsgType _type, UInt16 _msg_id) { MsgDirection = (Byte)_dir; MsgType = (Byte)_type; MsgId = _msg_id; }