-
Notifications
You must be signed in to change notification settings - Fork 31
/
OptBatch.pas
64 lines (51 loc) · 1.42 KB
/
OptBatch.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
unit OptBatch;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TOptimalBatch = class(TForm)
GroupBox1: TGroupBox;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
RadioButton4: TRadioButton;
RadioButton5: TRadioButton;
RadioButton6: TRadioButton;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure RadioButton1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
OptimalBatch: TOptimalBatch;
implementation
{$R *.dfm}
uses RubikMain;
procedure TOptimalBatch.Button1Click(Sender: TObject);
begin
Hide;
end;
procedure TOptimalBatch.RadioButton1Click(Sender: TObject);
begin
maxAutoRunThreads:= (Sender as TRadioButton).Tag;
iniFile.WriteInteger('Autorun','nThreads',maxAutoRunThreads);
end;
procedure TOptimalBatch.FormCreate(Sender: TObject);
begin
maxAutoRunThreads:=8;
maxAutoRunThreads:= iniFile.ReadInteger('Autorun','nThreads',maxAutoRunThreads);
case maxAutoRunThreads of
1: RadioButton1.Checked:=true;
2: RadioButton2.Checked:=true;
4: RadioButton3.Checked:=true;
8: RadioButton4.Checked:=true;
16: RadioButton5.Checked:=true;
32: RadioButton6.Checked:=true;
end;
end;
end.