Installer.Committing 事件
在 Installers 属性中的安装程序提交它们的安装前发生。
**命名空间:**System.Configuration.Install
**程序集:**System.Configuration.Install(在 system.configuration.install.dll 中)
语法
声明
Public Event Committing As InstallEventHandler
用法
Dim instance As Installer
Dim handler As InstallEventHandler
AddHandler instance.Committing, handler
public event InstallEventHandler Committing
public:
event InstallEventHandler^ Committing {
void add (InstallEventHandler^ value);
void remove (InstallEventHandler^ value);
}
/** @event */
public void add_Committing (InstallEventHandler value)
/** @event */
public void remove_Committing (InstallEventHandler value)
JScript 支持使用事件,但不支持进行新的声明。
示例
下面的示例说明 Committing 事件。它由 OnCommitting 方法引发。
Public Sub New()
MyBase.New()
' Attach the 'Committing' event.
AddHandler Me.Committing, AddressOf MyInstaller_Committing
End Sub 'New
' Event handler for 'Committing' event.
Private Sub MyInstaller_Committing(ByVal sender As Object, _
ByVal e As InstallEventArgs)
Console.WriteLine("Committing Event occured.")
End Sub 'MyInstaller_Committing
public MyInstallerClass() :base()
{
// Attach the 'Committing' event.
this.Committing += new InstallEventHandler(MyInstaller_Committing);
}
// Event handler for 'Committing' event.
private void MyInstaller_Committing(object sender, InstallEventArgs e)
{
Console.WriteLine("Committing Event occured.");
}
public:
MyInstallerClass()
: Installer()
{
// Attach the 'Committing' event.
this->Committing += gcnew InstallEventHandler( this, &MyInstallerClass::MyInstaller_Committing );
}
private:
// Event handler for 'Committing' event.
void MyInstaller_Committing( Object^ /*sender*/, InstallEventArgs^ /*e*/ )
{
Console::WriteLine( "Committing Event occured." );
}
public MyInstallerClass()
{
// Attach the 'Committing' event.
this.add_Committing(new InstallEventHandler(MyInstaller_Committing));
} //MyInstallerClass
// Event handler for 'Committing' event.
private void MyInstaller_Committing(Object sender, InstallEventArgs e)
{
Console.WriteLine("Committing Event occured.");
} //MyInstaller_Committing
.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 命名空间
Installer.Committed 事件
OnCommitted
OnCommitting