-
Notifications
You must be signed in to change notification settings - Fork 2
/
About.PAS
executable file
·492 lines (452 loc) · 16.2 KB
/
About.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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
unit About;
interface
uses Windows, Classes, Graphics, Forms, Controls, StdCtrls,
Buttons, ExtCtrls, SysUtils, ComCtrls, Messages, ImgList;
type
TAboutBox = class(TForm)
OKButton: TButton;
ProgramName: TLabel;
PageControl: TPageControl;
StatusBar: TStatusBar;
GeneralSheet: TTabSheet;
TabSheet2: TTabSheet;
DrawImage: TImage;
Timer: TTimer;
HistoryMemo: TMemo;
TabSheet1: TTabSheet;
LinksBox: TComboBox;
DescMemo: TMemo;
Label1: TLabel;
KeysSheet: TTabSheet;
KeysMemo: TMemo;
PaintImage: TImage;
HomePageLinkLabel: TLabel;
procedure FormCreate(Sender: TObject);
procedure TimerTimer(Sender: TObject);
procedure HomePageLinkLabelClick(Sender: TObject);
procedure LinksBoxDblClick(Sender: TObject);
procedure LinksBoxKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure LinksBoxChange(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure OKButtonClick(Sender: TObject);
procedure HomePageLinkLabelMouseEnter(Sender: TObject);
procedure HomePageLinkLabelMouseLeave(Sender: TObject);
procedure PaintImageClick(Sender: TObject);
private
{ Private declarations }
procedure InitText;
procedure InitGraphics;
procedure DoneGraphics;
{ procedure DisplayPara(x,y : word);{}
procedure DrawProc;
public
{ Public declarations }
end;
type tURLink = record
URL : string;
Link : string;
Desc : string;
end;
const NiKesHomePageAddr = 'http://www.NiKeSoft.ru';
HomePageLinkSt = 'NiKe''s HomePage ('+NiKesHomePageAddr+')';
nLinks = 26;
Links : array [1..nLinks] of tURLink =
(
(URL:'http://www.winamp.com';Link:'www.winamp.com';Desc:'Îôèöèàëüíûé ñàéò ðóëüíîãî Winamp-à'),
(URL:'http://napster.com';Link:'napster.com';Desc:'MP3 Music Network'#13#10'Ïðîñòî ñêà÷àéòå Napster è óñòàíîâèòå åãî'#13#10'è ÂÛ ïîëó÷èòå äîñòóï ê ÒÅÐÐÀáàéòàì MP3 !!!'),
(URL:'http://www.musmania.ru';Link:'www.musmania.ru';Desc:'Ìóçûêàëüíûé ïîðòàë Ïðèìîðüÿ'#13#10'Öåëûå àëüáîìû ðàçíûõ èñïîëíèòåëåé'#13#10'òîëüêî äëÿ àáîíåíòîâ Primorye OnLine :('),
(URL:'http://www.farpost.com/mp3';Link:'www.farpost.com/mp3';Desc:'Ëèíêè (aKa ññûëêè;) íà ïðîâåðåííûå ñàéòû'),
(URL:'http://www.farpost.com/5045/43.4/links.htm#mp3';Link:'www.farpost.com/5045/43.4';Desc:'Ëèíêè íà MP3 ñàéòû © NiGhthAWk 2:5045/43.4'),
(URL:'http://www.allofmp3.com';Link:'www.allofmp3.com';Desc:'Íåïëîõîé èíòåðôåéñ è ïîäáîðêà'),
(URL:'http://www.mp3mp4.com';Link:'www.mp3mp4.com';Desc:'Êó÷à âñåãî, íî ìîæíî "çàáëóäèòüñÿ"'),
(URL:'http://mp3.ru';Link:'mp3.ru';Desc:'Ðóññêîÿçû÷íûé ïîðòàë MP3'),
(URL:'http://mp3.com';Link:'mp3.com';Desc:'Áóðæóéñêèé mp3 ñàéò ;)'),
(URL:'http://omen.ru/music/MP3&RA.HTM';Link:'omen.ru/music/MP3&RA.HTM';Desc:'Ðóññêèé mp3 ñàéò (OMEN)'),
(URL:'http://www.mp3shits.com/charts/mtv.shtml';Link:'www.mp3shits.com/charts/mtv.shtml';Desc:'MTV Top20 MP3 ñàéò'),
(URL:'http://www.altmp3.ru/';Link:'www.altmp3.ru';Desc:'mp3 ñàéò. Îáìåí ôàéëàìè. Àðõèâ. Çàêàçû'),
(URL:'ftp://ftp.marine.su/pub/';Link:'ftp.marine.su/pub/';Desc:'ftp mp3 ñàéò âî Âëàäèâîñòîêå'),
(URL:'ftp://ftp.stl.su/pub/music/';Link:'ftp.stl.su/pub/music/';Desc:'ftp mp3 ñàéò âî Âëàäèâîñòîêå [íà ÑèÒåëå aka stl.ru]'),
(URL:'http://top100.rambler.ru/top100/MP3/index.shtml.ru';Link:'top100.rambler.ru/top100/MP3/index.shtml.ru';Desc:'Rambler Top100 MP3'),
(URL:'http://www.aria.ru';Link:'www.aria.ru';Desc:'Îôèöèàëüíûé ñàéò ãð. Àðèß'),
(URL:'http://www.dolphin.ipc.ru';Link:'www.dolphin.ipc.ru';Desc:'Îôèöèàëüíûé ñàéò Äåëüôèíà aKa Dolphin'),
(URL:'http://www.guanoapes.com';Link:'www.GuanoApes.com';Desc:'Îôèöèàëüíûé ñàéò Guano Apes (Sandra Nasic & Co.)'),
(URL:'http://www.guanoapes.org';Link:'www.GuanoApes.org';Desc:'Ñàéò ïðî Guano Apes (Sandra Nasic & Co.)'),
(URL:'http://www.guanoapes.al.ru';Link:'www.GuanoApes.al.ru';Desc:'Ðîññèéñêèé ñàéò ïðî Guano Apes (Sandra Nasic & Co.)'),
(URL:'http://guanoapes.jsa.ru';Link:'GuanoApes.jsa.ru';Desc:'Ðîññèéñêèé ñàéò-ñïîíñîð Guano Apes (Sandra Nasic & Co.)'),
(URL:'http://users.erols.com/dcrouch/aon.htm';Link:'users.erols.com/dcrouch/aon.htm';Desc:'ArtOfNoise'),
(URL:'http://Durden.cjb.net';Link:'Durden.cjb.net';Desc:'Fight Club: Tyler Durden/Brad Pitt, Edvard Norton'),
(URL:'http://www.foxmovies.com/fightclub';Link:'www.foxmovies.com/FightClub';Desc:'Fight Club: Tyler Durden/Brad Pitt, Edvard Norton'),
(URL:'http://www.paparoach.com';Link:'www.PapaRoach.com';Desc:'Îôèöèàëüíûé ñàéò ãðóïïû Papa Roach (íà Flash-e)'),
(URL:'http://www.davidfincher.net';Link:'www.DavidFincher.net';Desc:'David Fincher (Fight Club, Se7en)')
);
const FirstShowAbout : boolean = true;
Initing : boolean = false;
ShowingAbout : boolean = false;
procedure ShowAboutBox;
Implementation uses Main,ShellApi;
{$R *.DFM}
procedure TAboutBox.InitText;
begin
with HistoryMemo.Lines do
begin
Clear;
Add('*** MP3 NaviGatoR : Õðîíèêà Âåðñèé ***');
Add('v2.92 (19/11/2003)');
Add(' ! Èñïðàâèë áàã â Äåëôè7 (StdCtrls::ComboBoxStrings.Get)');
Add(' Òåïåðü êîððåêòíî îòîáðàæàåòñÿ Òàã-åäèòîð');
Add(' * Êà÷àéòå èç ñåòè (www.NiKeSoft.ru/?page=download)');
Add(' * Òåïåðü MP3 NaviGatoR äî âûõîäà âåðñèè 3.x áóäåò áåñïëàòíûé!');
Add('');
Add('v2.9 (03/05/2003)');
Add(' * Ïåðåíåñåíî ïîä D7');
Add(' * Âíåñåíû èçìåíåíèÿ â êîä');
Add(' * Áàçà äàííûõ ïîïîëíåíà');
Add(' * Äîáàëåí äèàëîã "íàâèãàöèÿ ïî áàçå"');
Add(' * Èñïîëüçîâàíèå ôóíêöèè FileInfo() èç in_mp3.dll');
Add(' * Çàïóùåí www.NiKeSoft.ru, äîáðî ïîæàëîâàòü!');
Add('');
Add('v2.8 (19/09/2002)');
Add(' * 1-ÿ âåðñèÿ äëÿ ñåòè');
Add(' * Ïîôèêøåíû áàãè');
Add('');
Add('v2.7 (30/03/2002)');
Add(' * Èíòåãðàöèÿ ñ Áàçîé Ëèðèêñîâ!');
Add(' ADO, M$ Jet.OLEDB.4.0');
Add(' óäîáíûé ïîèñê/çàïðîñ');
Add(' * TAGs union Fix');
Add(' * Skin óëó÷øåí');
Add(' * LoadSkin bugFIX');
Add(' * TagEditor.OnLoad bugFIX');
Add(' * Volume/Balance bugFIX');
Add(' * Äîáàâëåíû ìåíþøêè äëÿ Edit-îâ:');
Add(' UPCASE, downcase, Ïåðâàÿ Áîëüøàÿ');
Add(' * Ñîâìåñòèìîñòü ñ XP');
(*
Add(' * ');
Add(' ');
*)
Add(' * "Êîñìåòè÷åñêèå" ôèêñû');
Add('');
Add('v2.6a (25/02/2002)');
Add(' * Special build 4 U.S.A.');
Add('');
Add('v2.5 (07/01/2002)');
Add(' * Fix â ãðóïïîâîé îáðàáîòêå');
Add(' * Fix â ID3v2 äâèæêå');
Add(' * Äîáàâèë äîï. ñòèëè:');
Add(' IDM');
Add('');
Add('v2.4 (04/08/2001)');
Add(' * Íåáîëüøèå ôèêñû');
Add(' * Äîáàâèë äîï. ñòèëè:');
Add(' Jump Up');
Add('');
Add('v2.3 beta 1 (07/08/2001)');
Add(' * Òåïåðü MP3 NaviGatoR èñïîëüçóåò DLL Winamp-a');
Add(' in_mp3.dll, out_*.dll, vis_*.dll!');
Add(' Ðàäóéòåñü è çàáóäüòå ïðî òîðìîçà :)');
Add('');
Add('v2.2 beta 3 (21/07/2001)');
Add(' * Òåïåðü ìîæíî ïðî÷èòàòü íàçíà÷åíèå êëàâèø :)');
Add('');
Add('v2.2 beta 1 (28/06/2001)');
Add(' Ïîëåòåë åùå îäèí ìîé âèíò :(');
Add(' íî íà ýòîò ðàç èñõîäíèêè ÿ âîññòàíîâèë!');
Add(' * Èçìåíèë îáðàáîòêó ID3v2');
Add(' * Ïîôèêñèë êó÷ó áàã');
Add(' * Äîáàâèë äîï. ñòèëè:');
Add(' Speed Garage, Rapcore');
Add('');
Add('v2.1 beta 1 (18/03/2001)');
Add(' * Ïîëíîñòüþ ïåðåðàáîòàííàÿ ñ "0" âåðñèÿ!');
Add(' * Ïðîäâèíóòûé MPEG-ïàðñåð');
Add(' * Ïîääåðæêà ID3v1.x, ID3v2.x è DID Tag-îâ');
Add(' * Ïîääåðæêà ïëåéëèñòîâ *.m3u, *.pls, *.nks');
Add(' * Äîáàâèë äîï. ñòèëè:');
Add(' Breakbeat, Garage, Progressive House');
Add('');
Add('');
Add('v2.00 beta 5 Src Crash! (09/04/Y2k)');
Add(' * Ïîëåòåë ìîé åäèíñòâåííûé âèíò (HDD) :(((');
Add(' ñî âñåìè èñõîäíèêàìè, MP3, Soft, Img, etc.');
Add(' Íà ýòîì ðàçâèòèå NaviGatoR-à è äðóãèõ ìîèõ ïðîåêòîâ');
Add(' íà äîëãî ïðåêðàòèëîñü...');
Add('');
Add('v2.00 beta 5 (08/04/Y2k)');
Add(' * MP3 NaviGatoR ïðèçíàí ëó÷øåé ïðîãðàììîé íà êîíêóðñå');
Add(' "Þíûé ïðîãðàììèñò 2000", ÄÂÃÓ, Âëàäèâîñòîê, Ðîññèÿ');
Add(' â íîìèíàöèè "èíñòðóìåíòàëüíûå ñðåäñòâà"! Ðóëåç! :)');
Add('');
Add('v2.00 beta 4 build 05/04/Y2k');
Add(' * Òåïåðü ìîæíî îïåðèðîâàòü DID - Òàãàìè !!!');
Add(' * Èñïðàâëåíà ïàðà îøèáîê ïðè ðàáîòå ñ ôàéëàìè');
Add(' * Òåïåðü âñå îïöèè àâòîìàòè÷åñêè ñîõðàíÿþòñÿ âî âíåøíèé òåêñòîâûé INI-ôàéë ïðîãðàììû (mp3nav.ini)');
Add('');
Add('v2.00 beta 3 build 01/04/Y2k');
Add(' * Èñïðàâëåíà ñåðüåçíåéøàÿ îøèáêà ðåäàêòèðîâàíèÿ ID3');
Add(' * Äîáàâëåí íîâûé òèï ïëåé-ëèñòîâ - *.nks, òåïåðü ïðîãðàììà çàïóñêàåòñÿ íàìíîãî áûñòðåå (Ïëåéëèñò òåïåðü àâòîìàòè÷åñêè ñîõðàíÿåòñÿ â ôàéë mp3nav.nks)');
Add(' * Äîáàâëåíà ïîääåðæêà ñêèíîâ');
Add(' * Óáðàíà íåíóæíàÿ êîëîíêà "ðàçìåð"');
Add(' * Äîáàâëåí áàëàíñ íà WaveOUT');
Add(' * Èçìåíåí òèï âñåõ áåãóíêîâ - òåïåðü äîñòàòî÷íî ïðîñòî êëèêíóòü â ëþáîì ìåñòå áåãóíêà è ïîçèöèÿ èçìåíèòñÿ íà "êëèêíóòóþ"');
Add('');
Add('v2.00 beta 2 build 26/03/Y2k');
Add(' * Òåïåðü ìîæíî íå òîëüêî ðåäàêòèðîâàòü PlayList-û, íî è èãðàòü MPEGs !');
Add(' * Äîáàâëåí ðåãóëÿòîð ãðîìêîñòè WaveOUT');
Add(' * Òåïåðü òåêóùèé PlayList ñîõðàíÿåòñÿ àâòîìàòè÷åñêè (mp3nav.m3u).');
Add(' * Ìîæíî ìåíÿòü øðèôò PlayList-à');
Add(' * Èñïðàâëåíû îøèáêè');
Add('');
Add('v2.00 beta 1 build 10/03/Y2k');
Add(' * Óñîâåðøåíñòâîâàííàÿ âåðñèÿ, â êîðíå èçìåíåí èíòåðôåéñ');
Add(' MP3 NaviGatoR òåïåðü ìîæåò:');
Add(' * Ðåäàêòèðîâàòü ID3 Tag (èíôîðìàöèþ î ïåñíå) îäíîãî ôàéëà');
Add(' * Ðåäàêòèðîâàòü ID3 Tag ãðóïïû ôàéëîâ');
Add(' * Çàãðóæàòü PlayList-û (*.m3u)');
Add(' * Ñîõðàíÿòü PlayList-û (*.m3u)');
Add(' * Ïîêàçûâàòü MPEG èíôîðìàöèþ');
Add(' * PlayList ìîæíî îòñîðòèðîâàòü ïî ëþáîìó ïàðàìåòðó ID3 Tag: Àðòèñòó/Íàçâàíèþ/Æàíðó/Àëüáîìó/Ãîäó/Êîìåíòàðèþ , à òàêæå ïî èìåíè ôàéëà èëè åãî ðàçìåðó');
Add(' * Ëåãêî ìàíèïóëèðîâàòü ôàéëàìè');
Add(' * Ìîæåò óäàëÿòü ôàéëû');
Add(' * Êîððåêòíî ðàáîòàåò ñ ReadOnly ôàéëàìè');
Add('');
Add('v1.00 beta 1 build 01/03/Y2k');
Add(' * Ïåðâûé ïóáëè÷íûé "Âûõîä â ñâåò" MP3 NaviGatoR.');
Add(' * Ïðîñòîé èíòåðôåéñ íå äàñò âàì ïîòåðÿòüñÿ :)');
Add('');
Add('*** Îò 01/03/Y2k ***');
end;
with KeysMemo.Lines do
begin
Clear;
Add('*** Ñïèñîê Êëàâèø, èñïîëüçóåìûõ MP3 NaviGatoR-îì ***');
Add('');
Add('Alt+W'#9#9'Çàïðîñ òåêñòà ïåñíè');
Add('F12'#9#9'Íîâûé çàïðîñ òåêñòà ïåñíè');
Add('Alt+3'#9#9'Ðåäàêòèðîâàòü òåêóùèé ôàéë');
Add('Alt+E'#9#9'Ðåäàêòèðîâàòü âûäåëåí. ôàéëû');
Add('Alt+Z'#9#9'Ïðåäûäóùàÿ ïåñíÿ');
Add('Alt+X'#9#9'Ïðîèãðûâàíèå (Play)');
Add('Alt+C'#9#9'Ïàóçà');
Add('Alt+V'#9#9'Ñòîï');
Add('Alt+B'#9#9'Ñëåäóùàÿ ïåñíÿ');
Add('Alt+J'#9#9'Ïåðåñêî÷èòü íà ïåñíþ/è');
Add('Alt+Up'#9#9'Cäâèíóòü âûäåëåííîå ââåðõ íà 1');
Add('Alt+Down'#9#9'Cäâèíóòü âûäåëåííîå âíèç íà 1');
Add('Alt+Home'#9#9'Cäâèíóòü âûäåëåííîå â íà÷àëî');
Add('Alt+End'#9#9'Cäâèíóòü âûäåëåííîå â êîíåö');
Add('Shift+Del'#9#9'Óäàëèòü Ôàéë ñ Äèñêà');
Add('Shift+Ins'#9#9'Äîáàâèòü ôàéë(û)');
Add('Ctrl+O'#9#9'Îïöèè');
Add('Ctrl+F'#9#9'Âûðîâíÿòü Ï.Ë.');
Add('Ctrl+R'#9#9'Îáíîâèòü âûäåëåííîå');
Add('Ctrl+N'#9#9'Ïåðåèìåíîâàòü âûäåëåííîå (!)');
Add('Ctrl+L'#9#9'Çàãðóçèòü ïëåéëèñò');
Add('Ctrl+A'#9#9'Âûäåëèòü âñå');
Add('Ctrl+B'#9#9'Ïîêàç/ñïðÿòàòü çàãîëîâêè');
Add('Ctrl+G'#9#9'Ñãðóïïèðîâàòü âûäåëåííîå');
Add('Ctrl+C'#9#9'Ðàçìåñòèòü ïî öåíòðó');
Add('Ctrl+D'#9#9'Ðàçìåð ïî óìîë÷àíèþ');
Add('Ctrl+H'#9#9'Ïîêàçàòü òåêóùèé ôàéë');
Add('Ctrl+K'#9#9'Ïåðåìåñòèòü âûäåëåííîå ïîñëå èãðàþùåé');
Add('Ctrl+T'#9#9'Èçìåíèòü âèä âðåìåíè');
Add('Ctrl+Alt+E'#9#9'Îáíîâèòü âûäåëåííîå');
Add('Ctrl+Del'#9#9'Óäàëèòü íåâûäåëåíîå èç Ï.Ë.');
Add('Ctrl+Alt+Shift+~'#9'"Ñåêðåòíîå ìåíþ" ("q" - âûõîä)');
Add('Ins'#9#9'Äîáàâèòü äèðåêòîðè(þ/è)');
Add('F1'#9#9'Î Ïîðãðàììå');
Add('F3'#9#9'Ïåðåñêî÷èòü íà ïåñíþ/è');
Add('F10'#9#9'Îïöèè');
end;
end;
var Buf : TBitMap;
{ pHDC : HDC;{}
procedure TAboutBox.DoneGraphics;
begin
if Buf <> nil then Buf.Free;
end;
// Êîïèpîâàíèå ñ îäíîãî ó÷àñòêà ïàìÿòè â äpóãîé äëèíû size.
function CopyToMem(fpBlock1, fpBlock2: Pointer; Size: Cardinal): Boolean;
assembler;
asm
push esi
push edi
pushfd
cld
mov esi,fpBlock1
mov edi,fpBlock2
mov ecx,Size
repe movsb
popfd
pop edi
pop esi
end;
procedure TAboutBox.InitGraphics;
begin
{}
end;
procedure TAboutBox.DrawProc;
begin
(*
{ PaintImage.Canvas.Handle{}
bitblt(pHDC,000,000,DrawImage.Width,DrawImage.Height,
DrawImage.Canvas.Handle,000,000,SRCCOPY);
{ DisplayPara(i,15 + ptab[idx]);}
DisplayPara(i,0);
PaintImage.Canvas.Draw(0,0,Buf);
bitblt(PaintImage.Canvas.Handle,000,000,Buf.Width,Buf.Height,
pHDC,000,000,SRCCOPY);
PaintImage.Repaint;
{ inc(idx,3);}
inc(i,di); if (i < 5) or (i+xs > MaxX) then di := -di;
*)
end;
procedure ShowAboutBox;
begin
if not ShowingAbout then
begin
ShowingAbout := true;
with TAboutBox.Create(Application) do
try
Show;
finally
end;
end;
end;
function GetCPUSpeed: Double;
const
DelayTime = 500; // measure time in ms
var
TimerHi, TimerLo: DWORD;
PriorityClass, Priority: Integer;
begin
PriorityClass := GetPriorityClass(GetCurrentProcess);
Priority := GetThreadPriority(GetCurrentThread);
SetPriorityClass(GetCurrentProcess, REALTIME_PRIORITY_CLASS);
SetThreadPriority(GetCurrentThread, THREAD_PRIORITY_TIME_CRITICAL);
Sleep(10);
asm
// dw 310Fh // rdtsc
rdtsc
mov TimerLo, eax
mov TimerHi, edx
end;
Sleep(DelayTime);
asm
// dw 310Fh // rdtsc
rdtsc
sub eax, TimerLo
sbb edx, TimerHi
mov TimerLo, eax
mov TimerHi, edx
end;
SetThreadPriority(GetCurrentThread, Priority);
SetPriorityClass(GetCurrentProcess, PriorityClass);
Result := TimerLo / (1000.0 * DelayTime);
end;
procedure TAboutBox.FormCreate(Sender: TObject);
var a,b,c,d : word;
i : integer;
(*
x,y,i : integer;
trcol,bkcol,col : integer;
*)
begin
{ DefinePriority(1,1,0);{}
FirstShowAbout := true;
PageControl.ActivePageIndex := 0;
GetBuildInfo(a,b,c,d);
Caption := Format('Î ïðîãðàììå %s', [(appName)]);
{ HomePageLinkLabel.Caption := HomePageLinkSt;}
{ ProgramIcon.Picture.Assign(Application.Icon);}
ProgramName.Left := 0;
ProgramName.Width := GeneralSheet.Width;
ProgramName.Alignment := taCenter;
ProgramName.Caption := appName + ' v' + inttostr(a)+'.'+inttostr(b)+'.'+inttostr(c)+' build '+inttostr(d);
{NiKeSoftImage}
{ if FirstShowAbout then{}
with DrawImage.Picture do
begin
(*
Bitmap.TransparentMode := tmFixed;
Bitmap.PixelFormat := pf4bit;
Bitmap.TransparentColor := Bitmap.Canvas.Pixels[0,0];
Bitmap.Transparent := true;
trcol := ColorToRGB(clBtnFace);
bkcol := Bitmap.Canvas.Pixels[0,0];
for x := 0 to Bitmap.Width-1 do
for y := 0 to Bitmap.Height-1 do
begin
col := Bitmap.Canvas.Pixels[x,y];
if (col <> bkcol) then
Bitmap.Canvas.Pixels[x,y] := col
else Bitmap.Canvas.Pixels[x,y] := trcol;
end;
*)
end;
InitText;
LinksBox.Items.Clear;
for i := 1 to nLinks do LinksBox.Items.Add(Links[i].Link);
LinksBox.ItemIndex := 0;
LinksBox.OnChange(Self);
end;
procedure TAboutBox.TimerTimer(Sender: TObject);
begin
if Initing then exit;
Initing := true;
if FirstShowAbout then
begin
FirstShowAbout := false;
InitGraphics;
end;
DrawProc;
Initing := false;
end;
procedure TAboutBox.HomePageLinkLabelClick(Sender: TObject);
begin
ShellExecute(0,'open',NiKesHomePageAddr,nil,nil,SW_SHOWNORMAL);
end;
procedure TAboutBox.LinksBoxDblClick(Sender: TObject);
begin
ShellExecute(0,'open',PChar(Links[LinksBox.ItemIndex+1].URL),nil,nil,SW_SHOWNORMAL);
end;
procedure TAboutBox.LinksBoxKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if (lo(Key) = 13) then ShellExecute(0,'open',PChar(Links[LinksBox.ItemIndex+1].URL),nil,nil,SW_SHOWNORMAL);
end;
procedure TAboutBox.LinksBoxChange(Sender: TObject);
begin
if (LinksBox.ItemIndex >=0)and(LinksBox.ItemIndex < nLinks) then
begin
{ LinksBox.Text := Links[LinksBox.ItemIndex+1].URL;}
DescMemo.Lines.Clear;
DescMemo.Lines.Add(Links[LinksBox.ItemIndex+1].Desc);
end;
end;
procedure TAboutBox.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Timer.Enabled := false;
DoneGraphics;
SetPriority;
ShowingAbout := false;
Action := caFree;
end;
procedure TAboutBox.OKButtonClick(Sender: TObject);
begin
Close;
end;
procedure TAboutBox.HomePageLinkLabelMouseEnter(Sender: TObject);
begin
HomePageLinkLabel.Font.Color := clRed;
end;
procedure TAboutBox.HomePageLinkLabelMouseLeave(Sender: TObject);
begin
HomePageLinkLabel.Font.Color := clBlue;
end;
procedure TAboutBox.PaintImageClick(Sender: TObject);
begin
ShellExecute(0,'open',NiKesHomePageAddr,nil,nil,SW_SHOWNORMAL);
end;
end.