-
Notifications
You must be signed in to change notification settings - Fork 3
/
UResult.pas
90 lines (78 loc) · 2.61 KB
/
UResult.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
unit UResult;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, pngimage, ExtCtrls, ComCtrls;
type
TFormResult = class(TForm)
ImageWin: TImage;
ButtonNew: TButton;
ButtonQuit: TButton;
Bevel1: TBevel;
LabelTime: TLabel;
LabelCTime: TLabel;
ButtonStatistics: TButton;
ListBoxStatistics: TListBox;
LabelDif: TLabel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
TrackBarDif: TTrackBar;
LabelDifV: TLabel;
procedure FormShow(Sender: TObject);
procedure ButtonStatisticsClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure TrackBarDifChange(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FormResult: TFormResult;
Stat:Boolean;
implementation
{$R *.dfm}
uses Main;
procedure SetStat(AScatter:Byte);
begin
with FormResult, Game do
begin
ListBoxStatistics.Items.BeginUpdate;
ListBoxStatistics.Clear;
//ListBoxStatistics.Items.Add('Âàø ñ÷åò: '+IntToStr(Statistics.Bonus));
ListBoxStatistics.Items.Add('Âðåìÿ èãðû: '+IntToStr(Stat[AScatter].LastTime)+' ñåê.');
ListBoxStatistics.Items.Add('Êîë-âî õîäîâ: '+IntToStr(Stat[AScatter].Clicks));
ListBoxStatistics.Items.Add('');
ListBoxStatistics.Items.Add('Îáùàÿ ñòàòèñòèêà');
ListBoxStatistics.Items.Add('Ìèíèìàëüíîå âðåìÿ: '+IntToStr(Stat[AScatter].MinTime)+' ñåê.');
ListBoxStatistics.Items.Add('Ìàêñèìàëüíîå âðåìÿ: '+IntToStr(Stat[AScatter].MaxTime)+' ñåê.');
ListBoxStatistics.Items.Add('Ïîáåä: '+IntToStr(Stat[AScatter].Win));
ListBoxStatistics.Items.Add('Îòìåíåííûõ: '+IntToStr(Stat[AScatter].Lose));
ListBoxStatistics.Items.Add('Ìèíèìàëüíîå êîë-âî õîäîâ: '+IntToStr(Stat[AScatter].MinClicks));
ListBoxStatistics.Items.EndUpdate;
end;
end;
procedure TFormResult.FormShow(Sender: TObject);
begin
ImageWin.Picture.Graphic:=Game.Bitmaps.Win;
TrackBarDif.Position:=Game.ScatterNum;
LabelCTime.Caption:=IntToStr(Game.Stat[Game.ScatterNum].LastTime)+' ñåê. Êîë-âî øàãîâ: '+IntToStr(Game.Stat[Game.ScatterNum].Clicks);
SetStat(TrackBarDif.Position);
end;
procedure TFormResult.ButtonStatisticsClick(Sender: TObject);
begin
if Stat then ClientHeight:=160 else ClientHeight:=369;
Stat:=not Stat;
end;
procedure TFormResult.FormCreate(Sender: TObject);
begin
Stat:=False;
ClientHeight:=160;
end;
procedure TFormResult.TrackBarDifChange(Sender: TObject);
begin
SetStat(TrackBarDif.Position);
LabelDifV.Caption:=IntToStr((TrackBarDif.Position * 50)+10);
end;
end.