-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathUploadStatus.pas
More file actions
43 lines (32 loc) · 952 Bytes
/
Copy pathUploadStatus.pas
File metadata and controls
43 lines (32 loc) · 952 Bytes
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
unit UploadStatus;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Base, Vcl.ExtCtrls, Vcl.StdCtrls, Misc;
type
TfrmUploadStatus = class(TfrmBase)
lstLog: TListBox;
private
{ Private declarations }
public
{ Public declarations }
Section, LastMessage: String;
procedure AddStatusToLog(Status: String);
end;
implementation
{$R *.dfm}
procedure TfrmUploadStatus.AddStatusToLog(Status: String);
begin
if (Status <> '') and (Status <> LastMessage) then begin
LastMessage := Status;
with lstLog do begin
if Items.Count > 30 then begin
Items.Delete(30);
end;
Items.Insert(0, FormatDateTime('hh:nn:ss', Now) + ' - ' + Status);
ItemIndex := 0;
WriteToLogFile('UPLOADS', Section, Status);
end;
end;
end;
end.