//处理事件 private void HanleEvent(object sender, PEIEvent_Origin baseEventArgs) { if (baseEventArgs == null) { return; } EventHandler <PEIEvent_Origin> eventHandler = null; int Id = baseEventArgs.Id; if (_allActions.TryGetValue(Id, out eventHandler)) { if (eventHandler != null) { eventHandler(sender, baseEventArgs); } } }
/// <summary> /// 触发事件 /// </summary> /// <param name="sender">触发事件的对象</param> /// <param name="value">事件参数</param> public void Trigger(object sender, PEIEvent_Origin value) { HanleEvent(sender, value); }