| 30 |
|
|
| 31 |
|
{$R *.dfm} |
| 32 |
|
|
| 33 |
< |
uses ABSMain, ABSDecUtil, Main, Code_Functions, Data, |
| 34 |
< |
Code_OniImgClass, Code_DataStructures, Code_OniDataClass; |
| 33 |
> |
uses ABSMain, ABSDecUtil, Main, Functions, Data, |
| 34 |
> |
OniImgClass, DataStructures, OniDataClass; |
| 35 |
|
|
| 36 |
|
type |
| 37 |
|
THandler = procedure(fileid: LongWord; dir_dat2db: Boolean); |
| 77 |
|
datlinks: TDatLinks; |
| 78 |
|
OniImage: TOniImage; |
| 79 |
|
levelid: LongWord; |
| 80 |
+ |
timeformat: TFormatSettings; |
| 81 |
|
const |
| 82 |
|
steps: Byte = 3; |
| 83 |
|
|
| 100 |
|
// FILE EXISTS CHECK FÜR DAT/RAW/SEP!!! |
| 101 |
|
// |
| 102 |
|
|
| 103 |
+ |
timeformat.LongTimeFormat := 'hh:nn:ss'; |
| 104 |
+ |
timeformat.TimeSeparator := ':'; |
| 105 |
+ |
|
| 106 |
|
if not CreateDataConnection(Source, ODB_ADB) then |
| 107 |
|
begin |
| 108 |
|
ShowMessage('Could not connect to .oldb-file'); |
| 164 |
|
for j := 0 to 3 do |
| 165 |
|
temps[j + 1] := ExtensionsHeader[i].Extension[3 - j]; |
| 166 |
|
ExtensionsHeader[i].ExtCount := |
| 167 |
< |
Length(OniDataConnection.GetFilesList(temps, '', False)); |
| 167 |
> |
Length(OniDataConnection.GetFilesList(temps, '', False, stIDAsc)); |
| 168 |
|
progress.Position := i + 1; |
| 169 |
|
lbl_progress.Caption := 'Extensions done: ' + IntToStr(i + 1) + '/' + |
| 170 |
|
IntToStr(Length(extlist)); |
| 260 |
|
FilesHeader[i].FileSize := fileinfo.Size; |
| 261 |
|
FilesHeader[i].FileType := fileinfo.FileType; |
| 262 |
|
|
| 263 |
< |
if ((i mod 25) = 0) and (i >= 100) then |
| 264 |
< |
lbl_estimation.Caption := 'Estimated finishing time: ' + TimeToStr( |
| 265 |
< |
(Time - begintime) / i * progress.Max + begintime); |
| 263 |
> |
if ((i mod 10) = 0) and (i >= 100) then |
| 264 |
> |
lbl_estimation.Caption := 'Estimated time left: ' + TimeToStr( |
| 265 |
> |
(Time - begintime) / i * (progress.Max - i + 1) * 1.1 ); |
| 266 |
|
progress.Position := i + 1; |
| 267 |
|
lbl_progress.Caption := 'Files done: ' + IntToStr(i + 1) + '/' + IntToStr(progress.Max); |
| 268 |
|
Application.ProcessMessages; |
| 298 |
|
progress.Position := progress.Max; |
| 299 |
|
lbl_progress.Caption := 'Files done: ' + IntToStr(progress.Max) + '/' + |
| 300 |
|
IntToStr(progress.Max); |
| 301 |
< |
lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - absolutebegintime) + ')'; |
| 301 |
> |
lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - absolutebegintime, timeformat) + ')'; |
| 302 |
|
|
| 303 |
|
DoStep('FIN'); |
| 304 |
|
btn_abortok.Caption := '&OK'; |
| 342 |
|
rawlist: TRawList; |
| 343 |
|
extlist: TExtensionsMap; |
| 344 |
|
fileinfo: TFileInfo; |
| 345 |
+ |
timeformat: TFormatSettings; |
| 346 |
|
const |
| 347 |
|
steps: Byte = 4; |
| 348 |
|
|
| 530 |
|
Database.Commit(False); |
| 531 |
|
Database.StartTransaction; |
| 532 |
|
end; |
| 533 |
< |
if ((i mod 25) = 0) and (i >= 100) then |
| 534 |
< |
lbl_estimation.Caption := 'Estimated finishing time: ' + TimeToStr( |
| 535 |
< |
(Time - begintime) / i * progress.Max + begintime); |
| 533 |
> |
if ((i mod 10) = 0) and (i >= 100) then |
| 534 |
> |
lbl_estimation.Caption := 'Estimated time left: ' + TimeToStr( |
| 535 |
> |
(Time - begintime) / i * (progress.Max - i + 1) * 1.1 ); |
| 536 |
|
progress.Position := i; |
| 537 |
|
lbl_progress.Caption := 'Files done: ' + IntToStr(i) + '/' + IntToStr(progress.Max); |
| 538 |
|
Application.ProcessMessages; |
| 546 |
|
progress.Position := progress.Max; |
| 547 |
|
lbl_progress.Caption := 'Files done: ' + IntToStr(progress.Max) + '/' + |
| 548 |
|
IntToStr(progress.Max); |
| 549 |
< |
lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - absolutebegintime) + ')'; |
| 549 |
> |
|
| 550 |
> |
timeformat.LongTimeFormat := 'hh:nn:ss'; |
| 551 |
> |
timeformat.TimeSeparator := ':'; |
| 552 |
> |
lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - absolutebegintime, timeformat) + ')'; |
| 553 |
|
|
| 554 |
|
DoStep('FIN'); |
| 555 |
|
btn_abortok.Caption := '&OK'; |