IDtsComponentUI.Edit(IWin32Window, Variables, Connections) メソッド

定義

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

public:
 bool Edit(System::Windows::Forms::IWin32Window ^ parentWindow, Microsoft::SqlServer::Dts::Runtime::Variables ^ variables, Microsoft::SqlServer::Dts::Runtime::Connections ^ connections);
public bool Edit (System.Windows.Forms.IWin32Window parentWindow, Microsoft.SqlServer.Dts.Runtime.Variables variables, Microsoft.SqlServer.Dts.Runtime.Connections connections);
abstract member Edit : System.Windows.Forms.IWin32Window * Microsoft.SqlServer.Dts.Runtime.Variables * Microsoft.SqlServer.Dts.Runtime.Connections -> bool
Public Function Edit (parentWindow As IWin32Window, variables As Variables, connections As Connections) As Boolean

パラメーター

parentWindow
IWin32Window

SSIS デザイナーの System.Windows.Forms.IWin32Window。

variables
Variables

コンポーネントを含むデータ フロー タスクにアクセスできる Variables コレクションです。

connections
Connections

コンポーネントを含むデータ フロー タスクにアクセスできる Connections コレクションです。

戻り値

値 true は、コンポーネントが変更されたことを指定します。

次の使用例は、Edit メソッドのサンプル実装を示しています。 この例では、新しいウィンドウが作成され、ダイアログ ボックスとして表示されます。 System.Windows.Forms.Form.DialogResult プロパティは、関数の戻り値を制御し、コンポーネントが変更されたかどうかを調べるために使用します。

public bool Edit(IWin32Window parentWindow, Microsoft.SqlServer.Dts.Runtime.Variables variables, Microsoft.SqlServer.Dts.Runtime.Connections connections)  
{  
// Pass the dtsComponentMetaData parameter received  
// in the Initialize method.  
MyUI myUI = new MyUI(dtsComponentMetaData);  

if (myUI.ShowDialog(parentWindow) == DialogResult.OK)  
    return true;  
else  
    return false;  
}  
Public Function Edit(ByVal parentWindow As IWin32Window, ByVal variables As Microsoft.SqlServer.Dts.Runtime.Variables, ByVal connections As Microsoft.SqlServer.Dts.Runtime.Connections) As Boolean   
 Dim myUI As MyUI = New MyUI(dtsComponentMetaData)   
 If myUI.ShowDialog(parentWindow) = DialogResult.OK Then   
   Return True   
 Else   
   Return False   
 End If   
End Function  

注釈

このメソッドは、SSIS デザイナーでコンポーネントを編集するときに呼び出されます。 このメソッドを使用すると、コンポーネントのユーザー インターフェイスを実装するウィンドウを作成および表示できます。

connections コレクションは、パッケージ内の ConnectionManager オブジェクトへのアクセスを提供します。 このコレクションを使用すると、コンポーネントで使用できる ConnectionManager オブジェクトの一覧を表示できます。

このメソッドからの戻り値 true は、コンポーネントが変更され、パッケージがダーティとしてフラグ付けされ、 PropertyGrid などの他の UI 要素が更新されたことをデザイナーに通知します。

SSIS デザイナーでウィンドウを表示する場合は、パラメーターを parentWindow 使用して、デザイナーのクライアント領域内にウィンドウが表示されていることを確認します。

適用対象