18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

.NET APPLICATION PROGRAMMING INTERFACE<br />

Visual Studio .NET projects use an XML-based file format to contain managed<br />

resources. These XML files have the extension .resx and can contain any kind of<br />

data (images, cursors, and so forth) as long as the data is converted to ASCII<br />

format. RESx files are compiled to .resources files, which are binary representations<br />

of the resource data. Binary .resources files can be embedded by the compiler<br />

into either the main project assembly or a separate satellite assembly that<br />

contains only resources.<br />

The following options are available to create your resource files. Each is discussed<br />

below.<br />

• Creating a .resx file for string resources<br />

• Creating resource files for image resources<br />

• Compiling a .resx file into a .resources file<br />

Creating a .resx file for string resources<br />

If all you need to localize is strings—not images or cursors—you can use Visual<br />

Studio .NET to create a new .resx file that will be compiled automatically into a<br />

.resources module embedded in the main assembly.<br />

1. Right-click the project name in the Solution Explorer, click Add, then click<br />

Add New Item.<br />

2. In the Add New Item dialog box, click Assembly Resource File.<br />

3. Open the new .resx file in Visual Studio, and add name–value pairs for the<br />

culture-specific strings in your application.<br />

162 • <strong>ArcGIS</strong> <strong>Engine</strong> <strong>Developer</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!