//Fires when an update check has finished. private void UpdateCheckReturn(Updater.UpdateCheckResult result) { updater.UpdateCheckFinished -= UpdateCheckReturn; if (!result.UpdateAvailable) { return; } if (Globals.AutoUpdate) { IconManager.ShowBalloonPopup(Application.ProductName, "Downloading update: " + result.LatestVersion.ToString(), ToolTipIcon.Info); DownloadUpdate(result.UpdateFileListUrl); } else { IconManager.ShowBalloonPopup(Application.ProductName, "Update available: " + result.LatestVersion.ToString(), ToolTipIcon.Info); } }
//Fires when an update check has finished. private void UpdateCheckReturn(Updater.UpdateCheckResult result) { if (this.InvokeRequired) { Debug.WriteLine("Invoking update check result on update form."); Updater.UpdateCheckFinishedHandler updateFormInvoker = new Updater.UpdateCheckFinishedHandler(UpdateCheckReturn); this.Invoke(updateFormInvoker, result); } Program.updateHelper.updater.UpdateCheckFinished -= UpdateCheckReturn; proBar.Style = ProgressBarStyle.Continuous; lblRemoteVer.Text = "Remote version: " + result.LatestVersion.ToString(); DownloadChangeLog(result.ChangeLogUrl); if (result.UpdateAvailable) { btnUpdate.Enabled = true; updateFileListUrl = result.UpdateFileListUrl; } }