Esempio n. 1
0
 /// <summary>
 /// 接收消息
 /// </summary>
 /// <param name="messagType">消息分类</param>
 /// <param name="handler">消息委托</param>
 public void ReceiveMessage(string messagType, MessageCenter.DelMessageDelivery handler)
 {
     MessageCenter.AddMsgListener(messagType, handler);
 }
Esempio n. 2
0
        /// <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);
        }