private void UpdateDownloadForm_Load(object sender, EventArgs e) { kuacbtnInstallUpdate.ProcessName = internalApplicationUpdaterSettingsManager.GetDestinationDownloadPath(); networkUtilities.CheckInternetConnectionState(internalApplicationUpdaterSettingsManager.GetXMLFileURL()); if (globalMethods.GetInternetConnectionState()) { updaterLogic.DownloadFile(downloadClient, xmlFileApplicationUpdaterSettingsManager.GetUpdatePackageServerURLDownloadLocation(), internalApplicationUpdaterSettingsManager.GetDestinationDownloadPath(), klblDownloadingFrom, klblDownloadingTo, klblDownloaded, klblCurrentSpeed, klblDownloadPercent, pbDownloadIndicator, null, null, kuacbtnInstallUpdate); } }
/// <summary> /// Handles the Click event of the kbtnCheckForUpdates control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private void kbtnCheckForUpdates_Click(object sender, EventArgs e) { if (_updaterLogic.CheckForUpdates(ServerURL, CurrentApplicationVersion, internalApplicationUpdaterSettingsManager.GetXMLFileURL())) { UpdateAvailableForm updateAvailable = new UpdateAvailableForm(internalApplicationUpdaterSettingsManager.GetApplicationName(), Version.Parse(internalApplicationUpdaterSettingsManager.GetCurrentApplicationVersion()), Version.Parse(xmlFileApplicationUpdaterSettingsManager.GetServerVersion()), xmlFileApplicationUpdaterSettingsManager.GetChangelogServerURLDownloadLocation()); updateAvailable.Show(); Hide(); } else { klblDetails.Text = $"No new updates are available.\nYour version: { CurrentApplicationVersion.ToString() }\nServer version: { xmlFileApplicationUpdaterSettingsManager.GetServerVersion() }"; } }