IconResource 屬性
Gets or sets the icon associated with the connection manager object.
命名空間: Microsoft.SqlServer.Dts.Runtime
組件: Microsoft.SqlServer.ManagedDTS (在 Microsoft.SqlServer.ManagedDTS.dll 中)
語法
'宣告
Public Property IconResource As String
Get
Set
'用途
Dim instance As DtsConnectionAttribute
Dim value As String
value = instance.IconResource
instance.IconResource = value
public string IconResource { get; set; }
public:
property String^ IconResource {
String^ get ();
void set (String^ value);
}
member IconResource : string with get, set
function get IconResource () : String
function set IconResource (value : String)
屬性值
型別:System. . :: . .String
A String that identifies the icon resource of the connection manager.
備註
When specified, this property identifies the icon shown in Business Intelligence Development Studio when the connection manager is displayed.
The string should contain the name of the assembly and the name of the icon file. To embed an icon file as a resource in an assembly using Visual Studio 2008, set the icon file's Build Action attribute to Embedded Resource.
範例
The following example shows a connection manager class that provides an icon resource. In this example, the icon file is named MyConnectionMgrIcon.ico, and the assembly name is MyConnectionManager.
using system;
using Microsoft.SqlServer.Dts.Runtime;
namespace Microsoft.SqlServer.SSIS.Samples
{
[DtsConnection(DisplayName = "MyConnectionManager",
Description = "Custom Connection Manager for Testing",
IconResource = "MyConnectionManager.MyConnectionMgrIcon.ico",
UITypeName = "MyNamespace.MyConnectionManagerClassName," +
"MyAssemblyName,Version=1.00.000.00,Culture=neutral," +
"PublicKeyToken=<value>")]
{
}
}
Imports system
Imports Microsoft.SqlServer.Dts.Runtime
<DtsConnection(DisplayName:="MyConnectionManager", _
Description:="Custom Connection Manager for Testing", _
IconResource:="MyConnectionManager.MyConnectionMgrIcon.ico", _
UITypeName:="MyNamespace.MyConnectionManagerClassName,MyAssemblyName," & _
"Version=1.0.0.0,Culture=neutral,PublicKeyToken=<value>")> _
Public Class MyConnectionManager
Inherits ConnectionManagerBase
End Class