How to identify event creation and editing? [RESOLVED]

I want to show two different popups on new event creation and event editing. So which variable i have to check to distinguish new event and edit event? Please reply asap.

Thanks in advance
Shiju

You can check inner flag

if (scheduler._new_event) do_something();