In chapter one, you will learn to know the properties and events of each control in a Windows Visual C# applications. You need to learn and know in order to be more familiar when applying them to some desktop applications in this book.
In chapter two, you will build Throwing Fire program. This program can be played by two human players or human player versus computer. You will use 12 labels, a large control panel, and three control buttons on the form. In the control panel, a smaller panel with two group box controls and a button control are placed. In the first group box, you will use 2 radio buttons; in the second box group, place 4 radio buttons. Next, two timer controls are added to the project. All label controls are used for titles and provide scoring and game information. The large panel (Panel1) is the playing field. Three button controls are used to start / stop a program, set options, and exit the program. One timer control is used to control game animation and another is used to represent the computer's decision process. The second control panel (Panel2) is used to select game options. One group box contains radio buttons which are used to select number of players. A group box contains radio buttons to select the level of difficulty of the game, when playing against a computer. A small button is used to close the options panel. The default properties are set for one-player games with the easiest game difficulty.
In
chapter three, you will build Roasted Duck Delivery simulation. In this
simulation, a number of decisions are needed. The basic idea is to read the
order by incoming telephone and tell the delivery scooter to go to the location
of the order. You also need to make sure that you always provide a roasted duck
ready to be transported by the delivery scooter. The delivery area is a 20 by
20 square grid. The more roasted duck is sold, the more profit it gets. The
panel control on the left side of the form contains the delivery grid. On the
upper right are group boxes with two label controls to display the time or hour
and sale results. The computer monitor (in a picture box) displays order and
delivery status using a list box and label control. Another group box contains
a roasting oven when the roasted ducks are displayed using eight picture box
controls. Two button controls on the group box control the operation of the
oven. Group boxes under the oven show how many ducks are ready to be delivered
and how many are in the delivery scooter (a button control is to load the
roasted duck into the scooter). The two button controls beneath are used to
start/pause the game and to stop the game or exit the game. In the area under
the form there are several timers for controlling a number of aspects in the
program. The delivery grid consists of 400 label controls on 20 rows (marked
with numbers) and 20 columns (marked with letters). Here, you will learn how to
place controls on a form (or panel in this case) using code (when the program
runs, not when designing the form). This mechanism can save time designing the
form.
In
chapter four, you will build a Drone Simulation. In this simulation, you
control both vertical and horizontal thrusters to maneuver the ride to the
landing pad. You will adjust the landing speed so that it is slow enough so
that no accident occurs. You build the form in two stages, the first stage
creates two option group boxes, and then the second stage uses both those group
boxes as landing controls. Two control panels are placed on the left side of
the form: one panel for drawing and another panel for the edge. On the right
side of the form, place the two group control boxes. In the first group box, five
radio buttons and a check box are added. In the second group box, two radio
buttons are placed. In the below section of the form, three buttons are added.
Finally, one timer control is added. Then in the form, a group box is added
overlap panel. Then, 11 label controls are added to the group box. After that,
a progress bar is added. Under the bar, two control panels are added, one high
panel and one short panel. In the second (short) panel control, two small label
controls are added. Underneath, three button controls are placed. Under these
three buttons, a label control is added. For each label control, set the
AutoSize property to False to be resized and set (temporarily) the BorderStyle
property to FixedSingle so that you can see the edges to facilitate the layout
process.
In this chapter, you will build Jumper game. In this game, you will move the jumper across the busy road, avoid the tiger, and cross the river with the changing current to get to house safely. You will place four label controls on the top part of the form (set the AutoSize property to False so that it can be resized and the BorderStyle property temporarily becomes FixedSingle so you can see the edges). Then, you use five panel controls below the labels. These panels will be a place for image graphics. Each panel has a width of 16 jumpers or 640 pixels, because one jumper will be given a width of 40 pixels. The first panel will be the jumper house, which will be given a height of 80 pixels. The next panel will become a river, with a height of 120 pixels. The next panel will be a place for tiger, 40 pixels high. Under the snake panel, there is a road panel. This panel will contain three boat lanes. Each boat has a height of 40 pixels, but you will give it a height of 140 pixels (not 120 pixels) to make room for lane markers. The fifth panel is the place where the jumper will begin its journey or leap. This panel will be given a height of 40 pixels. Add the last control panel below the form with three button controls. Then, finally, add four timer controls. Adjust the size of the form so that the panel controls can occupy according to the width of the form.
No comments:
Post a Comment