Installer.AfterInstall 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
發生於 Installers 屬性中所有安裝程式的 Install(IDictionary) 方法都執行之後。
public:
event System::Configuration::Install::InstallEventHandler ^ AfterInstall;
public event System.Configuration.Install.InstallEventHandler AfterInstall;
member this.AfterInstall : System.Configuration.Install.InstallEventHandler
Public Custom Event AfterInstall As InstallEventHandler
事件類型
範例
下列範例示範 AfterInstall 事件。 它會由 OnAfterInstall 方法引發。
// MyInstaller is derived from the class 'Installer'.
public:
MyInstaller()
{
AfterInstall += gcnew InstallEventHandler( this, &MyInstaller::AfterInstallEventHandler );
}
private:
void AfterInstallEventHandler( Object^ sender, InstallEventArgs^ e )
{
// Add steps to perform any actions after the install process.
Console::WriteLine( "Code for AfterInstallEventHandler" );
}
// MyInstaller is derived from the class 'Installer'.
MyInstaller() : base()
{
AfterInstall += new InstallEventHandler(AfterInstallEventHandler);
}
private void AfterInstallEventHandler(object sender, InstallEventArgs e)
{
// Add steps to perform any actions after the install process.
Console.WriteLine("Code for AfterInstallEventHandler");
}
' MyInstaller is derived from the class 'Installer'.
Sub New()
MyBase.New()
AddHandler AfterInstall, AddressOf AfterInstallEventHandler
End Sub
Private Sub AfterInstallEventHandler(ByVal sender As Object, _
ByVal e As InstallEventArgs)
' Add steps to perform any actions after the install process.
Console.WriteLine("Code for AfterInstallEventHandler")
End Sub