Exemple #1
0
 /// <summary>
 /// 接收消息
 /// </summary>
 /// <param name="messagType">消息分类</param>
 /// <param name="handler">消息委托</param>
 public void receiveMessage(string messagType, EventCenter.delegateMessage handler)
 {
     EventCenter.AddMessageListener(messagType, handler);
 }
Exemple #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)
        {
            KeyValueUpdate kvs = new KeyValueUpdate(msgName, msgContent);

            EventCenter.SendMessage(msgType, kvs);
        }