Ejemplo n.º 1
0
 public void DeployManager_DownloadProgressChanged(object sender, System.Deployment.Application.DownloadProgressChangedEventArgs e)
 {
     if (e.State.Equals(System.Deployment.Application.DeploymentProgressState.DownloadingApplicationFiles) &&
         e.ProgressPercentage == 100)
     {
         if (e.TotalBytesToDownload == e.BytesDownloaded)
         {
             this.DeploymentManager.DownloadProgressChanged -= DeployManager_DownloadProgressChanged;
         }
     }
 }
 void iphm_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
 {
     // you can show percentage of task completed using e.ProgressPercentage
 }
Ejemplo n.º 3
0
        void DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
        {
            _bytesDownloaded = e.BytesDownloaded;
            _bytesTotal = e.TotalBytesToDownload;

            if (!_updatePending)
            {
                _updatePending = true;
                Dispatcher.BeginInvoke(
                    DispatcherPriority.Background,
                    new DispatcherOperationCallback(DoDownloadProgressChanged),
                    null);
            }
        }
 private void OnProgressChanged(object sender, DeploymentProgressChangedEventArgs e)
 {
     lock (this._lock)
     {
         if (this.DownloadProgressChanged != null)
         {
             DownloadProgressChangedEventArgs args = new DownloadProgressChangedEventArgs(e.ProgressPercentage, e.UserState, e.BytesCompleted, e.BytesTotal, e.State);
             this.DownloadProgressChanged(this, args);
         }
     }
 }