public static void SendMessage(string msgType, KeyValuesUpdate kv) { if (dicMsgs.TryGetValue(msgType, out DelMessageDelivery del)) { del?.Invoke(kv); } }
/// <summary> /// 发送方法 /// </summary> /// <param name="name">消息类型</param> /// <param name="msgName">消息名称</param> /// <param name="msgContent">消息内容</param> protected void SendMsg(string msgType, string msgName, object msgContent) { KeyValuesUpdate kv = new KeyValuesUpdate(msgName, msgContent); MessageCenter.SendMessage(msgType, kv); }