28 lines
687 B
VB.net
28 lines
687 B
VB.net
Imports System.ComponentModel
|
|
|
|
Public Class ClassControlLocalization
|
|
Private Shared Function Lookup(key As String)
|
|
Try
|
|
Return My.Resources.ControlProperties.ResourceManager.GetString(key)
|
|
Catch ex As Exception
|
|
Return key
|
|
End Try
|
|
End Function
|
|
|
|
Public Class LocalizedDescriptionAttribute
|
|
Inherits DescriptionAttribute
|
|
|
|
Public Sub New(key As String)
|
|
MyBase.New(Lookup(key))
|
|
End Sub
|
|
End Class
|
|
|
|
Public Class LocalizedCategoryAttribute
|
|
Inherits CategoryAttribute
|
|
|
|
Public Sub New(key As String)
|
|
MyBase.New(Lookup(key))
|
|
End Sub
|
|
End Class
|
|
End Class
|