DesignerTransactionCloseEventHandler デリゲートとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DesignerTransactionCloseEventHandler デリゲートの意味・解説 

DesignerTransactionCloseEventHandler デリゲート

デザイナの TransactionClosed イベントと TransactionClosing イベント処理するメソッド表します

名前空間: System.ComponentModel.Design
アセンブリ: System (system.dll 内)
構文構文

<ComVisibleAttribute(True)> _
Public Delegate Sub DesignerTransactionCloseEventHandler
 ( _
    sender As Object, _
    e As DesignerTransactionCloseEventArgs _
)
Dim instance As New DesignerTransactionCloseEventHandler(AddressOf
 HandlerMethod)
[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
)
JScript では、デリゲート使用できますが、新規に宣言することはできません。

パラメータ

sender

イベントソース

e

イベント データ格納している DesignerTransactionCloseEventArgs。

解説解説
使用例使用例

DesignerTransactionCloseEventHandler の登録と TransactionClosingTransactionClosed の各イベント処理の例次に示します

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 
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
System.ComponentModel.Design 名前空間
IDesignerHost


このページでは「.NET Framework クラス ライブラリ リファレンス」からDesignerTransactionCloseEventHandler デリゲートを検索した結果を表示しています。
Weblioに収録されているすべての辞書からDesignerTransactionCloseEventHandler デリゲートを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からDesignerTransactionCloseEventHandler デリゲート を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「DesignerTransactionCloseEventHandler デリゲート」の関連用語

DesignerTransactionCloseEventHandler デリゲートのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DesignerTransactionCloseEventHandler デリゲートのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS