語言

LocalizedNameAttribute 類別

定義

提供擴展的在地名稱。

public ref class LocalizedNameAttribute : Attribute
public class LocalizedNameAttribute : Attribute
type LocalizedNameAttribute = class
    inherit Attribute
Public Class LocalizedNameAttribute
Inherits Attribute
繼承
LocalizedNameAttribute

範例

以下程式碼片段顯示 LocalizedNameAttribute 被設定在一個擴充類別上:

[C#]

namespace PolygonsCRI

{

[LocalizedName("Polygons")]

[Editor(typeof(CustomEditor), typeof(ComponentEditor))]

[ToolboxBitmap(typeof(PolygonsDesigner),"Polygons.ico")]

// this CRI-specific attribute sets the name of the

// custom report item which is referenced by the config

// files and saved in the report definition language

[CustomReportItem("Polygons")]

// the main class for our CRI design-time component

public class PolygonsDesigner : CustomReportItemDesigner

{

...

}

備註

此 LocalizedNameAttribute 類別允許呼叫者在不載入分機的情況下,確定分機的在地名稱。

註 若要賦予擴充功能依使用者語言而定的名稱,必須覆寫該 GetLocalizedString 方法。

建構函式

名稱 Description
LocalizedNameAttribute()

初始化 LocalizedNameAttribute 類別的新執行個體。

LocalizedNameAttribute(String)

初始化 LocalizedNameAttribute 類別的新執行個體。

屬性

名稱 Description
Name

會取得該擴充功能在地名稱。

方法

名稱 Description
Equals(Object)

判斷所提供的物件是否與目前物件相同。

GetHashCode()

回傳物件的唯一雜湊碼。

GetLocalizedString(String)

回傳正確的在地化擴充功能名稱。

適用於