--- oup/current/Helper_LevelDB.pas 2006/12/23 16:26:43 46 +++ oup/releases/0.33a/Helper_LevelDB.pas 2007/01/11 23:38:49 76 @@ -77,6 +77,7 @@ var datlinks: TDatLinks; OniImage: TOniImage; levelid: LongWord; + timeformat: TFormatSettings; const steps: Byte = 3; @@ -99,6 +100,9 @@ begin // FILE EXISTS CHECK FÜR DAT/RAW/SEP!!! // + timeformat.LongTimeFormat := 'hh:nn:ss'; + timeformat.TimeSeparator := ':'; + if not CreateDataConnection(Source, ODB_ADB) then begin ShowMessage('Could not connect to .oldb-file'); @@ -256,9 +260,9 @@ begin FilesHeader[i].FileSize := fileinfo.Size; FilesHeader[i].FileType := fileinfo.FileType; - if ((i mod 25) = 0) and (i >= 100) then - lbl_estimation.Caption := 'Estimated finishing time: ' + TimeToStr( - (Time - begintime) / i * progress.Max + begintime); + if ((i mod 10) = 0) and (i >= 100) then + lbl_estimation.Caption := 'Estimated time left: ' + TimeToStr( + (Time - begintime) / i * (progress.Max - i + 1) * 1.1 ); progress.Position := i + 1; lbl_progress.Caption := 'Files done: ' + IntToStr(i + 1) + '/' + IntToStr(progress.Max); Application.ProcessMessages; @@ -294,7 +298,7 @@ begin progress.Position := progress.Max; lbl_progress.Caption := 'Files done: ' + IntToStr(progress.Max) + '/' + IntToStr(progress.Max); - lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - absolutebegintime) + ')'; + lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - absolutebegintime, timeformat) + ')'; DoStep('FIN'); btn_abortok.Caption := '&OK'; @@ -338,6 +342,7 @@ var rawlist: TRawList; extlist: TExtensionsMap; fileinfo: TFileInfo; + timeformat: TFormatSettings; const steps: Byte = 4; @@ -525,9 +530,9 @@ begin Database.Commit(False); Database.StartTransaction; end; - if ((i mod 25) = 0) and (i >= 100) then - lbl_estimation.Caption := 'Estimated finishing time: ' + TimeToStr( - (Time - begintime) / i * progress.Max + begintime); + if ((i mod 10) = 0) and (i >= 100) then + lbl_estimation.Caption := 'Estimated time left: ' + TimeToStr( + (Time - begintime) / i * (progress.Max - i + 1) * 1.1 ); progress.Position := i; lbl_progress.Caption := 'Files done: ' + IntToStr(i) + '/' + IntToStr(progress.Max); Application.ProcessMessages; @@ -541,7 +546,10 @@ begin progress.Position := progress.Max; lbl_progress.Caption := 'Files done: ' + IntToStr(progress.Max) + '/' + IntToStr(progress.Max); - lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - absolutebegintime) + ')'; + + timeformat.LongTimeFormat := 'hh:nn:ss'; + timeformat.TimeSeparator := ':'; + lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - absolutebegintime, timeformat) + ')'; DoStep('FIN'); btn_abortok.Caption := '&OK';