/// <summary> /// 发送消息 /// </summary> /// <param name="messageType"></param> /// <param name="kv"></param> public static void SendMessage(string messageType, KeyValuesUpdate kv) { DelMessageDelivery del; if (dicMessages.TryGetValue(messageType, out del)) { if (del != null) { del(kv); } } }
public static void SendMessage(string messageType, string msgName, object msgContent) { KeyValuesUpdate kv = new KeyValuesUpdate(msgName, msgContent); DelMessageDelivery del; //委托 if (_dicMessages.TryGetValue(messageType, out del)) { if (del != null) { //调用委托 del(kv); } } }
/// <summary> /// 发送消息 /// </summary> /// <param name="msgType">消息的类型</param> /// <param name="msgName">消息名称</param> /// <param name="msgContent">消息内容</param> protected void SendMessage(string msgType, string msgName, object msgContent) { KeyValuesUpdate kvs = new KeyValuesUpdate(msgName, msgContent); MessageCenter.SendMessage(msgType, kvs); }
/// <summary> /// 发送消息 /// </summary> /// <param name="strMsgType">消息大类</param> /// <param name="strSmallClassType">消息小类</param> /// <param name="strMsgContent">消息内容</param> protected void SendMessage(string strMsgType, string strSmallClassType, object objMsgContent) { KeyValuesUpdate kv = new KeyValuesUpdate(strSmallClassType, objMsgContent); MessageCenter.SendMessage(strMsgType, kv); }