Add RegisterEvent example