This print for content only-size & color not accurate 7" X 9-1/4" / casebound / malloy


Associating Run Commands with Menu Items



Download 21,46 Mb.
Pdf ko'rish
bet142/1830
Sana28.09.2021
Hajmi21,46 Mb.
#188411
1   ...   138   139   140   141   142   143   144   145   ...   1830
Bog'liq
[book] [en] Pro C# 2008 and the NET 3.5 Platform Fourth Edition

Associating Run Commands with Menu Items

TextPad also allows you to create custom menu items that represent predefined run commands.

Thus, rather than having to manually configure the tool, parameters, and starting folder each time

you wish to run the command, you can essentially do so once and save the settings for later use.

Let’s create a custom item under the Tools menu named “Compile C# Code” that will compile all C#

files in the current directory using a response file.



1.

Select the Configure ➤ Preferences menu option and select Tools from the tree view control.



2.

Using the Add button, select Program and specify the full path to csc.exe (again,

C:\Windows\Microsoft.NET\Framework\v3.5 by default) using the resulting dialog box

and click OK.



3.

If you wish, rename your new menu item to a more descriptive label (Compile C#) by

selecting the name of the tool in the list box (to activate it for editing).

4.

Finally, select your tool name (Compile C#) from the Tools node, and specify @build.rsp as

the sole value in the Parameters field; the $FileDir token in the Initial Folder field instructs

TextPad to look in the folder of the active file (see Figure 2-8).



Figure 2-8.

Creating a Tools menu item

With this, you can now compile all C# files in the current directory using your custom Tools

menu item, provided that this same directory has a C# response file named build.rsp. Notice in

Figure 2-9 the Document Selector pane can be used to see each file opened within TextPad at the

current time. The Tool Output window shows the output of running our custom Tool menu.

This should be enough information regarding TextPad to get you in a good position for further

exploration. As you might suspect, this tool is a very rich editor that supports many additional plug-

in utilities (spell checkers, code formatters, clip libraries, autocompletion support, etc.). Check out

http://www.textpad.com/add-ons for further details.

C H A P T E R   2  



B U I L D I N G   C #  A P P L I C AT I O N S



45

8849CH02.qxd  9/24/07  10:50 AM  Page 45




Figure 2-9.

Executing the C# compiler using TextPad


Download 21,46 Mb.

Do'stlaringiz bilan baham:
1   ...   138   139   140   141   142   143   144   145   ...   1830




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish