How to prevent a double enrollment in an event of the same participant.
An event has a profile and "Allow multiple participants".  If this is for a logged-in user, then it and you have unchecked allow multiple participants it should not let you participate in the event multiple times.  If you are using profile matching, then check the profile and see if the matching is set to duplicate or update.