Close application when closing MainWindow