User Interface for Custom Component (Data Flow Task)

Sep 27, 2013 at 11:52 AM
Edited Sep 27, 2013 at 11:56 AM
I have a problem with user interface for custom component (data flow task): User interface doesn't show, when I click "Edit" in Visual Studio. Always appear Advanced "Editor".

I used sample code from the website:
http://technet.microsoft.com/en-us/library/10b829a1-609b-42e3-9070-cfe5a2bb698c

I am using Visual Studio 2010 + SSDT_BI 2012 to Visual Studio.

I implemented following things:
  • public class TaskExecutionUI : IDtsComponentUI
    using System;
    using System.Windows.Forms;
    using Microsoft.SqlServer.Dts.Pipeline.Design;
    using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
    using Microsoft.SqlServer.Dts.Runtime;
namespace CustomTaskTest
{
public class TaskExecutionUI : 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)
    {
        TaskExecutionUIForm componentEditor = new TaskExecutionUIForm(cons, vars, md);
        DialogResult result = componentEditor.ShowDialog(parentWindow);
        if (result == DialogResult.OK)
            return true;
        else
            return false;
    }
    public void Initialize(IDTSComponentMetaData100 dtsComponentMetadata, IServiceProvider serviceProvider)
    {
        this.md = dtsComponentMetadata;
        this.sp = serviceProvider;
    }
}
}
  • And TaskExecutionUIForm class:
    using System;
    using System.Windows.Forms;
    using Microsoft.SqlServer.Dts.Runtime;
    using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
namespace CustomTaskTest
{
public partial class TaskExecutionUIForm : Form
{
    private Connections connections;
    private Variables variables;
    private IDTSComponentMetaData100 metaData;
    private Button button1;
    private CManagedComponentWrapper designTimeInstance;
    public TaskExecutionUIForm(Connections cons, Variables vars, IDTSComponentMetaData100 md)
    {
        this.InitializeComponent();

        variables = vars;
        connections = cons;
        metaData = md;
    }
    private void button1_Click(object sender, EventArgs e)
    {
        if (designTimeInstance == null)
            designTimeInstance = metaData.Instantiate();

        //designTimeInstance.SetComponentProperty("CustomProperty", txtCustomPropertyValue.Text);

        this.Close();
    }
    private void InitializeComponent()
    {
        this.button1 = new System.Windows.Forms.Button();
        this.SuspendLayout();
        // 
        // button1
        // 
        this.button1.Location = new System.Drawing.Point(29, 12);
        this.button1.Name = "button1";
        this.button1.Size = new System.Drawing.Size(75, 23);
        this.button1.TabIndex = 0;
        this.button1.Text = "button1";
        this.button1.UseVisualStyleBackColor = true;
        this.button1.Click += new System.EventHandler(this.button1_Click);
        // 
        // TaskExecutionUIForm
        // 
        this.ClientSize = new System.Drawing.Size(139, 54);
        this.Controls.Add(this.button1);
        this.Name = "TaskExecutionUIForm";
        this.ResumeLayout(false);
    }
}
}


Maybe someone has idea, what's wrong with my code?