.NET Customisation
User Guide
.NET Customisation
:
How to Write a CAF Addin
: Resource Manager
Resource Manager
Another CAF service is the ResourceManager which provides addins with a simplified mechanism to access localisable resources. The ResourceManager supports the loading of ResourceSets which consist of a number of locale specific resource files with a given "basename".
resourceManager.LoadResourceFile("AttributeBrowserAddin");
This will load all resource files with a basename of "AttributeBrowserAddin" for example:
AttributeBrowserAddin.resources (Invariant language locale)
AttributeBrowserAddin.de.resources (German locale)
AttributeBrowserAddin.ko-KR.resources (Korean-Korea locale)
Depending on the machine's regional settings resource lookups will firstly try to locate the resource from the corresponding locale specific resource file. If this is not found it will defer to the language invariant resource file.
The ResourceManager provides a number of methods which allow an addin to access the various types of resources (string, image, cursor, icon etc.) which these resource files may contain. Each of the resource retrieval methods takes as an argument a resource identifier string and an optional resourceset name. If the resourceset name is omitted then it will default to a resourceset with the same name as the addin retrieving the resource.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.