-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVidClock.pas
More file actions
203 lines (184 loc) · 5.56 KB
/
VidClock.pas
File metadata and controls
203 lines (184 loc) · 5.56 KB
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
unit VidClock;
interface
uses
Windows, Forms, sysutils, xModule,
param, ExtCtrls, ComCtrls, StdCtrls, Controls, Classes;
type
TVclock = class(TForm)
GroupBox1: TGroupBox;
TrackBar1: TTrackBar;
TrackBar2: TTrackBar;
Label1: TLabel;
Label2: TLabel;
GroupBox2: TGroupBox;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
ProgressBar1: TProgressBar;
Timer1: TTimer;
Image1: TImage;
Button5: TButton;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure TrackBar1Change(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure TrackBar2Change(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure Button5Click(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Vclock: TVclock;
Tparam:shortstring='';
chan:boolean=false;
VideoClocker, Potential, ClockTemp:integer;
implementation
uses Main, SoftSel;
{$R *.dfm}
procedure TVclock.Button2Click(Sender: TObject);
begin
VideoTemp:=VideoTemp+ClockTemp;
Close;
end;
procedure TVclock.Button1Click(Sender: TObject);
begin
If MainForm.Label30.Caption<>'Íåò' then begin
MainForm.Timer1.Enabled:=false;
SoftSelect.Caption:='Âûáîð ïðîãðàìì äëÿ ðàçãîíà âèäåîêàðòû';
dataprm:='Video';
assignfile(data,dir+'\Data\Videosoft.dat');
SoftSelect.ShowModal;
end
else
Application.MessageBox('Äëÿ íà÷àëà íåîáõîäèìî óñòàíîâèòü îïåðàöèîííóþ ñèñòåìó íà êîìïüþòåð!','Ïîìîùü!',MB_ICONSTOP);
end;
procedure TVclock.TrackBar1Change(Sender: TObject);
begin
Button3.Enabled:=true;
Label1.Caption:='×àñòîòà ÿäðà - '+IntToStr(TrackBar1.Position)+' ÌÃö';
chan:=true;
end;
procedure TVclock.FormActivate(Sender: TObject);
begin
ClockTemp:=0;
If SecondVideoCard<>'' then
Label3.Caption:='Â ñèñòåìå óñòàíîâëåíî äâå âèäåîêàðòû.'
else
Label3.Caption:='Íàçâàíèå - '+MainForm.Label76.Caption;
Label4.Caption:=videochip;
Label5.Caption:='Îáúåì âèäåîïàìÿòè - '+IntToStr(videomemory)+' Ìá';
Label7.Caption:='ßäðî - '+IntToStr(ovideocore)+' ÌÃö';
Label8.Caption:='Ïàìÿòü - '+IntToStr(ovideomem)+' ÌÃö';
Trackbar1.Position:=videocore;
Trackbar2.Position:=videomem;
Label9.Caption:='Ïðîãðàììà äëÿ ðàçãîíà - '+MainForm.Label109.Caption;
If MAinform.label109.Caption<>'Íåò' then
Groupbox1.Enabled:=true
else
Groupbox1.Enabled:=false;
Label1.Caption:='×àñòîòà ÿäðà - '+IntToStr(TrackBar1.Position)+' ÌÃö';
Label2.Caption:='×àñòîòà ïàìÿòè - '+IntToStr(TrackBar2.Position)+' ÌÃö';
Potential:=(ovideocore+ovideomem)*videopercent div 100;
Button3.Enabled:=false;
end;
procedure TVclock.Button3Click(Sender: TObject);
begin
Tparam:='Test';
GroupBox1.Enabled:=false;
Timer1.Enabled:=true;
end;
procedure TVclock.Button4Click(Sender: TObject);
begin
Tparam:='Detect';
GroupBox1.Enabled:=false;
Timer1.Enabled:=true;
end;
procedure TVclock.Timer1Timer(Sender: TObject);
begin
If ProgressBar1.Position=1 then
MainForm.Timer1.Enabled:=false;
If progressbar1.position<100 then
progressbar1.Position:=progressbar1.Position+1
else
begin
If Tparam='Detect' then begin
TrackBar1.Position:=ovideocore+((ovideocore*(videopercent-random(5))) div 100);
TrackBar2.Position:=ovideomem+((ovideomem*(videopercent-random(5))) div 100);
TParam:='Test';
end;
If Tparam='Test' then begin
videocore:=TrackBar1.Position;
videomem:=TrackBar2.Position;
If ((videocore<>ovideocore) or (videomem<>ovideomem)) and (chan=true) then
videoclocker:=(ovideocore+ovideomem)+((ovideocore+ovideomem)*videopercent div 100)-(TrackBar1.Position+TrackBar2.Position)
else
videoclocker:=Potential;
If VideoClocker>=0 then begin
Button3.Enabled:=false;
If VideoClocker<>Potential then begin
VideoClock:=(Potential-videoclocker)*10;
ClockTemp:=VideoPercent;
end
else
begin
ClockTemp:=25;
VideoClock:=0;
end;
end
else
begin
ProgressBar1.Position:=0;
Timer1.Enabled:=false;
Application.MessageBox('Âèäåîêàðòà íå ìîæåò ðàáîòàòü íà òàêèõ ÷àñòîòàõ!','Ïîìîùü!',MB_ICONSTOP);
end;
end;
GroupBox1.Enabled:=true;
ProgressBar1.Position:=0;
Timer1.Enabled:=false;
end;
end;
procedure TVclock.TrackBar2Change(Sender: TObject);
begin
Button3.Enabled:=true;
Label2.Caption:='×àñòîòà ïàìÿòè - '+IntToStr(TrackBar2.Position)+' ÌÃö';
chan:=true;
end;
procedure TVclock.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
If Button3.Enabled=true then begin
Application.MessageBox('Íåëüçÿ ðàçãîíÿòü âèäåîêàðòó íå ïðîòåñòèðîâàâ ïðåäâàðèòåëüíî íàñòðîéêè!','Ïîìîùü!',MB_ICONSTOP);
Canclose:=false;
end
else
Canclose:=true;
end;
procedure TVclock.Button5Click(Sender: TObject);
begin
If not xDone then
xForm.ShowModal
else
Application.MessageBox('Âû óæå ìîäèôèöèðîâàëè ñâîþ âèäåîêàðòó îäíàæäû!','Ïîìîùü!',MB_ICONSTOP);
end;
procedure TVclock.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
If (key=VK_ESCAPE) then
Button2.OnClick(self);
end;
end.