IDtsComponentUI Interfaccia

Definizione

Importante

Questa API non è conforme a CLS.

Definisce i metodi chiamati da SSIS Designer per l'interfaccia utente di un componente del flusso di dati.

public interface class IDtsComponentUI
[System.CLSCompliant(false)]
public interface IDtsComponentUI
[<System.CLSCompliant(false)>]
type IDtsComponentUI = interface
Public Interface IDtsComponentUI
Attributi

Esempio

Nell'esempio di codice seguente viene illustrata una classe che implementa l'interfaccia <xref:Microsoft.SqlServer.Dts.Pipeline.Design.IdtsComponentUI> . Per altre informazioni e l'esempio completo, vedere Sviluppo di un'interfaccia utente per un componente Flusso di dati.

using System;  
using System.Windows.Forms;  
using Microsoft.SqlServer.Dts.Runtime;  
using Microsoft.SqlServer.Dts.Pipeline.Design;  
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;  

namespace Microsoft.Samples.SqlServer.Dts  
{  
    public class SampleComponentUI : IDtsComponentUI  
    {  
        IDTSComponentMetaData100 md;  
        IServiceProvider sp;  

        public void Help(System.Windows.Forms.IWin32Window parentWindow)  
        {  
        }  
        public void New(System.Windows.Forms.IWin32Window parentWindow)  
        {  
        }  
        public void Delete(System.Windows.Forms.IWin32Window parentWindow)  
        {  
        }  
        public bool Edit(System.Windows.Forms.IWin32Window parentWindow, Variables vars, Connections cons)  
        {  
            // Create the component's form, and then display it.  
            SampleComponentUIForm componentEditor = new SampleComponentUIForm(cons, vars, md);  

            DialogResult result  = componentEditor.ShowDialog(parentWindow);  

            if (result == DialogResult.OK)  
                return true;  

            return false;  
        }  
        public void Initialize(IDTSComponentMetaData100 dtsComponentMetadata, IServiceProvider serviceProvider)  
        {  
            // Store the component metadata.  
            this.md = dtsComponentMetadata;  
        }  
    }  
}  
Imports System   
Imports System.Windows.Forms   
Imports Microsoft.SqlServer.Dts.Runtime   
Imports Microsoft.SqlServer.Dts.Pipeline.Design   
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper   

Public Class SampleComponentUI   
Implements IDtsComponentUI   
 Private md As IDTSComponentMetaData100   
 Private sp As IServiceProvider   

 Public Sub Help(ByVal parentWindow As System.Windows.Forms.IWin32Window)   
 End Sub   

 Public Sub New(ByVal parentWindow As System.Windows.Forms.IWin32Window)   
 End Sub   

 Public Sub Delete(ByVal parentWindow As System.Windows.Forms.IWin32Window)   
 End Sub   

 Public Function Edit(ByVal parentWindow As System.Windows.Forms.IWin32Window, ByVal vars As Variables, ByVal cons As Connections) As Boolean   
   Dim componentEditor As SampleComponentUIForm = New SampleComponentUIForm(cons, vars, md)   
   Dim result As DialogResult = componentEditor.ShowDialog(parentWindow)   
   If result = DialogResult.OK Then   
     Return True   
   End If   
   Return False   
 End Function   

 Public Sub Initialize(ByVal dtsComponentMetadata As IDTSComponentMetaData100, ByVal serviceProvider As IServiceProvider)   
   Me.md = dtsComponentMetadata   
 End Sub   
End Class  

Commenti

Gli sviluppatori di componenti possono fornire un'interfaccia utente per un componente del flusso di dati specificando un tipo e implementando questa interfaccia nella UITypeName proprietà dell'attributo DtsPipelineComponentAttribute . La finestra di progettazione chiama i metodi di questa interfaccia quando il componente viene aggiunto, eliminato e modificato all'interno dell'Designer SSIS.

Metodi

Delete(IWin32Window)

Chiamato quando il componente viene eliminato dall'area di Designer SSIS.

Edit(IWin32Window, Variables, Connections)

Chiamato quando un componente viene modificato.

Help(IWin32Window)

[Riservato per utilizzi futuri].

Initialize(IDTSComponentMetaData100, IServiceProvider)

Chiamato per inizializzare l'interfaccia utente del componente.

New(IWin32Window)

Chiamato quando un componente viene aggiunto inizialmente a un'attività Flusso di dati.

Si applica a