ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/oup/releases/0.33a/Helper_LevelDB.pas
(Generate patch)

Comparing oup/current/Helper_LevelDB.pas (file contents):
Revision 46 by alloc, Sat Dec 23 16:26:43 2006 UTC vs.
Revision 58 by alloc, Tue Dec 26 23:37:24 2006 UTC

# Line 77 | Line 77 | var
77    datlinks: TDatLinks;
78    OniImage: TOniImage;
79    levelid:  LongWord;
80 +  timeformat: TFormatSettings;
81   const
82    steps: Byte = 3;
83  
# Line 99 | Line 100 | begin
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');
# Line 256 | Line 260 | begin
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;
# Line 294 | Line 298 | begin
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';
# Line 338 | Line 342 | var
342    rawlist:  TRawList;
343    extlist:  TExtensionsMap;
344    fileinfo: TFileInfo;
345 +  timeformat: TFormatSettings;
346   const
347    steps: Byte = 4;
348  
# Line 525 | Line 530 | begin
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;
# Line 541 | Line 546 | begin
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';

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)