Esempio n. 1
0
 /// <summary>
 /// 发送全局消息
 /// </summary>
 /// <param name="key">消息名称</param>
 /// <param name="values">消息名称</param>
 public static void SendMessageToGlobal(string key, object values)
 {
     MessageCenter.SendMessage(Define.MESSAGE_TYPE_GLOBAL, key, values);
 }
Esempio n. 2
0
 /// <summary>
 /// 发送给指定UI消息
 /// </summary>
 /// <param name="uIFormType">接收消息UI面板</param>
 /// <param name="key">消息名称</param>
 /// <param name="values">消息体</param>
 public static void SendMessageToUIForm(EnumUIFormType uIFormType, string key, object values)
 {
     MessageCenter.SendMessage(uIFormType.ToString() + "Msg", key, values);
 }
Esempio n. 3
0
 /// <summary>
 /// 取消所有的消息监听
 /// </summary>
 public static void ClearAllMsgListener()
 {
     MessageCenter.ClearAllMsgListener();
 }
Esempio n. 4
0
 /// <summary>
 /// 发送消息
 /// </summary>
 /// <param name="messageType">消息类型</param>
 /// <param name="key">消息名称</param>
 /// <param name="values">消息体</param>
 public static void SendMessage(string messageType, string key, object values)
 {
     MessageCenter.SendMessage(messageType, key, values);
 }
Esempio n. 5
0
 /// <summary>
 /// 取消消息监听
 /// </summary>
 /// <param name="messageType">消息分类</param>
 /// <param name="handler">消息委托</param>
 public static void RemoveMsgListener(string messageType, Action <string, object> handler)
 {
     MessageCenter.RemoveMsgListener(messageType, handler);
 }