/// <summary> /// 发送消息给窗口 /// </summary> /// <param name="name">窗口名</param> /// <param name="msgID">消息ID</param> /// <param name="paralist">参数数组</param> /// <returns></returns> public bool SendMessageToWnd(string name, UIMessage message) { WindowBase wnd = FindWndByName <WindowBase>(name); if (wnd != null && wnd.currentStates == WindowBase.WindowStates.show) { return(wnd.OnMessage(message)); } return(false); }
public bool SendMessage(UIMessage message) { for (int i = 0; i < _currentWindowNameList.Count; i++) { var wnd = FindWndByName <WindowBase>(_currentWindowNameList[i]); if (wnd != null) { wnd.OnMessage(message); } else { return(false); } continue; } return(false); }