source: Console test/UMyConsoleApp.pas

Last change on this file was 15, checked in by george, 15 years ago
File size: 1.1 KB
Line 
1unit UMyConsoleApp;
2
3interface
4
5uses
6 SysUtils, Forms, UConsoleApp, UObjectType, UConsole, UFileSystem,
7 UTextScreen, Graphics;
8
9type
10 TMyConsoleApp = class(TConsoleApp)
11 procedure Execute; override;
12 end;
13
14implementation
15
16{ TMyConsoleApp }
17
18procedure TMyConsoleApp.Execute;
19var
20 I: Integer;
21 Text: string;
22begin
23 Randomize;
24 with Screen, Keyboard do begin
25 WriteLn('Zavádìní systému ChronOS...');
26 TextColor := clSilver;
27 ClearEol;
28 Sleep(500);
29 for I := 0 to 10 do begin
30 WriteLn(' Služba ' + IntToStr(I) + ' naètena');
31 Sleep(Random(300));
32 end;
33 repeat
34 WriteLn;
35 Write('[uživatel@server /]: ');
36 Text := ReadLn;
37 WriteLn;
38 if Text = 'verze' then WriteLn(' Verze: 0.0.1')
39 else if Text = 'nápovìda' then begin
40 WriteLn('Seznam pøíkazù');
41 WriteLn(' nápovìda - zobrazí tento výpis');
42 WriteLn(' verze - zobrazí verzi systému');
43 WriteLn(' konec - ukonèí systém');
44 end else if Text = 'konec' then WriteLn('Systém ukonèen')
45 else WriteLn('Neznámý pøíkaz');
46 until Text = 'konec';
47 end;
48end;
49
50end.
Note: See TracBrowser for help on using the repository browser.