1) Implemented OnCloseRequest method for Application.