Fix flicker in update checker dialog while downloading a build file.

This commit is contained in:
Ansgar Becker
2009-12-10 18:55:01 +00:00
parent 1f1e771fa6
commit 8d5111cf8a

View File

@@ -30,6 +30,7 @@ type
{ Private declarations }
CheckfileDownload : TDownLoadURL2;
ReleaseURL, BuildURL : String;
FLastStatusUpdate: Cardinal;
procedure Status(txt: String);
procedure ReadCheckFile;
procedure URLOnDownloadProgress(Sender: TDownLoadURL; Progress, ProgressMax: Cardinal;
@@ -84,7 +85,7 @@ end;
procedure TfrmUpdateCheck.Status(txt: String);
begin
lblStatus.Caption := txt;
Repaint;
lblStatus.Repaint;
end;
@@ -302,7 +303,10 @@ end;
}
procedure TfrmUpdateCheck.URLOnDownloadProgress;
begin
if FLastStatusUpdate > GetTickCount-200 then
Exit;
Status('Downloading: '+FormatByteNumber(Progress)+' / '+FormatByteNumber(BuildSize) + ' ...');
FLastStatusUpdate := GetTickCount;
end;