📄 dtscontext.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Pipeline;
using dtr = Microsoft.SqlServer.Dts.Runtime.Wrapper;
namespace Crowe.ExploreIS
{
class DTSContext
{
private UIMediator _UIMed;
private string _currentOwnerName;
private string _currentContentName;
private DTSPackageWrapper _package;
private Application _app;
private string _packagePath;
public void Init(UIMediator uiMed,string dtsPackage)
{
_app = new Application();
_UIMed = uiMed;
_currentOwnerName = "";
_currentContentName = "";
_package = new DTSPackageWrapper();
_package.Init(this);
_packagePath = dtsPackage;
}
public Application CurrentDTSApp
{
get
{
return (_app);
}
}
public void ProcessPackage()
{
_package.OpenPackage(_packagePath);
while (_package.ReadNextContent())
{
}
}
public void WriteValueToUI (string val)
{
_UIMed.WriteText(_currentContentName + "->" + _currentOwnerName + " = " + val);
}
public void OnChangeContentOwner(DTSPackageContentItem ownerName)
{
_currentOwnerName = ownerName.ContentItemValue;
}
public void OnChangeContentOwner(DTSPackageContent ownerName)
{
_currentContentName = ownerName.ContentName;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -