-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPrgDlg.pas
69 lines (58 loc) · 1.31 KB
/
PrgDlg.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
unit PrgDlg;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Gauges, StdCtrls, ExtCtrls;
type
TFPrgDlg = class(TForm)
GaugeCurr: TGauge;
GaugeTotal: TGauge;
Label1: TLabel;
Label2: TLabel;
Timer1: TTimer;
btnPause: TButton;
btnCancel: TButton;
// function PrgParams(Copied, Size: Integer): Boolean; overload;
procedure Timer1Timer(Sender: TObject);
procedure btnPauseClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FPrgDlg: TFPrgDlg;
implementation
var PCopied, PSize, PTotal: Integer;
{$R *.dfm}
{function PrgParams(Copied, Size: Int64): Boolean;
begin
try
PCopied:= Copied;
PSize := Size;
Result := True;
except
Result := False;
end;
end;}
procedure TFPrgDlg.Timer1Timer(Sender: TObject);
var i:Int64;
begin
Timer1.Enabled := False;
Timer1.Interval := 250;
i := i + 1;
Timer1.Enabled := True;
end;
procedure TFPrgDlg.btnPauseClick(Sender: TObject);
begin
with btnPause do begin
if btnPause.Caption = 'Pause' then begin
btnPause.Caption := 'Continue';
// TCpThread.Suspend;
end
else
btnPause.Caption := 'Pause';
// TCpThread.Resume;
end;
end;
end.