private void Handle(EventModel ev) { //指定日期的事件 if (ev.EventType == Event.Types.EventType.OnTimeChanged) { var condition = ev.Condition as OnTimeChangedCondition; _timerService.StartNew(ev.ID, () => { eventService.Invoke(ev, null); }, condition.Time, condition.RepetitionType); } //计时循环事件 if (ev.EventType == Event.Types.EventType.OnIntervalTimer) { var condition = ev.Condition as OnIntervalTimerCondition; _timerService.StartNew(ev.ID, () => { eventService.Invoke(ev, null); }, condition.Seconds, condition.Num); } }