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>
 /// Aborts the download.
 /// </summary>
 /// <param name="downloadDestinationPath">The download destination path.</param>
 public void AbortDownload(string downloadDestinationPath = null)
 {
     if (GetDownloadClient() != null)
     {
         if (GetDownloadClient().IsBusy)
         {
             if (KryptonMessageBox.Show($"A download of file: '{ Path.GetFileName(internalApplicationUpdaterSettingsManager.GetDestinationDownloadPath()) } is currently in progress.\nQuit now?", "Abort Download", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
             {
                 GetDownloadClient().Dispose();
             }
         }
     }
 }
Exemplo n.º 3
0
        /// <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);
            }
        }