IDtsComponentUI インターフェイス

定義

重要

この API は CLS 準拠ではありません。

データ フロー コンポーネントのユーザー インターフェイスに対して SSIS デザイナーによって呼び出されるメソッドを定義します。

public interface class IDtsComponentUI
[System.CLSCompliant(false)]
public interface IDtsComponentUI
[<System.CLSCompliant(false)>]
type IDtsComponentUI = interface
Public Interface IDtsComponentUI
属性

次のコード サンプルは、<xref:Microsoft.SqlServer.Dts.Pipeline.Design.IdtsComponentUI> インターフェイスを実装するクラスを示しています。 詳細と完全なサンプルについては、「Data Flow コンポーネントのユーザー インターフェイスの開発」を参照してください。

using System;  
using System.Windows.Forms;  
using Microsoft.SqlServer.Dts.Runtime;  
using Microsoft.SqlServer.Dts.Pipeline.Design;  
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;  

namespace Microsoft.Samples.SqlServer.Dts  
{  
    public class SampleComponentUI : IDtsComponentUI  
    {  
        IDTSComponentMetaData100 md;  
        IServiceProvider sp;  

        public void Help(System.Windows.Forms.IWin32Window parentWindow)  
        {  
        }  
        public void New(System.Windows.Forms.IWin32Window parentWindow)  
        {  
        }  
        public void Delete(System.Windows.Forms.IWin32Window parentWindow)  
        {  
        }  
        public bool Edit(System.Windows.Forms.IWin32Window parentWindow, Variables vars, Connections cons)  
        {  
            // Create the component's form, and then display it.  
            SampleComponentUIForm componentEditor = new SampleComponentUIForm(cons, vars, md);  

            DialogResult result  = componentEditor.ShowDialog(parentWindow);  

            if (result == DialogResult.OK)  
                return true;  

            return false;  
        }  
        public void Initialize(IDTSComponentMetaData100 dtsComponentMetadata, IServiceProvider serviceProvider)  
        {  
            // Store the component metadata.  
            this.md = dtsComponentMetadata;  
        }  
    }  
}  
Imports System   
Imports System.Windows.Forms   
Imports Microsoft.SqlServer.Dts.Runtime   
Imports Microsoft.SqlServer.Dts.Pipeline.Design   
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper   

Public Class SampleComponentUI   
Implements IDtsComponentUI   
 Private md As IDTSComponentMetaData100   
 Private sp As IServiceProvider   

 Public Sub Help(ByVal parentWindow As System.Windows.Forms.IWin32Window)   
 End Sub   

 Public Sub New(ByVal parentWindow As System.Windows.Forms.IWin32Window)   
 End Sub   

 Public Sub Delete(ByVal parentWindow As System.Windows.Forms.IWin32Window)   
 End Sub   

 Public Function Edit(ByVal parentWindow As System.Windows.Forms.IWin32Window, ByVal vars As Variables, ByVal cons As Connections) As Boolean   
   Dim componentEditor As SampleComponentUIForm = New SampleComponentUIForm(cons, vars, md)   
   Dim result As DialogResult = componentEditor.ShowDialog(parentWindow)   
   If result = DialogResult.OK Then   
     Return True   
   End If   
   Return False   
 End Function   

 Public Sub Initialize(ByVal dtsComponentMetadata As IDTSComponentMetaData100, ByVal serviceProvider As IServiceProvider)   
   Me.md = dtsComponentMetadata   
 End Sub   
End Class  

注釈

コンポーネント開発者は、型を指定し、UITypeName 属性の DtsPipelineComponentAttribute プロパティにこのインターフェイスを実装することによって、データ フロー コンポーネントに対してユーザー インターフェイスを提供できます。 デザイナーは、コンポーネントが SSIS デザイナー内で追加、削除、および編集されるときに、このインターフェイスのメソッドを呼び出します。

メソッド

Delete(IWin32Window)

コンポーネントが SSIS デザイナー画面から削除されたときに呼び出されます。

Edit(IWin32Window, Variables, Connections)

コンポーネントの編集時に呼び出されます。

Help(IWin32Window)

[将来の使用のために予約されています。]

Initialize(IDTSComponentMetaData100, IServiceProvider)

コンポーネントのユーザー インターフェイスの初期化のために呼び出されます。

New(IWin32Window)

コンポーネントが最初にデータ フロー タスクに追加されるときに呼び出されます。

適用対象