-
Notifications
You must be signed in to change notification settings - Fork 20
/
IdcSplitSize.pas
57 lines (44 loc) · 1.15 KB
/
IdcSplitSize.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
unit IdcSplitSize;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls, ExtCtrls;
type
TFIdcSplitSize = class(TForm)
OKbtn:TButton;
CancelBtn:TButton;
Bevel1:TBevel;
tbSplitSize:TTrackBar;
Procedure OKBtnClick(Sender:TObject);
procedure CancelBtnClick(Sender:TObject);
procedure FormShow(Sender: TObject);
procedure tbSplitSizeChange(Sender:TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FIdcSplitSize: TFIdcSplitSize;
implementation
{$R *.dfm}
uses Main;
Procedure TFIdcSplitSize.OKBtnClick (Sender:TObject);
Begin
SplitSize := (1 SHL (tbSplitSize.Position + 19)); //MBytes
ModalResult := mrOk;
end;
Procedure TFIdcSplitSize.CancelBtnClick (Sender:TObject);
Begin
SplitSize:=0;
ModalResult:=mrCancel;
end;
procedure TFIdcSplitSize.FormShow(Sender: TObject);
begin
Caption:='Split size: 1 Mbyte';
end;
Procedure TFIdcSplitSize.tbSplitSizeChange (Sender:TObject);
Begin
Caption:='Split size: '+IntToStr(tbSplitSize.position)+' MByte';
end;
end.