Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
C# ПІДРУЧНИКИ / c# / Manning - Windows.forms.programming.with.c#.pdf
Скачиваний:
108
Добавлен:
12.02.2016
Размер:
14.98 Mб
Скачать
xxiii
Pic-

For a broad approach to the .NET Framework in general, check out Microsoft

.NET for Programmers by Fergal Grimes, also available from Manning Publications.

CONVENTIONS

The following typographical conventions appear throughout the book:

Technical terms are introduced in italics.

Code examples and fragments appear in a fixed-width font.

Namespaces and types, as well as members of these types, also appear in a fixed-width font.

Sections of code that are of special significance appear in a bold fixed-width font. Typically, these sections highlight changes made to code when compared with a previous example.

Many sections of code have numbered annotations which appear in the right margin. These numbered annotations are then discussed more fully in a subsequent numbered list following the code.

In addition, a number of graphical conventions are used to present the information in the text. Starting in chapter 2, all modifications made to example applications are illustrated with an Action-Result table showing step-by-step instructions for making the change in Visual Studio .NET. An example of this is shown here.

DESCRIPTION OF THE TASK DESCRIBED BY THIS TABLE

 

Action

Result

 

 

 

1

Description of the action to per-

Description of the result of this action. This is a textual

 

form.

description, a graphic, or the resulting code.

 

 

 

2

The second action to perform.

The second result.

 

How-to

Note: A comment about or explanation of the

 

a. Detailed steps required to per-

 

result.

 

form the described action.

 

 

 

b. More steps if necessary.

 

 

 

 

In addition to these tables, a number of classes and other types found in .NET are summarized using a .NET Table. These tables provide an overview of a .NET Framework class or other type discussed in a nearby section, and serve as a quick reference when referring back to these pages at a later time. Full details on these and any other members of the .NET Framework are available in the online documentation. For example, in Visual Studio .NET, bring up the Index window and enter the name of the class or member in which you are interested.

Of course, most of these .NET Tables describe members of the Windows Forms namespace. An example of this format is shown here as .NET Table 1 using the tureBox class.

CONVENTIONS

.NET Table 1 PictureBox class

The PictureBox class represents a control that can display an image. Scroll bars are not supported when the image is larger that the client area, so care must be taken to ensure that the image appears properly within the control. This class is part of the System.Windows.Forms namespace, and inherits from the Control class. See .NET Table 4.1 on

page 104 for more information on the Control class.

 

BorderStyle

Gets or sets the style of border to display for the

 

 

control.

Public Properties

Image

Gets or sets the image to display in the picture box.

 

SizeMode

Gets or sets the PictureBoxSizeMode enumera-

 

 

tion value indicating how the image is displayed.

 

 

The default is Normal.

 

 

 

Public Events

SizeModeChanged

Occurs when the value of the SizeMode property

 

changes.

 

 

 

 

 

Note the following features of these tables:

An initial paragraph defines the purpose of the class, the namespace that contains the class, and the base class. If the namespace containing the base class is not indicated, then it can be found in the same namespace containing the described class. If the base class is not indicated, then the class is derived from the System.Object class.

A table shows the public members of the class, namely the properties, methods, and events specific to this class.1 The members inherited from base classes are not shown in these tables. In .NET Table 1, there are four members shown, namely three properties, no methods, and one event.

A final convention in the book is the use of special paragraphs to highlight topics for further exploration of Windows Forms and the .NET Framework. These are either TRY IT! sections or More .NET sections.

TRY IT! These paragraphs provide suggestions or discussions of further changes that can be made to the sample application using the material discussed in the prior sections. TRY IT! paragraphs provide an opportunity to further your understanding of the related topic. The code for these sections is not provided in the book, but is available on the book’s web site.

The TRY IT! paragraphs appear throughout the text, and occasionally discuss class members that were not directly used in the sample code. The More .NET paragraphs,

1 We define exactly what these terms mean in part 1 of the book.

xxiv

ABOUT THIS BOOK

Соседние файлы в папке c#