Поделиться через


IDtsComponentUI.Edit Method

Called when a component is edited. This method is not CLS-compliant.

Пространство имен: Microsoft.SqlServer.Dts.Pipeline.Design
Сборка: Microsoft.SqlServer.Dts.Design (in microsoft.sqlserver.dts.design.dll)

Синтаксис

'Декларация
Function Edit ( _
    parentWindow As IWin32Window, _
    variables As Variables, _
    connections As Connections _
) As Boolean
bool Edit (
    IWin32Window parentWindow,
    Variables variables,
    Connections connections
)
bool Edit (
    IWin32Window^ parentWindow, 
    Variables^ variables, 
    Connections^ connections
)
boolean Edit (
    IWin32Window parentWindow, 
    Variables variables, 
    Connections connections
)
function Edit (
    parentWindow : IWin32Window, 
    variables : Variables, 
    connections : Connections
) : boolean

Параметры

  • parentWindow
    The System.Windows.Forms.IWin32Window of the SSIS Designer.
  • variables
    The Variables collection that is accessible to the data flow task containing the component.
  • connections
    The Connections collection that is accessible to the data flow task containing the component.

Возвращаемое значение

A value of true specifies that the component has been modified.

Замечания

This method is called when the component is edited in the SSIS Designer. Use this method to create and display the window that implements the user interface for your component.

The connections collection provides access to the ConnectionManager objects in the package. You can use this collection to show a list of ConnectionManager objects that your component is able to use.

A return value of true from this method notifies the designer that the component has been modified, causing the package to be flagged as dirty, and other UI elements, such as the PropertyGrid, to be updated.

When displaying a window in the SSIS Designer, use the parentWindow parameter to ensure the window is shown within the client area of the designer.

Пример

The following example demonstrates a sample implementation of the Edit method. In this sample, a new window is created and shown as a dialog box. The System.Windows.Forms.Form.DialogResult property is used to determine whether the component has been modified, controlling the return value of the function.

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

Синхронизация потоков

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Платформы

Платформы разработки

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

Целевые платформы

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

См. также

Справочник

IDtsComponentUI Interface
IDtsComponentUI Members
Microsoft.SqlServer.Dts.Pipeline.Design Namespace