.


:




:

































 

 

 

 


:

.11-

..
..

, 2012

 

. 3

1. 5

2. .. .7

2.1 . 7

2.2 .. 9

3. ..10

. 16

.. 17

: 18

 

 

 
 


 

. , ( ), , , , .

, , . .

, , , . .

, , .

, . XIX . , . , , ( , ). , . : , Keyboard Simulator, Stamina, Diabolical fingers, Adelavida Keyboard Shooter, kbTrainer

, .

, . , , , , , , , . , . .

,

 

,

.

, , .

 


1.

 

, :

 

1. Widows XP,7;

2. ;

3. ;

4. .

 

, , .

:

ü ;

ü ;

ü ;

ü ;

ü .

 

: . . . . . .

. .

 

1.1. .

 

1.1 .

 

 

 

 

:

1. 2- Panel( 2.1.1.)

Panel1 -

Panel2 -

2. 2- Buttons( 2.1.2.)

-

-

3. Label - ( 2.1.3.)

4. Timer - ( 2.1.4.)

5. MediaPlayer . ( 2.1.5.)

 

2.1.1.- Panel1 Panel2.

 

2.1.2.- Buttons.

 

2.1.3.- Label.

 

2.1.4.- Timer.

2.1.5.- MediaPlayer.

 

 

 

 

2.1.

, , . (. 3. 1):

 

2. 1.1.

 

 

 

 

 

:

 


 

 


, .

, 3.1 FormKeyPress.

 

3.1 FormKeyPress

procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);

begin

 

 

if Panel2.Caption <> key then

showmessage( );

if Panel2.Caption = key then

begin

Inc(count);

Panel2.Top:= Panel1.Height;

end;

if count = x * 3 then

begin

Inc(x);

Label1.Caption:= 'Level ' + IntToStr(x);

if Timer1.Interval <= 250 then Timer1.Interval:= Timer1.Interval - 25

else

if Timer1.Interval <= 100 then Timer1.Interval:= 100

else

Timer1.Interval:= Timer1.Interval - 250;

end;

end;

 

 

: , Panel2,

Panel2 Panel1.

1.

Timer.Interval .

 

Button1Click . FormKeyPress , .

 

3.2 Button1Click

procedure TForm1.Button1Click(Sender: TObject);

begin

if MediaPlayer1.FileName <> '' then

MediaPlayer1.Play;

Form1.Focused;

Panel2.Visible:= true;

Panel2.Top:= 0;

Randomize;

Panel2.Caption:= Chr(Random(26)+97);

count:= 0;

uncount:= 0;

x:= 1;

Label1.Caption:= 'Level ' + IntToStr(x);

Timer1.Enabled:= true;

end;

 

Button1Click

 

 

MediaPlayer( ). Panel2.Visible:= true; - ,

. Panel2.Top:= 0; ,

Panel2.

randomize . Panel2.Caption:= Chr(Random(26)+97); - .

x .

Timer1.Enabled:= true; - , .

 

3.3 Button2Click

procedure TForm1.Button2Click(Sender: TObject);

begin

Form1.Close;

end;

 

Button2Click . 3.3.

 

3.4 MediaPlayerNotify

procedure TForm1.MediaPlayer1Notify(Sender: TObject);

begin

with MediaPlayer1 do

if NotifyValue = nvSuccessful then

begin

Notify:= True;

Play;

end;

end;

 

Notify , . MediaPlayerNotify

3.4 .

 

3.5 Timer1Timer

procedure TForm1.Timer1Timer(Sender: TObject);

begin

Randomize;

if Panel1.Height > Panel2.Top then

Panel2.Top:= Panel2.Top + 20

else

begin

Randomize;

Panel2.Caption:= Chr(Random(26)+97);

 

 

Panel2.Left:= Random(Panel1.Width - Panel2.Width);

Panel2.Top:= 0;

Inc(uncount);

end;

end;

 

3.5 Timer1Timer.

 

var x, count( ) uncount ( ) integer.

MediaPlayer visible false ( 3.1)

3.1

 

KeyPreview True ( 3.2). - ( ).

3.2

 

3.3

 

. .

( 3.3) Color .

 
 

 

 

 


 

.

, .

, .

, . , , .

 


1. ., .- Delphi 3: .-.: .-1998. -568.

2. . Delphi.-.: -.-2004.-880.

3. . Delphi . - .: -.-2003.-368.

4. . : Delphi. 1.4.3 1.1.2001.

5. . : Delphi C++Builder.

6. . Delphi.-.:- ..-1996.-512.

7. .. Delphi. .-.: .-2004,- 600.

8. .. Delphi.-.: -.-2005. - 560.

 

 

 
 


:

unit Unit1;

 

interface

 

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, ExtCtrls, StdCtrls, ComCtrls, MPlayer;

 

type

TForm1 = class(TForm)

Panel1: TPanel;

Panel2: TPanel;

Button1: TButton;

Button2: TButton;

Label1: TLabel;

Timer1: TTimer;

MediaPlayer1: TMediaPlayer;

procedure FormKeyPress(Sender: TObject; var Key: Char);

procedure Button1Click(Sender: TObject);

procedure Timer1Timer(Sender: TObject);

procedure Button2Click(Sender: TObject);

procedure MediaPlayer1Notify(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

 

var

Form1: TForm1;

uncount,count,x: integer;

 

implementation

 

{$R *.dfm}

 

procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);

begin

if Panel2.Caption <> key then

showmessage( );

if Panel2.Caption = key then

 

begin

Inc(count);

Panel2.Top:= Panel1.Height;

end;

if count = x * 3 then

begin

Inc(x);

Label1.Caption:= 'Level ' + IntToStr(x);

if Timer1.Interval <= 250 then Timer1.Interval:= Timer1.Interval - 25

else

if Timer1.Interval <= 100 then Timer1.Interval:= 100

else

Timer1.Interval:= Timer1.Interval - 250;

end;

end;

 

procedure TForm1.Button1Click(Sender: TObject);

begin

if MediaPlayer1.FileName <> '' then

MediaPlayer1.Play;

Form1.Focused;

Panel2.Visible:= true;

Panel2.Top:= 0;

Randomize;

Panel2.Caption:= Chr(Random(26)+97);

count:= 0;

uncount:= 0;

x:= 1;

Label1.Caption:= 'Level ' + IntToStr(x);

Timer1.Enabled:= true;

end;

 

procedure TForm1.Timer1Timer(Sender: TObject);

begin

Randomize;

if Panel1.Height > Panel2.Top then

Panel2.Top:= Panel2.Top + 20

else

begin

Randomize;

Panel2.Caption:= Chr(Random(26)+97);

Panel2.Left:= Random(Panel1.Width - Panel2.Width);

Panel2.Top:= 0;

 

 

Inc(uncount);

end;

end;

 

procedure TForm1.Button2Click(Sender: TObject);

begin

Form1.Close;

end;

 

procedure TForm1.MediaPlayer1Notify(Sender: TObject);

begin

with MediaPlayer1 do

if NotifyValue = nvSuccessful then

begin

Notify:= True;

Play;

end;

end;

 

end.

 

 
 

 

 



<== | ==>
Student A. Pass on the message below to your partner. Then write down the message your partner gives you. | ,
:


: 2016-12-06; !; : 472 |


:

:

.
==> ...

1702 - | 1530 -


© 2015-2024 lektsii.org - -

: 0.118 .