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;
}
}
}