-
Notifications
You must be signed in to change notification settings - Fork 0
/
formLogo.pas
78 lines (62 loc) · 1.79 KB
/
formLogo.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
70
71
72
73
74
75
76
77
78
unit formLogo;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, RzLabel, dxGDIPlusClasses,
Vcl.ExtCtrls, cxGraphics, cxControls, cxLookAndFeels, cxLookAndFeelPainters,
cxContainer, cxEdit, cxProgressBar, IdComponent, Vcl.XPMan;
type
TfrmLogo = class(TForm)
img1: TImage;
Info: TRzLabel;
Shape1: TShape;
ProgressBar: TcxProgressBar;
XPManifest1: TXPManifest;
private
procedure SetInfo(AValue: string);
function GetInfo: string;
public
property InfoText: string read GetInfo write SetInfo;
procedure RefreshForm;
procedure HTTPWork(ASender: TObject; AWorkMode: TWorkMode; AWorkCount: Int64);
procedure HTTPWorkBegin(ASender: TObject; AWorkMode: TWorkMode; AWorkCountMax: Int64);
procedure HTTPWorkEnd(ASender: TObject; AWorkMode: TWorkMode);
end;
var
frmLogo: TfrmLogo;
implementation
{$R *.dfm}
{ TfrmLogo }
function TfrmLogo.GetInfo: string;
begin
Result := Info.Caption;
end;
procedure TfrmLogo.RefreshForm;
begin
BringWindowToTop(self.Handle);
self.Repaint;
end;
procedure TfrmLogo.SetInfo(AValue: string);
begin
Self.info.Caption := AValue;
Info.Alignment := taCenter;
RefreshForm;
end;
procedure TfrmLogo.HTTPWork(ASender: TObject; AWorkMode: TWorkMode;
AWorkCount: Int64);
begin
self.ProgressBar.Position := AWorkCount;
self.RefreshForm;
end;
procedure TfrmLogo.HTTPWorkBegin(ASender: TObject; AWorkMode: TWorkMode;
AWorkCountMax: Int64);
begin
Self.Info.Caption := 'Çàãðóçêà íîâîé âåðñèè';
Self.ProgressBar.Properties.Max:= AWorkCountMax;
end;
procedure TfrmLogo.HTTPWorkEnd(ASender: TObject; AWorkMode: TWorkMode);
begin
Self.ProgressBar.Visible := False;
InfoText := 'Çàãðóçêà çàâåðøåíà';
end;
end.