-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLoadOS.pas
84 lines (73 loc) · 2.19 KB
/
LoadOS.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
unit LoadOS;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, ComCtrls, jpeg, PartitionMagic, param, GifImage,
StdCtrls, Main;
type
TLoading = class(TForm)
Image1: TImage;
ProgressBar1: TProgressBar;
Image2: TImage;
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure CloseForm(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Loading: TLoading;
implementation
uses Soft;
{$R *.dfm}
procedure TLoading.Timer1Timer(Sender: TObject);
begin
If ProgressBar1.Position<100 then
ProgressBar1.Position:=ProgressBar1.Position+random(5)
else
begin
Timer1.Enabled:=false;
If ANSILOWERCASE(Parts[a,0].Soft.OSType)='win' then
Image2.Picture.LoadFromFile(dir+'\Logo\Windows.gif')
else
If ANSILOWERCASE(Parts[a,0].Soft.OSType)='lin' then
Image2.Picture.LoadFromFile(dir+'\Logo\Linux.gif')
else
If ANSILOWERCASE(Parts[a,0].Soft.OSType)='be' then
Image2.Picture.LoadFromFile(dir+'\Logo\BeOS.gif')
else
If ANSILOWERCASE(Parts[a,0].Soft.OSType)='bsd' then
Image2.Picture.LoadFromFile(dir+'\Logo\FreeBSD.gif')
else
If ANSILOWERCASE(Parts[a,0].Soft.OSType)='os/2' then
Image2.Picture.LoadFromFile(dir+'\Logo\OS2.gif')
else
If FileExists(dir+'\Logo\'+Parts[a,0].Soft.OSType+'.gif') then
Image2.Picture.LoadFromFile(dir+'\Logo\'+Parts[a,0].Soft.OSType+'.gif');
If Image2.Picture.Graphic is TGifImage then
(Image2.Picture.Graphic as TGifImage).OnEndPaint:=CloseForm
else
Close;
end;
ChangeOS(a);
Softw.Activate.Execute;
end;
procedure TLoading.FormActivate(Sender: TObject);
begin
Image2.Picture:=nil;
ProgressBar1.Position:=0;
If 70-(hardspeed+defragspeed+cpuspeed+htt+cpuclock+ramspeed) div 1000 < 0 then
Timer1.Interval:=1
else
Timer1.Interval:=70-(hardspeed+defragspeed+cpuspeed+htt+cpuclock+ramspeed) div 1000;
Timer1.Enabled:=true;
end;
procedure TLoading.CloseForm(Sender: TObject);
begin
sleep(1000);
Close;
end;
end.