Why event is not triggered correctly? - C#