/// <summary> /// 将一个ui移除 /// </summary> /// <param name="ui"></param> public void RemoveStationMsgReciever(IJFStationMsgReceiver ui) { foreach (List <IJFStationMsgReceiver> stationUIS in _StationMsgReciever.Values) { if (stationUIS.Contains(ui)) { stationUIS.Remove(ui); } } }
/// <summary> /// 为工站附加一个ui , 一般情况下由App中的架构功能调用 /// 如:不提供RealtimeUI的工站,系统会自动指派一个ui /// </summary> /// <param name="station"></param> /// <param name="ui"></param> public void AppendStationMsgReceiver(IJFStation station, IJFStationMsgReceiver rcver) { if (!_StationMsgReciever.ContainsKey(station)) { _StationMsgReciever.Add(station, new List <IJFStationMsgReceiver>()); } List <IJFStationMsgReceiver> uis = _StationMsgReciever[station]; if (!uis.Contains(rcver)) { uis.Add(rcver); } }