-
Notifications
You must be signed in to change notification settings - Fork 0
/
Unit26.pas
236 lines (215 loc) · 5.84 KB
/
Unit26.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
unit Unit26;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Imaging.pngimage,
Vcl.ExtCtrls, System.DateUtils;
type
TForm26 = class(TForm)
ComboBox1: TComboBox;
ComboBox2: TComboBox;
ComboBox3: TComboBox;
ComboBox4: TComboBox;
ComboBox5: TComboBox;
ComboBox6: TComboBox;
ComboBox7: TComboBox;
ComboBox8: TComboBox;
Image1: TImage;
Image10: TImage;
Image11: TImage;
Image12: TImage;
Image2: TImage;
Image3: TImage;
Image4: TImage;
Image5: TImage;
Image6: TImage;
Image7: TImage;
Image8: TImage;
Image9: TImage;
Label1: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Âåíåðà: TLabel;
procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Image12Click(Sender: TObject);
procedure Label15Click(Sender: TObject);
procedure Label16Click(Sender: TObject);
procedure Label8Click(Sender: TObject);
procedure Image12MouseEnter(Sender: TObject);
procedure Image12MouseLeave(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form26: TForm26;
T: TDateTime;
Start, Stop: TDateTime;
Elapsed: int64;
implementation
uses unit8,unit25;
{$R *.dfm}
procedure herewegoagain;
begin
with form26 do begin
label16.visible:=true;
label14.visible:=false;
label12.visible:=false;
label13.visible:=false;
image11.Visible:=false;
âåíåðà.Caption:='Âåíåðà';
label1.Caption:='Çåìëÿ';
label2.Caption:='Ìàðñ';
label3.Caption:='Ìåðêóðèé';
label4.Caption:='Íåïòóí';
label5.Caption:='Ñàòóðí';
label6.Caption:='Óðàí';
label7.Caption:='Þïèòåð';
image1.Picture.LoadFromFile('Íîâàÿ ïàïêà\2.png');
image2.Picture.LoadFromFile('Íîâàÿ ïàïêà\3.png');
image3.Picture.LoadFromFile('Íîâàÿ ïàïêà\8.png');
image4.Picture.LoadFromFile('Íîâàÿ ïàïêà\9.png');
image5.Picture.LoadFromFile('Íîâàÿ ïàïêà\5.png');
image6.Picture.LoadFromFile('Íîâàÿ ïàïêà\4.png');
image7.Picture.LoadFromFile('Íîâàÿ ïàïêà\6.png');
image8.Picture.LoadFromFile('Íîâàÿ ïàïêà\7.png');
label8.Enabled:=true;
combobox1.enabled:=true;
combobox2.enabled:=true;
combobox3.enabled:=true;
combobox4.enabled:=true;
combobox5.enabled:=true;
combobox6.enabled:=true;
combobox7.enabled:=true;
combobox8.enabled:=true;
combobox1.ItemIndex:=-1;
combobox2.ItemIndex:=-1;
combobox3.ItemIndex:=-1;
combobox4.ItemIndex:=-1;
combobox5.ItemIndex:=-1;
combobox6.ItemIndex:=-1;
combobox7.ItemIndex:=-1;
combobox8.ItemIndex:=-1;
combobox1.Text:='';
combobox2.Text:='';
combobox3.Text:='';
combobox4.Text:='';
combobox5.Text:='';
combobox6.Text:='';
combobox7.Text:='';
combobox8.Text:='';
end; end;
procedure TForm26.FormActivate(Sender: TObject);
begin
T:=Time;
Start:=Now;
herewegoagain;
end;
procedure TForm26.FormClose(Sender: TObject; var Action: TCloseAction);
begin
planets2.Show;
planets.show;
end;
procedure TForm26.FormCreate(Sender: TObject);
begin
combobox1.Cursor:=2;
combobox2.Cursor:=2;
combobox3.Cursor:=2;
combobox4.Cursor:=2;
combobox5.Cursor:=2;
combobox6.Cursor:=2;
combobox7.Cursor:=2;
combobox8.Cursor:=2;
form26.Cursor:=1; T:=Time;
end;
procedure TForm26.Image12Click(Sender: TObject);
begin
form26.Close;
end;
procedure TForm26.Image12MouseEnter(Sender: TObject);
begin
form26.Cursor:=2;
end;
procedure TForm26.Image12MouseLeave(Sender: TObject);
begin
form26.Cursor:=1;
end;
procedure TForm26.Label15Click(Sender: TObject);
begin
herewegoagain;
label15.Visible:=false;
end;
procedure TForm26.Label16Click(Sender: TObject);
begin
image11.Visible:=false;
label13.Visible:=false;
label16.visible:=false;
label15.Visible:=true;
label8.Enabled:=false;
âåíåðà.Caption:='Ìåðêóðèé';
label1.Caption:='Âåíåðà';
label2.Caption:='Çåìëÿ';
label3.Caption:='Ìàðñ';
label4.Caption:='Þïèòåð';
label5.Caption:='Ñàòóðí';
label6.Caption:='Óðàí';
label7.Caption:='Íåïòóí';
combobox1.Enabled:=false;
combobox1.Text:='Ìåðêóðèé';
combobox2.Enabled:=false;
combobox2.Text:='Âåíåðà';
combobox3.Enabled:=false;
combobox3.Text:='Çåìëÿ';
combobox4.Enabled:=false;
combobox4.Text:='Ìàðñ';
combobox5.Enabled:=false;
combobox5.Text:='Þïèòåð';
combobox6.Enabled:=false;
combobox6.Text:='Ñàòóðí';
combobox7.Enabled:=false;
combobox7.Text:='Óðàí';
combobox8.Enabled:=false;
combobox8.Text:='Íåïòóí';
image1.Picture.LoadFromFile('Íîâàÿ ïàïêà\9.png');
image2.Picture.LoadFromFile('Íîâàÿ ïàïêà\2.png');
image3.Picture.LoadFromFile('Íîâàÿ ïàïêà\3.png');
image4.Picture.LoadFromFile('Íîâàÿ ïàïêà\8.png');
image5.Picture.LoadFromFile('Íîâàÿ ïàïêà\7.png');
image6.Picture.LoadFromFile('Íîâàÿ ïàïêà\4.png');
image7.Picture.LoadFromFile('Íîâàÿ ïàïêà\6.png');
image8.Picture.LoadFromFile('Íîâàÿ ïàïêà\5.png');
end;
procedure TForm26.Label8Click(Sender: TObject);
var
i, t: integer;
begin
if ((combobox1.ItemIndex=1) and (combobox2.ItemIndex=2) and
(combobox3.ItemIndex=3) and (combobox4.ItemIndex=0) and
(combobox5.ItemIndex=7) and (combobox6.ItemIndex=5) and
(combobox7.ItemIndex=6) and (combobox8.ItemIndex=4)) then
begin image11.Visible:=true; label12.Visible:=true;
label13.Visible:=false; label16.Visible:=false;
Stop:=Now; //çàñåêëè îêîí÷àíèå âûïîëíåíèÿ îïåðàöèè
Elapsed:=SecondsBetween(Start, Stop);//âðåìÿ â ñåêóíäàõ
label8.enabled:=false; label14.Visible:=true; label15.Visible:=true;
label14.caption:='Âû çàòðàòèëè '+inttostr(elapsed)+' ñåêóíä íà ðàññòàíîâêó ïëàíåò';
end else
begin label13.Visible:=true; image11.Visible:=true; end;
end;
end.