DesignerTransactionCloseEventHandler デリゲート
アセンブリ: System (system.dll 内)

<ComVisibleAttribute(True)> _ Public Delegate Sub DesignerTransactionCloseEventHandler ( _ sender As Object, _ e As DesignerTransactionCloseEventArgs _ )
[ComVisibleAttribute(true)] public delegate void DesignerTransactionCloseEventHandler ( Object sender, DesignerTransactionCloseEventArgs e )
[ComVisibleAttribute(true)] public delegate void DesignerTransactionCloseEventHandler ( Object^ sender, DesignerTransactionCloseEventArgs^ e )
/** @delegate */ /** @attribute ComVisibleAttribute(true) */ public delegate void DesignerTransactionCloseEventHandler ( Object sender, DesignerTransactionCloseEventArgs e )

DesignerTransactionCloseEventHandler デリゲートを作成する場合は、イベントを処理するメソッドを識別してください。イベントをイベント ハンドラに関連付けるには、デリゲートのインスタンスをイベントに追加します。デリゲートを削除しない限り、そのイベントが発生すると常にイベント ハンドラが呼び出されます。イベント ハンドラ デリゲートの詳細については、「イベントとデリゲート」を参照してください。
![]() |
---|
このクラスに適用される HostProtectionAttribute 属性の Resources プロパティの値は、SharedState です。HostProtectionAttribute は、デスクトップ アプリケーション (一般的には、アイコンをダブルクリック、コマンドを入力、またはブラウザに URL を入力して起動するアプリケーション) には影響しません。詳細については、HostProtectionAttribute クラスのトピックまたは「SQL Server プログラミングとホスト保護属性」を参照してください。 |

DesignerTransactionCloseEventHandler の登録と TransactionClosing と TransactionClosed の各イベントの処理の例を次に示します。
Public Sub LinkDesignerTransactionCloseEvent(ByVal host As IDesignerHost) ' Registers an event handler for the designer TransactionClosing ' and TransactionClosed events. AddHandler host.TransactionClosing, AddressOf Me.OnTransactionClose AddHandler host.TransactionClosed, AddressOf Me.OnTransactionClose End Sub Private Sub OnTransactionClose(ByVal sender As Object, ByVal e As DesignerTransactionCloseEventArgs) ' Displays transaction close information on the console. If e.TransactionCommitted Then Console.WriteLine("Transaction has been committed.") Else Console.WriteLine("Transaction has not yet been committed.") End If End Sub
public void LinkDesignerTransactionCloseEvent(IDesignerHost host) { // Registers an event handler for the designer TransactionClosing and TransactionClosed events. host.TransactionClosing += new DesignerTransactionCloseEventHandler(this.OnTransactionClose); host.TransactionClosed += new DesignerTransactionCloseEventHandler(this.OnTransactionClose); } private void OnTransactionClose(object sender, DesignerTransactionCloseEventArgs e) { // Displays transaction close information on the console. if( e.TransactionCommitted ) Console.WriteLine("Transaction has been committed."); else Console.WriteLine("Transaction has not yet been committed."); }
public: void LinkDesignerTransactionCloseEvent( IDesignerHost^ host ) { // Registers an event handler for the designer TransactionClosing and TransactionClosed events. host->TransactionClosing += gcnew DesignerTransactionCloseEventHandler( this, &DesignerTransactionCloseEventHandlerExample::OnTransactionClose ); host->TransactionClosed += gcnew DesignerTransactionCloseEventHandler( this, &DesignerTransactionCloseEventHandlerExample::OnTransactionClose ); } private: void OnTransactionClose( Object^ sender, DesignerTransactionCloseEventArgs^ e ) { // Displays transaction close information on the console. if ( e->TransactionCommitted ) { Console::WriteLine( "Transaction has been committed." ); } else { Console::WriteLine( "Transaction has not yet been committed." ); } }
public void LinkDesignerTransactionCloseEvent(IDesignerHost host) { // Registers an event handler for the designer TransactionClosing and // TransactionClosed events. host.add_TransactionClosing(new DesignerTransactionCloseEventHandler( this.OnTransactionClose)); host.add_TransactionClosed(new DesignerTransactionCloseEventHandler( this.OnTransactionClose)); } //LinkDesignerTransactionCloseEvent private void OnTransactionClose(Object sender, DesignerTransactionCloseEventArgs e) { // Displays transaction close information on the console. if (e.get_TransactionCommitted()) { Console.WriteLine("Transaction has been committed."); } else { Console.WriteLine("Transaction has not yet been committed."); } } //OnTransactionClose

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からDesignerTransactionCloseEventHandler デリゲートを検索する場合は、下記のリンクをクリックしてください。

- DesignerTransactionCloseEventHandler デリゲートのページへのリンク