Developing a User Interface for a Custom ForEach Enumerator

After you have overridden the implementation of the properties and methods of the base class to provide your custom functionality, you may want to create a custom user interface for your connection manager. If you do not create a custom user interface, users can only configure the new custom Foreach enumerator by using the Properties window.

In a custom user interface project or assembly, you create a class that implements ForEachEnumeratorUI. This class derives from System.Windows.Forms.UserControl, which is typically used to create a composite control to host other Windows Forms controls. The control that you create is displayed in the Enumerator configuration area of the Collection tab of the Foreach Loop Editor.

ms403351.note(ko-kr,SQL.90).gif중요:
After signing and building your custom user interface and installing it in the global assembly cache as described in Building, Deploying, and Debugging Custom Objects, remember to provide the fully qualified name of this class in the UITypeName property of the DtsForEachEnumeratorAttribute.

For a working sample of a custom enumerator, see ForEachDirectory 예제.

Coding the User Interface Control Class

Initializing the User Interface

Override the Initialize method to cache references to the host object and to the collections of connection managers and variables defined in the package. The host object exposes the custom enumerator through its InnerObject property.

Setting Properties on the User Interface Control

Since the UserControl class is intended for use as a composite control to host other Windows Forms controls, you can design your custom user interface by dragging and dropping controls, arranging them, setting their properties, and responding at run time to their events as in any Windows Forms application.

Saving Settings

Override the SaveSettings method to copy the values selected by the user from the controls to the properties of the enumerator when the user closes the editor.

참고 항목

작업

Creating a Custom Foreach Enumerator
Coding a Custom Foreach Enumerator

도움말 및 정보

SQL Server 2005 지원 받기