言語

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

システム。Windows。Forms.IWin32SSISデザイナーのウィンドウ。

variables
Variables

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

connections
Connections

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

返品

trueの値は、その成分が修正されたことを示します。

以下の例は Edit 手法のサンプル実装を示しています。 このサンプルでは、新しいウィンドウが作成され、ダイアログボックスとして表示されます。 システム。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 パラメータを使ってウィンドウがデザイナーのクライアント領域内に表示されていることを確認します。

適用対象