DownloadFileGroupCompletedEventArgs Class
.NET Framework 2.0
Note: This class is new in the .NET Framework version 2.0.
Describes a file download that has recently completed.
Namespace: System.Deployment.Application
Assembly: System.Deployment (in system.deployment.dll)
Assembly: System.Deployment (in system.deployment.dll)
'Declaration Public Class DownloadFileGroupCompletedEventArgs Inherits AsyncCompletedEventArgs 'Usage Dim instance As DownloadFileGroupCompletedEventArgs
public class DownloadFileGroupCompletedEventArgs extends AsyncCompletedEventArgs
public class DownloadFileGroupCompletedEventArgs extends AsyncCompletedEventArgs
The following code example downloads a file group named HelpFiles, and displays download progress in a status bar. This example requires that you deploy a Windows Forms application, and that your main form has a StatusStrip control, and a ToolStripStatusPanel control named downloadStatus.
Dim WithEvents ADDownloadHelpFiles As ApplicationDeployment Private Sub DownloadHelpFiles(ByVal GroupName As String) If (ApplicationDeployment.IsNetworkDeployed) Then ADDownloadHelpFiles = ApplicationDeployment.CurrentDeployment If ADDownloadHelpFiles.IsFirstRun Then Try If ADDownloadHelpFiles.IsFileGroupDownloaded(GroupName) Then ADDownloadHelpFiles.DownloadFileGroupAsync(GroupName) End If Catch ioe As InvalidOperationException MessageBox.Show("This application is not a ClickOnce application.") Return End Try End If End If End Sub Sub ADDownloadHelpFiles_DownloadFileGroupProgressChanged(ByVal sender As Object, ByVal e As DeploymentProgressChangedEventArgs) Handles ADDownloadHelpFiles.DownloadFileGroupProgressChanged DownloadStatus.Text = String.Format("Downloading file group {0}; {1:D}K of {2:D}K completed.", e.Group, e.BytesCompleted / 1024, e.BytesTotal / 1024) End Sub Sub ADDownloadHelpFiles_DownloadFileGroupCompleted(ByVal sender As Object, ByVal e As DownloadFileGroupCompletedEventArgs) Handles ADDownloadHelpFiles.DownloadFileGroupCompleted DownloadStatus.Text = String.Format("Download of file group {0} complete.", e.Group) End Sub
System.Object
System.EventArgs
System.ComponentModel.AsyncCompletedEventArgs
System.Deployment.Application.DownloadFileGroupCompletedEventArgs
System.EventArgs
System.ComponentModel.AsyncCompletedEventArgs
System.Deployment.Application.DownloadFileGroupCompletedEventArgs
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Community Additions
ADD
Show: