[Back to MENU SWAG index] [Back to Main SWAG index] [Original]
{Menu pour le Multi-jeux # }
Program Game_Menu;
{$M $4000,0,0 } { 16K stack, no heap }
Uses crt, dos, Printer;
const FormFeed = #12;
PathLength = 79;
{----------------------------------------------------------------------------}
Name1 =''; Megs1 =0; Path1 ='';
Txt_file1 =''; Run_file1 ='';
Destination_drive1 = #0 ; Destination_directory1 ='';
OSystem1 ='Dos, Windows, Windows 95'; Modification_file1 ='';
{----------------------------------------------------------------------------}
Name2 =''; Megs2 =0; Path2 ='';
Txt_file2 =''; Run_file2 ='';
Destination_drive2 = #0; Destination_directory2 = '';
OSystem2 ='Dos, Windows, Windows 95'; Modification_file2 ='';
{----------------------------------------------------------------------------}
Name3 =''; Megs3 =0; Path3 ='';
Txt_file3 =''; Run_file3 ='';
Destination_drive3 = #0 ; Destination_directory3 = '';
OSystem3 ='Dos, Windows, Windows 95'; Modification_file3 ='';
{----------------------------------------------------------------------------}
Name4 =''; Megs4 =0; Path4 ='';
Txt_file4 =''; Run_file4 ='';
Destination_drive4 = #0; Destination_directory4 = '';
OSystem4 ='Dos, Windows, Windows 95'; Modification_file4 ='';
{----------------------------------------------------------------------------}
Name5 =''; Megs5 =0; Path5 ='';
Txt_file5 =''; Run_file5 ='';
Destination_drive5 = #0; Destination_directory5 = '';
OSystem5 ='Dos, Windows, Windows 95'; Modification_file5 ='';
{----------------------------------------------------------------------------}
Name6 =''; Megs6 =0; Path6 ='';
Txt_file6 =''; Run_file6 ='';
Destination_drive6 = #0; Destination_directory6 = '';
OSystem6 ='Dos, Windows, Windows 95'; Modification_file6 ='';
{----------------------------------------------------------------------------}
Name7 =''; Megs7 =0; Path7 ='';
Txt_file7 =''; Run_file7 ='';
Destination_drive7 = #0; Destination_directory7 = '';
OSystem7 ='Dos, Windows, Windows 95'; Modification_file7 ='';
{----------------------------------------------------------------------------}
Name8 =''; Megs8 =0; Path8 ='';
Txt_file8 =''; Run_file8 ='';
Destination_drive8 = #0; Destination_directory8 = '';
OSystem8 ='Dos, Windows, Windows 95'; Modification_file8 ='';
{----------------------------------------------------------------------------}
Name9 =''; Megs9 =0; Path9 ='';
Txt_file9 =''; Run_file9 ='';
Destination_drive9 = #0; Destination_directory9 = '';
OSystem9 ='Dos, Windows, Windows 95'; Modification_file9 ='';
{----------------------------------------------------------------------------}
Name10=''; Megs10=0; Path10='';
Txt_file10=''; Run_file10='';
Destination_drive10= #0; Destination_directory10= '';
OSystem10='Dos, Windows, Windows 95'; Modification_file10='';
{----------------------------------------------------------------------------}
Name11=''; Megs11=0; Path11='';
Txt_file11=''; Run_file11='';
Destination_drive11= #0; Destination_directory11= '';
OSystem11='Dos, Windows, Windows 95'; Modification_file11='';
{----------------------------------------------------------------------------}
Name12=''; Megs12=0; Path12='';
Txt_file12=''; Run_file12='';
Destination_drive12= #0; Destination_directory12= '';
OSystem12='Dos, Windows, Windows 95'; Modification_file12='';
{----------------------------------------------------------------------------}
Name13=''; Megs13=0; Path13='';
Txt_file13=''; Run_file13='';
Destination_drive13= #0; Destination_directory13= '';
OSystem13='Dos, Windows, Windows 95'; Modification_file13='';
{----------------------------------------------------------------------------}
Name14=''; Megs14=0; Path14='';
Txt_file14=''; Run_file14='';
Destination_drive14= #0; Destination_directory14= '';
OSystem14='Dos, Windows, Windows 95'; Modification_file14='';
{----------------------------------------------------------------------------}
Name15=''; Megs15=0; Path15='';
Txt_file15=''; Run_file15='';
Destination_drive15= #0; Destination_directory15= '';
OSystem15='Dos, Windows, Windows 95'; Modification_file15='';
{----------------------------------------------------------------------------}
Name16=''; Megs16=0; Path16='';
Txt_file16=''; Run_file16='';
Destination_drive16= #0; Destination_directory16= '';
OSystem16='Dos, Windows, Windows 95'; Modification_file16='';
{----------------------------------------------------------------------------}
Name17=''; Megs17=0; Path17='';
Txt_file17=''; Run_file17='';
Destination_drive17= #0; Destination_directory17='';
OSystem17='Dos, Windows, Windows 95'; Modification_file17='';
{----------------------------------------------------------------------------}
Name18=''; Megs18=0; Path18='';
Txt_file18=''; Run_file18='';
Destination_drive18= #0; Destination_directory18='';
OSystem18='Dos, Windows, Windows 95'; Modification_file18='';
{----------------------------------------------------------------------------}
Name19=''; Megs19=0; Path19='';
Txt_file19=''; Run_file19='';
Destination_drive19= #0; Destination_directory19='';
OSystem19='Dos, Windows, Windows 95'; Modification_file19='';
{----------------------------------------------------------------------------}
Name20=''; Megs20=0; Path20='';
Txt_file20=''; Run_file20='';
Destination_drive20= #0; Destination_directory20= '';
OSystem20='Dos, Windows, Windows 95'; Modification_file20='';
{----------------------------------------------------------------------------}
Name21=''; Megs21=0; Path21='';
Txt_file21=''; Run_file21='';
Destination_drive21= #0; Destination_directory21= '';
OSystem21='Dos, Windows, Windows 95'; Modification_file21='';
{----------------------------------------------------------------------------}
Name22=''; Megs22=0; Path22='';
Txt_file22=''; Run_file22='';
Destination_drive22= #0; Destination_directory22= '';
OSystem22='Dos, Windows, Windows 95'; Modification_file22='';
{----------------------------------------------------------------------------}
Name23=''; Megs23=0; Path23='';
Txt_file23=''; Run_file23='';
Destination_drive23= #0; Destination_directory23= '';
OSystem23='Dos, Windows, Windows 95'; Modification_file23='';
{----------------------------------------------------------------------------}
Name24=''; Megs24=0; Path24='';
Txt_file24=''; Run_file24='';
Destination_drive24= #0; Destination_directory24= '';
OSystem24='Dos, Windows, Windows 95'; Modification_file24='';
{----------------------------------------------------------------------------}
Name25=''; Megs25=0; Path25='';
Txt_file25=''; Run_file25='';
Destination_drive25= #0; Destination_directory25= '';
OSystem25='Dos, Windows, Windows 95'; Modification_file25='';
{----------------------------------------------------------------------------}
Name26=''; Megs26=0; Path26='';
Txt_file26=''; Run_file26='';
Destination_drive26= #0; Destination_directory26= '';
OSystem26='Dos, Windows, Windows 95'; Modification_file26='';
{----------------------------------------------------------------------------}
Name27=''; Megs27=0; Path27='';
Txt_file27=''; Run_file27='';
Destination_drive27= #0; Destination_directory27= '';
OSystem27='Dos, Windows, Windows 95'; Modification_file27='';
{----------------------------------------------------------------------------}
Name28=''; Megs28=0; Path28='';
Txt_file28=''; Run_file28='';
Destination_drive28= #0; Destination_directory28= '';
OSystem28='Dos, Windows, Windows 95'; Modification_file28='';
{----------------------------------------------------------------------------}
Name29=''; Megs29=0; Path29='';
Txt_file29=''; Run_file29='';
Destination_drive29= #0; Destination_directory29= '';
OSystem29='Dos, Windows, Windows 95'; Modification_file29='';
{----------------------------------------------------------------------------}
Name30=''; Megs30=0; Path30='';
Txt_file30=''; Run_file30='';
Destination_drive30= #0; Destination_directory30= '';
OSystem30='Dos, Windows, Windows 95'; Modification_file30='';
{----------------------------------------------------------------------------}
Name31=''; Megs31=0; Path31='';
Txt_file31=''; Run_file31='';
Destination_drive31= #0; Destination_directory31= '';
OSystem31='Dos, Windows, Windows 95'; Modification_file31='';
{----------------------------------------------------------------------------}
Name32=''; Megs32=0; Path32='';
Txt_file32=''; Run_file32='';
Destination_drive32= #0; Destination_directory32= '';
OSystem32='Dos, Windows, Windows 95'; Modification_file32='';
{----------------------------------------------------------------------------}
Name33=''; Megs33=0; Path33='';
Txt_file33=''; Run_file33='';
Destination_drive33= #0; Destination_directory33= '';
OSystem33='Dos, Windows, Windows 95'; Modification_file33='';
{----------------------------------------------------------------------------}
Name34=''; Megs34=0; Path34='';
Txt_file34=''; Run_file34='';
Destination_drive34= #0; Destination_directory34= '';
OSystem34='Dos, Windows, Windows 95'; Modification_file34='';
{----------------------------------------------------------------------------}
Name35=''; Megs35=0; Path35='';
Txt_file35=''; Run_file35='';
Destination_drive35= #0; Destination_directory35= '';
OSystem35='Dos, Windows, Windows 95'; Modification_file35='';
{----------------------------------------------------------------------------}
Name36=''; Megs36=0; Path36='';
Txt_file36=''; Run_file36='';
Destination_drive36= #0; Destination_directory36= '';
OSystem36='Dos, Windows, Windows 95'; Modification_file36='' ;
{----------------------------------------------------------------------------}
Name37=''; Megs37=0; Path37='';
Txt_file37=''; Run_file37='';
Destination_drive37= #0; Destination_directory37= '';
OSystem37='Dos, Windows, Windows 95'; Modification_file37='';
{----------------------------------------------------------------------------}
Name38=''; Megs38=0; Path38='';
Txt_file38=''; Run_file38='';
Destination_drive38= #0; Destination_directory38= '';
OSystem38='Dos, Windows, Windows 95'; Modification_file38='';
{----------------------------------------------------------------------------}
Name39=''; Megs39=0; Path39='';
Txt_file39=''; Run_file39='';
Destination_drive39= #0; Destination_directory39= '';
OSystem39='Dos, Windows, Windows 95'; Modification_file39='';
{----------------------------------------------------------------------------}
Name40=''; Megs40=0; Path40='';
Txt_file40=''; Run_file40='';
Destination_drive40= #0; Destination_directory40= '';
OSystem40='Dos, Windows, Windows 95'; Modification_file40='';
{----------------------------------------------------------------------------}
Type FileName = string[PathLength];
VAR Name : String[30];
Megs : integer;
Path : Filename;
Txt_file : String[12];
Run_file : String[12];
OSystem : String[30];
Source_drive : Char;
Destination_drive : Char;
Destination_drive_Access : Boolean;
Destination_directory_Access : Boolean;
Destination_directory : String;
Modification_file : String[12];
SpaceDisk : LongInt;
PathFileName: FileName;
ProgramCommandCom : String;
ProgramName, CmdLine: string;
Fichier : Text;
Source: PathStr;
Choice : integer;
Cnt : integer;
I, J, K : integer;
Ch, Choix : Char;
IOError : integer;
Quit : Boolean;
Erreur : Boolean;
Touche_F1 : Boolean;
Touche_tab : Boolean;
Touche_Esc : Boolean;
Touche_Bas : Boolean;
Touche_haut : Boolean;
Touche_insert : boolean;
{----------------------------------------------------------------------------}
Procedure CursorInsert; { Curseur form‚ de 7 lignes(de pixels)#1 }
VAR
Regs : registers;
BEGIN
{ Code d'interruption pour indiquer changement de curseur }
regs.AH:=$01;
regs.CH:=$0; { CH (High): haut du curseur, ligne (de pixels) #0 }
regs.CL:=$7; { CL (Low): bas du curseur, ligne (de pixels) #7 }
{ Interruption niveau machine #10 pour changer le curseur }
intr($10,Regs);
END;
{----------------------------------------------------------------------------}
Procedure Normalcursor; { Curseur form‚ de 2 lignes(de pixels)#6 }
VAR
Regs : registers;
BEGIN
{ Code d'interruption pour indiquer changement de curseur }
regs.AH:=$01;
regs.CH:=$6; { CH (High): haut du curseur, ligne (de pixels) #6 }
regs.CL:=$7; { CL (Low): bas du curseur, ligne (de pixels) #7 }
{ Interruption niveau machine #10 pour changer le curseur }
intr($10,Regs);
END;
{----------------------------------------------------------------------------}
Procedure Effacecursor; { Pour effacer le curseur }
VAR
Regs : registers;
BEGIN
{ Code d'interruption pour indiquer changement de curseur }
regs.AH:=$01;
regs.CH:=$20; { Valeur nulle }
regs.CL:=$20; { Valeur nulle }
{ Interruption niveau machine #10 pour changer le curseur }
intr($10,Regs);
END;
{----------------------------------------------------------------------------}
Procedure fin (Erreur:Boolean); { Quitte le programme principal }
Begin { Procedure Fin }
Window (1, 1, 80, 25); {Cr‚ation de fenetre (1, 1) … (80, 25)}
Textcolor (7); {Couleur du texte … la sortie Lightgray}
TextBackground (0); {Couleur du background black}
ClrScr; { Pour effacer l'‚cran }
NormalCursor;
Gotoxy(3,2); Writeln('Thank you to choose The CD-ROM Master''s');
Halt(1)
End; { Procedure Fin }
{----------------------------------------------------------------------------}
Procedure BoitePourQuitter(Var ChoixMenuPrecedent : Char);
Begin
EffaceCursor;
Window (32, 20, 73, 20); {Cr‚ation de fenetre (28, 5) … (74, 6)}
Textbackground (1); { Couleur de la boite bleu }
Clrscr; { Pour effacer l'‚cran }
TextColor (15); { Couleur du texte blanc }
Write ('Do you really want to Quit? (Y)es or (N)o');
Textcolor (14); {Couleur des r‚ponses yellow}
Gotoxy (30, 1); Write ('Y');
Gotoxy (39, 1); Write ('N');
Repeat
ChoixMenuPrecedent := Readkey;
Until (Upcase(ChoixMenuPrecedent) = char(78)) or
(Upcase(ChoixMenuPrecedent) = char(89));
Clrscr;
Choix := ChoixMenuPrecedent;
NormalCursor;
end;
{----------------------------------------------------------------------------}
Procedure DessineBoite
(x1,y1,x2,y2,Background:integer ;
LigneContour:Boolean ; LigneContourGauche,LigneContourDroite:integer ;
Shadow:Boolean ; ShadowBackgroundDroite,ShadowBackgroundBas:integer);
Begin
Window (x1,y1,x2,y2);
TextBackground (Background);
ClrScr;
Window (x1,y1,x2+1,y2+1);
If LigneContour = true then
Begin
TextColor (LigneContourDroite);
Gotoxy(1,1); Write('Ú');
For I := 2 to (x2-x1) do
Begin Gotoxy(I,1); Write('Ä'); end;
Writeln;
For J := 2 to (y2-y1) do
Begin Gotoxy(1,J); Write('³'); end;
Writeln;
Gotoxy(1,y2-y1+1); Write('À');
TextColor (LigneContourGauche);
Gotoxy(x2-x1+1,1); Write('¿');
For J := 2 to (y2-y1) do
Begin Gotoxy(x2-x1+1,J); Write('³'); end;
Writeln;
For I := 2 to (x2-x1) do
Begin Gotoxy(I,y2-y1+1); Write('Ä'); end;
Writeln;
Gotoxy(x2-x1+1,y2-y1+1); Write('Ù');
end;
If Shadow = true then
Begin
Window (x1,y1,x2+2,y2+1);
TextColor (0);
TextBackground(ShadowBackgroundDroite);
Gotoxy (x2-x1+2,1); Write ('Ü');
For J := 2 to (y2-y1+1) do
Begin Gotoxy(x2-x1+2,J); Write ('Û'); end;
TextBackground(ShadowBackgroundBas);
For I := 2 to (x2-x1+2) do
Begin Gotoxy(I,y2-y1+2); Write ('ß'); end;
end;
end;
{----------------------------------------------------------------------------}
Procedure Read_Char(x1,y1,x2,y2,Background:integer;KindData:String);
Label Escape, Fleche_bas, Fleche_haut, Tabulation,
En_attente_de_commande;
Begin
Touche_tab := False;
Touche_Esc := False;
Touche_bas := False;
Touche_haut := False;
Goto En_attente_de_commande;
Escape :
Begin Touche_Esc := true; exit; end;
Fleche_bas :
Begin Touche_bas := true; exit; end;
Fleche_haut :
Begin Touche_haut := true; exit; end;
Tabulation :
Begin Touche_tab := true; exit; end;
En_attente_de_commande:
Begin
Repeat
TextColor(14);
Window (x1,y1,x2,y2);
Textbackground (Background);
ClrScr; { Pour effacer l'‚cran }
K := 1;
If (KindData='Letter') then
Begin Repeat
If (K=3) then K:=1;
choix := Readkey;
If Choix = char(27) then goto Escape
Else If Choix = char(9) then goto Tabulation
Else If Choix = char(0) then
Begin
Choix := Readkey;
If Choix = char(80) then goto Fleche_bas
Else If Choix = char(72) then goto Fleche_haut
Else inc(K);
end;
If (K=2) and (Upcase(Choix) in ['A'..'Z']) then inc(K);
Until (Upcase(Choix) in ['A'..'Z']) and (K=1); end
Else If (KindData='Number') then
Begin Repeat
If (K=3) then K:=1;
choix := Readkey;
If Choix = char(27) then goto Escape;
If Choix = Char(0) then inc(K);
If (K=2) and (Upcase(Choix) in ['A'..'Z']) then inc(K);
Until (Upcase(Choix) in ['1'..'9']) and (K=1) ; end
Else If (KindData='All') then
Begin Repeat
If (K=3) then K:=1;
choix := Readkey;
If Choix = char(27) then goto Escape;
If Choix = Char(0) then inc(K);
If (K=2) and (Upcase(Choix) in ['A'..'Z']) then inc(K);
Until (Upcase(Choix) in ['1'..'9']) or
(Upcase(Choix) in ['A'..'Z']) and (K=1); end;
Write (Upcase(Choix));
ch := Readkey;
If (ch=Char(0)) then ch:=Readkey;
Until (ch = char(13));
end;
end;
{----------------------------------------------------------------------------}
Procedure Read_integer (Var NumdataFinal:Integer);
Label Backspace, Effacement, Escape, Fleche_droite, Fleche_gauche,
Insertion, Key_F1, Tabulation, En_attente_de_commande;
Const Base = 10;
Sentinel = char(13);
var Touche : char;
Digit : integer;
NumData : integer;
Position : integer;
String_data : String;
Fleche_active : Boolean;
Begin
I := 1;
Digit := 0;
Numdata := 0;
String_data := '';
Touche_F1 := False;
Touche_Esc := False;
Fleche_active := false;
Goto En_attente_de_commande;
Backspace :
Begin
If Fleche_active = true then
Begin
Delete(String_data,I-1,1);
Gotoxy((I-1),1);
For Position := (I-1) to Length(String_data) do
Begin Write(String_data[Position]) end;
Write(' '); Gotoxy((I-1),1); Dec(I);
end
Else If I >= 2 then
Begin
Delete(String_data,I-1,1);
Gotoxy(I-1,1); Write(char(0));
Gotoxy(I-1,1); Dec(I);
end;
goto En_attente_de_commande;
end;
Effacement :
Begin
Delete(String_data,I,1);
For Position := I to Length(String_data) do
Begin Write(String_data[Position]) end;
Write(' '); Gotoxy(I,1);
goto En_attente_de_commande
end;
Escape :
Begin Touche_Esc := true; exit; end;
Fleche_droite :
Begin
Fleche_active := True;
If I <= Length(String_data) then
Begin Gotoxy(I+1,1); Inc(I); end;
goto En_attente_de_commande
end;
Fleche_gauche :
Begin
Fleche_active := True;
If I > 1 then
Begin Gotoxy(I-1,1); Dec(I); end;
goto En_attente_de_commande
end;
Insertion :
Begin
If Touche_insert = False then
Begin touche_insert := true; CursorInsert; end
Else If Touche_insert = true then
Begin touche_insert := false; Normalcursor; end;
goto En_attente_de_commande
end;
Key_F1 :
Begin Touche_F1 := true ; exit; end;
En_attente_de_commande :
Begin
Repeat
Touche := Readkey;
ch := Touche;
If (I > Length(String_data)) then Fleche_active := false;
If ((Touche >= '0') and (Touche <= '9')) then
Begin
If ((Touche_insert = True) and (Fleche_active = True)) then
Begin
Insert(Touche,String_data,I);
For Position := I to Length(String_data) do
Begin Write(String_data[Position]) end;
Gotoxy(I+1,1); Inc(I);
end
Else If ((Touche_insert = False) or (Fleche_active = false)) then
Begin
String_data[I] := Touche;
If Fleche_active = false then String_data := String_data + String_data[I];
Write(String_data[I]);
Inc(I);
end;
end
Else If ch = char(27) then goto Escape
Else If ch = char(8) then goto Backspace
Else If ch = char(0) then
Begin
ch := Readkey;
If ch = char(75) then goto Fleche_gauche
Else If ch = char(59) then goto Key_F1
Else If ch = char(77) then goto Fleche_droite
Else If ch = char(83) then goto Effacement
Else If ch = char(82) then goto Insertion
end;
Until (ch = Sentinel);
For Position := 1 to Length(String_data) do
Begin
Digit := ORD(String_data[Position]) - ORD('0');
Numdata := base * Numdata + Digit;
end;
end;
NumDataFinal := Numdata;
End;
{----------------------------------------------------------------------------}
Procedure Read_string (Var RepFinal:String);
Label Backspace, Effacement, Escape, Fleche_droite, Fleche_gauche, Fleche_bas,
Fleche_haut, Insertion, Key_F1, Tabulation, En_attente_de_commande;
Const Sentinel = char(13);
var Rep : String;
Touche : char;
Position : integer;
Fleche_active : Boolean;
Begin
I := 1;
Rep := '';
Touche_tab := False;
Touche_Esc := False;
Touche_bas := False;
Touche_haut := False;
Fleche_active := false;
Goto En_attente_de_commande;
Backspace :
Begin
If Fleche_active = true then
Begin
Delete(Rep,I-1,1);
Gotoxy((I-1),1);
For Position := (I-1) to Length(Rep) do
Begin Write(Rep[Position]) end;
Write(' '); Gotoxy((I-1),1); Dec(I);
end
Else If I >= 2 then
Begin
Delete(Rep,I-1,1);
Gotoxy(I-1,1); Write(char(0));
Gotoxy(I-1,1); Dec(I);
end;
goto En_attente_de_commande;
end;
Effacement :
Begin
Delete(Rep,I,1);
For Position := I to Length(Rep) do
Begin Write(Rep[Position]) end;
Write(' '); Gotoxy(I,1);
goto En_attente_de_commande
end;
Escape :
Begin Touche_Esc := true; exit; end;
Fleche_bas :
Begin Touche_bas := true; exit; end;
Fleche_haut :
Begin Touche_haut := true; exit; end;
Fleche_droite :
Begin
Fleche_active := True;
If I <= Length(Rep) then
Begin Gotoxy(I+1,1); Inc(I); end;
goto En_attente_de_commande
end;
Fleche_gauche :
Begin
Fleche_active := True;
If I > 1 then
Begin Gotoxy(I-1,1); Dec(I); end;
goto En_attente_de_commande
end;
Insertion :
Begin
If Touche_insert = False then
Begin touche_insert := true; CursorInsert; end
Else If Touche_insert = true then
Begin touche_insert := false; Normalcursor; end;
goto En_attente_de_commande
end;
Tabulation :
Begin Touche_tab := true; exit; end;
En_attente_de_commande :
Begin
Repeat
Touche := Readkey;
ch := Touche;
If (I > Length(Rep)) then Fleche_active := false;
If ((Touche >= char(32)) and (Touche <= char(255))) then
Begin
If ((Touche_insert = True) and (Fleche_active = True)) then
Begin
Insert(Touche,Rep,I);
For Position := I to Length(Rep) do
Begin Write(Rep[Position]) end;
Gotoxy(I+1,1); Inc(I);
end
Else If ((Touche_insert = False) or (Fleche_active = false)) then
Begin
Rep[I] := Touche;
If Fleche_active = false then Rep := Rep + Rep[I];
Write(Rep[I]);
Inc(I);
end;
end
Else If ch = char(27) then goto Escape
Else If ch = char(8) then goto Backspace
Else If ch = char(9) then goto Tabulation
Else If ch = char(0) then
Begin
ch := Readkey;
If ch = char(75) then goto Fleche_gauche
Else If ch = char(77) then goto Fleche_droite
Else If ch = char(83) then goto Effacement
Else If ch = char(82) then goto Insertion
Else If ch = char(80) then goto Fleche_bas
Else If ch = char(72) then goto Fleche_haut
end;
Until (ch = Sentinel);
end;
RepFinal := Rep;
End;
{---------------------------------------------------------------------------}
Procedure Centrer(Phrase:String ; x1,x2,Ligne:integer);
Begin
Gotoxy(2,Ligne);
For I := 1 to (((x2-x1)-Length(Phrase)) div 2) do Write (' ');
Write(Phrase);
end;
{----------------------------------------------------------------------------}
Procedure Message_erreur (Message:integer;CouleurFond:integer);
Var DosError_Message : String[80];
IOResult_Message : String[80];
Begin
EffaceCursor;
DessineBoite(9,7,72,19,4,true,0,12,True,CouleurFond,CouleurFond);
DessineBoite(12,8,69,10,4,true,12,0,False,12,12);
TextColor (14); Centrer('Errors Messages',12,69,2);
DessineBoite(12,11,69,18,4,true,12,0,False,12,12);
TextColor (15);
Case Message of
1: Begin
Case DosError of
2 : DosError_Message := 'File not found';
3 : DosError_Message := 'Path not found';
5 : DosError_Message := 'Access denied';
6 : DosError_Message := 'Invalid handle';
8 : DosError_Message := 'Not enough memory';
10 : DosError_Message := 'Invalid environment';
11 : DosError_Message := 'Invalid format';
18 : DosError_Message := 'No more files';
end;
Gotoxy(22,3);
Write('Dos Error number: ', DosError);
Centrer(DosError_Message,12,69,4);
DosError:=0;
end;
2: Begin
Case IOError of
1 : IOResult_message := 'Invalid function number';
2 : IOResult_message := 'File not found';
3 : IOResult_message := 'Path not found';
4 : IOResult_message := 'Too many open files';
5 : IOResult_message := 'File access denied';
6 : IOResult_message := 'Invalid file handle';
12 : IOResult_message := 'Invalid file access code';
15 : IOResult_message := 'Invalid drive number';
16 : IOResult_message := 'Cannot remove current directory';
17 : IOResult_message := 'Cannot rename across drives';
18 : IOResult_message := 'No more files';
100 : IOResult_message := 'Disk read error';
101 : IOResult_message := 'Disk write error';
102 : IOResult_message := 'File not assigned';
103 : IOResult_message := 'File not open';
104 : IOResult_message := 'File not open for input';
105 : IOResult_message := 'File not open for output';
106 : IOResult_message := 'Invalid numeric format';
150 : IOResult_message := 'Disk is write-protected';
151 : IOResult_message := 'Bad drive request struct length';
152 : IOResult_message := 'Drive not ready';
154 : IOResult_message := 'CRC error in data';
156 : IOResult_message := 'Disk seek error';
157 : IOResult_message := 'Unknown media type';
158 : IOResult_message := 'Sector Not Found';
159 : IOResult_message := 'Printer out of paper';
160 : IOResult_message := 'Device write fault (Printer may be off-line!)';
161 : IOResult_message := 'Device read fault';
162 : IOResult_message := 'Hardware failure';
200 : IOResult_message := 'Division by zero';
201 : IOResult_message := 'Range check error';
202 : IOResult_message := 'Stack overflow error';
203 : IOResult_message := 'Heap overflow error';
204 : IOResult_message := 'Invalid pointer operation';
205 : IOResult_message := 'Floating point overflow';
206 : IOResult_message := 'Floating point underflow';
207 : IOResult_message := 'Invalid floating point operation';
208 : IOResult_message := 'Overlay manager not installed';
209 : IOResult_message := 'Overlay file read error';
210 : IOResult_message := 'Object not initialized';
211 : IOResult_message := 'Call to abstract method';
212 : IOResult_message := 'Stream registration error';
213 : IOResult_message := 'Collection index out of range';
214 : IOResult_message := 'Collection overflow error';
215 : IOResult_message := 'Arithmetic overflow error';
216 : IOResult_message := 'General Protection fault';
end;
Gotoxy(20,3);
Write('IO Error number: ', IOError);
Centrer(IOResult_message,12,69,4);
end;
3: Begin
Centrer('You don''t have enough free space on drive "'+Destination_Drive+'"',12,69,3);
end;
4: Begin
Centrer('Please enter the source drive.',12,69,3);
end;
5: Begin
Centrer('Please Enter the destination drive',12,69,3);
end;
6: Begin
Centrer('Please enter the destination directory',12,69,3);
end; end;
TextColor (15);
Centrer ('Press <Enter> to continue!',12,69,7);
Readln;
end