/// <summary> /// Are the internal application updater settings default. /// </summary> /// <returns></returns> public static bool AreInternalApplicationUpdaterSettingsDefault() { InternalApplicationUpdaterSettingsManager manager = new InternalApplicationUpdaterSettingsManager(); if (manager.GetAlwaysUsePrompt() == false && manager.GetAlwaysUseUACElevation() == false && manager.GetBetaFlag() == false && manager.GetDisableAutomaticUpdates() == false && manager.GetDateOfLastCheck() == DateTime.Now && manager.GetDateOfLastUpdateInstallation() == DateTime.Now && manager.GetDateOfNextCheck() == DateTime.Now && manager.GetApplicationIdentification() == string.Empty && manager.GetApplicationName() == string.Empty && manager.GetCurrentApplicationVersion() == string.Empty && manager.GetDestinationDownloadPath() == string.Empty && manager.GetVersionXMLFileURL() == string.Empty) { return(true); } else { return(false); } }
/// <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() }"; } }