15.02.2015 Views

C# 4 and .NET 4

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Visual studio 2010 editors ❘ 423<br />

file Types editor<br />

The File Types editor is used to establish associations between files <strong>and</strong> applications. For example, when<br />

you double-click a file with the .doc extension, the file is opened in Word. You can create these same<br />

associations for your application.<br />

To add an association, execute the following steps:<br />

1. Select File Types on Target Machine from the Action menu.<br />

2. Then select Add File Type. In the properties window, you can now set the name of the association.<br />

3. In the Extension property, add the file extension that should be associated with the application. Do<br />

not enter the periods; you can separate multiple extensions with a semicolon, like this: ex1;ex2.<br />

4. In the Comm<strong>and</strong> property, select the Ellipsis button.<br />

5. Now, select the file (typically an executable) that you want to associate with the specified file types.<br />

Keep in mind that any one extension should be associated with only one application.<br />

By default, the editor shows &Open as the Document Action. You can add others. The order in which the<br />

actions appear in the editor is the order in which they will appear in the context menu when the user rightclicks<br />

the file type. Keep in mind that the first item is always the default action. You can set the Arguments<br />

property for the actions. This is the comm<strong>and</strong>-line argument used to start the application.<br />

user interface editor<br />

Sometimes you might want to ask the user for more information during the installation process. The User<br />

Interface editor is used to specify properties for a set of predefined dialog boxes. The editor is separated<br />

into two sections, Install <strong>and</strong> Admin. One is for the st<strong>and</strong>ard installation <strong>and</strong> the other is used for an<br />

administrator’s installation. Each section is broken up into three subsections: Start, Progress, <strong>and</strong> End.<br />

These subsections represent the three basic stages of the installation process (see Figure 17-3).<br />

figure 17-3<br />

www.it-ebooks.info

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

Saved successfully!

Ooh no, something went wrong!