Installer.Committed 事件

Installers 属性中的所有安装程序均提交它们的安装后发生。

**命名空间:**System.Configuration.Install
**程序集:**System.Configuration.Install(在 system.configuration.install.dll 中)

语法

声明
Public Event Committed As InstallEventHandler
用法
Dim instance As Installer
Dim handler As InstallEventHandler

AddHandler instance.Committed, handler
public event InstallEventHandler Committed
public:
event InstallEventHandler^ Committed {
    void add (InstallEventHandler^ value);
    void remove (InstallEventHandler^ value);
}
/** @event */
public void add_Committed (InstallEventHandler value)

/** @event */
public void remove_Committed (InstallEventHandler value)
JScript 支持使用事件,但不支持进行新的声明。

示例

下面的示例说明 Committed 事件。它由 OnCommitted 方法引发。

Public Sub New()
   MyBase.New()
   ' Attach the 'Committed' event.
   AddHandler Me.Committed, AddressOf MyInstaller_Committed
End Sub 'New

' Event handler for 'Committed' event.
Private Sub MyInstaller_Committed(ByVal sender As Object, ByVal e As InstallEventArgs)
   Console.WriteLine("")
   Console.WriteLine("Committed Event occured.")
   Console.WriteLine("")
End Sub 'MyInstaller_Committed
public MyInstallerClass() :base()
{
   // Attach the 'Committed' event.
   this.Committed += new InstallEventHandler(MyInstaller_Committed);
}

// Event handler for 'Committed' event.
private void MyInstaller_Committed(object sender, InstallEventArgs e)
{
   Console.WriteLine("Committed Event occured.");
}
public:
   MyInstallerClass()
   {
      // Attach the 'Committed' event.
      this->Committed += gcnew InstallEventHandler( this, &MyInstallerClass::MyInstaller_Committed );
   }

private:
   // Event handler for 'Committed' event.
   void MyInstaller_Committed( Object^ sender, InstallEventArgs^ e )
   {
      Console::WriteLine( "Committed Event occured." );
   }
public MyInstallerClass()
{
    // Attach the 'Committed' event.
    this.add_Committed(new InstallEventHandler(MyInstaller_Committed));
} //MyInstallerClass

// Event handler for 'Committed' event.
private void MyInstaller_Committed(Object sender, InstallEventArgs e)
{
    Console.WriteLine("Committed Event occured.");
} //MyInstaller_Committed

.NET Framework 安全性

  • 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见。

平台

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

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

Installer 类
Installer 成员
System.Configuration.Install 命名空间
Committing
OnCommitted
OnCommitting