-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathuprogress.pas
62 lines (46 loc) · 1.2 KB
/
uprogress.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
unit uProgress;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
ComCtrls, ExtCtrls;
type
{ TfrmProgress }
TfrmProgress = class(TForm)
btnCloseProgressWindow: TButton;
GroupBox1: TGroupBox;
lblPercent: TLabel;
lblResult: TLabel;
lblStatus: TLabel;
lblTotalBytesSource: TLabel;
lblTotalBytesRead: TLabel;
ProgressBar1: TProgressBar;
procedure btnCloseProgressWindowClick(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
frmProgress: TfrmProgress;
implementation
uses
uYaffi;
{$R *.lfm}
{ TfrmProgress }
procedure TfrmProgress.FormCloseQuery(Sender: TObject; var CanClose: boolean);
begin
lblStatus.Caption:= 'Aborting...';
frmYaffi.Stop:= true;
end;
procedure TfrmProgress.FormCreate(Sender: TObject);
begin
btnCloseProgressWindow.Enabled:=false;
end;
procedure TfrmProgress.btnCloseProgressWindowClick(Sender: TObject);
begin
frmProgress.Visible := false;
end;
end.