void DownloadFileCompleted(object sender, AsyncCompletedEventArgs arguments) { if (arguments.Error == null) { WriteLine("Download of {0} completed", NewestVersion.Filename); ProcessArchive(); WriteLine("Unpacked archive {0} to {1}", NewestVersion.Filename, UpdateDirectory); UpdateHandler.DownloadCompleted(); } else { WriteLine("A download error occurred: {0}", arguments.Error.Message); UpdateHandler.DownloadError(arguments.Error); } }