public DefaultReceiver(string id) { ID = id; Handling = false; MsgList = new Queue(); MsgMethodInfos = new Dictionary <uint, JMethodInfo>(); MsgHandlers = new Dictionary <uint, MsgAction <Message> >(); MsgMonitor.RegisteReceiver(this); RegisteMsgHandler(MsgType.Dispose, Dispose); ParseMsgHandler(this); }
public void RegisteReceiveMsg(uint msg, JMethodInfo method) { MsgMonitor.RegisteMsgReceiver(msg, this); RegisteMsgHandler(msg, method); }
public void RegisteReceiveMsg(uint msg, MsgAction <Message> action) { MsgMonitor.RegisteMsgReceiver(msg, this); RegisteMsgHandler(msg, action); }
public void CreateAndPostMsg(uint msg, string[] receivers = null, object wParam = null, object lParam = null) { MsgMonitor.CreateAndPostMsg(msg, ID, receivers, wParam, lParam); }
public Dictionary <string, object> CreateAndSendMsg(uint msg, string[] receivers = null, object wParam = null, object lParam = null) { return(MsgMonitor.CreateAndSendMsg(msg, ID, null, wParam, lParam)); }
//[MsgHandler(MsgType.Dispose, false, "释放消息")] protected virtual object Dispose(Message msg) { MsgMonitor.RemoveReceiver(ID); return(null); }
public void RemoveReceiveMsg(uint msg) { MsgMonitor.RemoveMsgReceiver(msg, this); RemoveMsgHandler(msg); }