15.1. Three Key Steps

There are three steps in adding a user interface (UI) to any component, and each will be examined in detail below; first, here's a summary of each.

The first step is to add a class that implements the IDtsComponentUI interface. This defines the methods needed for the designer to interact with your user interface class. This class is not the visible UI itself; rather it provides a way for the designer to ask for what it needs when it needs it, as well as exposing several methods that allow you to hook into the life cycle of your UI. For example, you have a New method, which is called when a component is first added to a package, and an Edit method, called when you open an existing component inside your package. The interface will be expanded on in the following paragraphs.

The second step is to actually build the visible interface, normally a Windows Form. The form is invoked from the IDtsComponentUI.Edit method, and by customizing the constructor, you can pass through references to the base component and supporting services. The form then displays details such as component properties or data-handling options including inputs, outputs, and columns within each.

The final stage is to update the component itself to tell the designer that you have provided a user interface and where to find it, or specifically where to find the IDtsComponentUI implementation. You do this through the UITypeName property of the DtsPipelineComponent attribute, which decorates the ...

Get Professional SQL Server™ 2005 Integration Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.