|
Este artículo se tradujo de forma manual. Mueva el puntero sobre las frases del artículo para ver el texto original.
|
Traducción
Original
|
DeploymentProgressChangedEventArgs (Clase)
System.EventArgs
System.ComponentModel.ProgressChangedEventArgs
System.Deployment.Application.DeploymentProgressChangedEventArgs
Ensamblado: System.Deployment (en System.Deployment.dll)
El tipo DeploymentProgressChangedEventArgs expone los siguientes miembros.
| Nombre | Descripción | |
|---|---|---|
![]() | BytesCompleted | |
![]() | BytesTotal | |
![]() | Group | |
![]() | ProgressPercentage | |
![]() | State | |
![]() | UserState |
| Nombre | Descripción | |
|---|---|---|
![]() | Equals(Object) | |
![]() | Finalize | |
![]() | GetHashCode | |
![]() | GetType | |
![]() | MemberwiseClone | |
![]() | ToString |
private void DownloadFileGroupAsync(string fileGroup) { if (ApplicationDeployment.IsNetworkDeployed) { ApplicationDeployment deployment = ApplicationDeployment.CurrentDeployment; try { if (!deployment.IsFileGroupDownloaded(fileGroup)) { deployment.DownloadFileGroupProgressChanged += new DeploymentProgressChangedEventHandler(deployment_DownloadFileGroupProgressChanged); deployment.DownloadFileGroupCompleted += new DownloadFileGroupCompletedEventHandler(deployment_DownloadFileGroupCompleted); deployment.DownloadFileGroupAsync(fileGroup); } } catch (InvalidOperationException ioe) { MessageBox.Show("This application is not a ClickOnce application. Error: " + ioe.Message); return; } } } void deployment_DownloadFileGroupProgressChanged(object sender, DeploymentProgressChangedEventArgs e) { downloadStatus.Text = String.Format("Downloading file group {0}; {1:D}K of {2:D}K completed.", e.Group, e.BytesCompleted / 1024, e.BytesTotal / 1024); } void deployment_DownloadFileGroupCompleted(object sender, DownloadFileGroupCompletedEventArgs e) { if (e.Error != null) { downloadStatus.Text = "Could not download files. Will try again later."; return; } else if (e.Cancelled) { downloadStatus.Text = "The file download has been cancelled."; return; } downloadStatus.Text = String.Format("Download of file group {0} complete.", e.Group); }
Windows 7, Windows Vista SP1 o posterior, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (no se admite Server Core), Windows Server 2008 R2 (se admite Server Core con SP1 o posterior), Windows Server 2003 SP2
.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.
