vb System.Deployment.Application.ApplicationDeployment.CheckForDetailedUpdate类(方法)实例源码

下面列出了vb System.Deployment.Application.ApplicationDeployment.CheckForDetailedUpdate 类(方法)源码代码实例,从而了解它的用法。

作者:VB.NET开发    项目:System.Deployment.Applicatio   
Dim WithEvents ADLaunchAppUpdate As ApplicationDeployment

Public Sub LaunchAppUpdate()
    If (ApplicationDeployment.IsNetworkDeployed) Then
        ADLaunchAppUpdate = ApplicationDeployment.CurrentDeployment
    End If
End Sub


Private Sub ADLaunchAppUpdate_UpdateCompleted(ByVal sender As Object, ByVal e As AsyncCompletedEventArgs) Handles ADLaunchAppUpdate.UpdateCompleted
    If Not (e.Error Is Nothing) Then
        MessageBox.Show("Could not install application update. Please try again later,  or contact a system administrator.", "Application Update Error")
        Exit Sub
    Else
        If (e.Cancelled) Then
            MessageBox.Show("The application update has been cancelled.", "Application Update Cancelled")
            Exit Sub
        End If
    End If

    ' Process successful update.
    Dim dr As DialogResult = MessageBox.Show("The application has been updated. Restart?", "Restart Application", MessageBoxButtons.OKCancel)
    If (System.Windows.Forms.DialogResult.OK = dr) Then
        Application.Restart()
    End If
End Sub


问题


面经


文章

微信
公众号

扫码关注公众号