Программа:
Программа:
Program Lab02_04;
Uses Crt;
{ **************************************
************* Menu *************
************************************** }
Const
ItemsNumber=7;
{ *** Text of Menu Items *** }
MenuItems: Array[1..ItemsNumber+1] Of String=
(
'Menu',
'1. Open DataBase',
'2. Save DataBase',
'3. View DataBase',
'4. Add Record',
'5. Delete Record',
'6. Search',
'7. Exit'
);
{ *** Description of Menu Items *** }
ItemDescription: Array [1..ItemsNumber] Of String=
(
' Load existing DataBase File from Disk',
' Save current DataBase to Disk',
' View current DataBase',
' Add new Record to current DataBase',
' Delete Record from current DataBase',
' Search specified Record(s) in current DataBase',
' Exit program'
);
{ *** Menu Location *** }
MenuX1=25;
MenuY1=10;
MenuX2=55;
MenuY2=20;
Procedure ShowMenu (SelectedItem:Integer);
{ ************************************************
Procedure shows all of the Menu Items. Current
Item is selected by the color Label. Description
of it is shown in the Window below.
************************************************ }
Var a:Integer;
Begin
For a:=1 To ItemsNumber Do
Begin
Window(MenuX1,MenuY1+a,MenuX2,MenuY1+a);
TextColor(White);
If a=SelectedItem Then TextBackground(Red) Else TextBackground(Blue);
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.