Udostępnij przez


Interfejs IDtsComponentUI

Definiuje metody wywoływane przez SSIS projektanta dla interfejs użytkownika z składnik przepływu danych.

Ten interfejs API nie jest zgodny ze specyfikacją CLS. 

Przestrzeń nazw:  Microsoft.SqlServer.Dts.Pipeline.Design
Zestaw:  Microsoft.SqlServer.Dts.Design (w Microsoft.SqlServer.Dts.Design.dll)

Składnia

'Deklaracja
<CLSCompliantAttribute(False)> _
Public Interface IDtsComponentUI
'Użycie
Dim instance As IDtsComponentUI
[CLSCompliantAttribute(false)]
public interface IDtsComponentUI
[CLSCompliantAttribute(false)]
public interface class IDtsComponentUI
[<CLSCompliantAttribute(false)>]
type IDtsComponentUI =  interface end
public interface IDtsComponentUI

Typ IDtsComponentUI uwidacznia następujące elementy członkowskie.

Metody

  Nazwa Opis
Metoda publiczna Delete Wywoływane, gdy składnik jest usuwany z SSIS powierzchni projektanta.
Metoda publiczna Edit Wywołana, gdy składnik jest edytowany.
Metoda publiczna Help [Zarezerwowane do użytku w przyszłości].
Metoda publiczna Initialize Nazywane zainicjować składnika interfejs użytkownika.
Metoda publiczna New Wywoływane, gdy składnik jest wstępnie dodanych do zadań przepływu danych.

Do góry

Uwagi

Składnik deweloperzy mogą dostarczać interfejs użytkownika dla składnik przepływ danych przez określanie typu i realizacji tego interfejs w UITypeName Właściwość DtsPipelineComponentAttribute atrybut.Projektant wywołania metody interfejs, gdy dodawane, usuwane i edytowane wewnątrz składnika SSIS projektanta.

Przykłady

Poniższy przykładowy kod ilustruje klasy, która implementuje IdtsComponentUI interfejs.Więcej informacji i pełną próbki, zobacz Opracowywanie interfejsu użytkownika dla składnika przepływu danych.

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