Ejemplo n.º 1
0
        private void DeleteEvent(IEvent target)
        {
            if (target == null)
            {
                return;
            }

            target.DisposeTimer();

            ActivatedEvents.Remove(target);
            ecdb.DeleteEvent((CustomEvent)target);

            EventIsDeletedEvent(target);
            target = null;
        }
Ejemplo n.º 2
0
        public void DeleteEvent(Guid targetGUID)
        {
            // NOTE: delete event both in database and ActivatedList
            IEvent target = ecdb.GetEvent(targetGUID);

            if (target == null)
            {
                return;
            }

            // Delete target in both database and activated list
            ecdb.DeleteEvent(target.GUID);

            IEvent activatedTarget = ActivatedEvents.Find(x => x.GUID == targetGUID);

            if (activatedTarget != null)
            {
                activatedTarget.DisposeTimer();
                ActivatedEvents.Remove(activatedTarget);
            }

            EventIsDeletedEvent(target);
            target = null;
        }