コード例 #1
0
        //处理事件
        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);
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// 触发事件
 /// </summary>
 /// <param name="sender">触发事件的对象</param>
 /// <param name="value">事件参数</param>
 public void Trigger(object sender, PEIEvent_Origin value)
 {
     HanleEvent(sender, value);
 }