private void installButton_Click (object sender, EventArgs e)
{
try
{
using (var client = HttpUtility.CreateWebClient())
{
client.DownloadProgressChanged += client_DownloadProgressChanged;
client.DownloadFileCompleted += client_DownloadFileCompleted;
_progressBar.Visible = true;
client.DownloadFileAsync (_newVersionDownloadUrl, _archivePath);
}
}
catch (Exception ex)
{
s_logger.Warn ("Can't download new version", ex);
MessageBox.Show ("Can't download new version!", "CalDav Synchronizer Download failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}