Implement ProgressChanged function for background worker.