To display a menu interface for the user's actions when the program is run. Divided into menu, Master Console menu, and exit.
In the Entry menu we are mainly designed to simulate the elevator movement.
First analyze the reality of the elevator:
1, in the outside world each floor can have the choice up and down button (the lowest layer only upper, the highest layer only below)
2, select the direction of the elevator and the direction of operation is not the same, only when the elevator state becomes static response
3, the elevator interior has the ability to select the floor button
4, Elevator Limited load
1. Go to the menu:
The top and bottom buttons in each layer can be directly used with the button control, the text displayed is: Floor + up/down, and then by getting the text information on the control of the first character to determine exactly which layer is called the elevator;
When designing the elevator class, add a state attribute status to indicate the elevator's motion state, which can be set to 0 stationary, 1 upwards, 1 downward;
When you click on the Elevator button, a form appears, which is a few check buttons to indicate which floors have been selected;
You can use a control to represent the elevator, the position of the button control to indicate the movement of the elevator; the button control has a MouseEnter method that can be used to indicate the number of people coming in when the mouse enters the control once, the number of people is added 1;mouseleave method to show the number of people out of the elevator, That is, the number of people is reduced by 1 when the mouse leaves the control;!!!!! Mouse as long as the entry will certainly go out, then the number of people can not save a certain time .... The question remains to be explored ....
2. Main control Station:
Set the maximum limit in the main console, limit the floor, elevator movement of the time, the time of the elevator stay, etc...
3. Exit:
Exit the program directly. Use This.close () on the line .....
Knot-Pair project--rough planning and design of the interface of elevator dispatching