View Single Post
  #18  
Old 14-01-2023, 08:08
Carldric Clement's Avatar
Carldric Clement Carldric Clement is offline
Registered User
 
Join Date: Aug 2014
Location: Toboh, Sabah, Malaysia
Posts: 596
Thanks: 599
Thanked 659 Times in 234 Posts
Carldric Clement is on a distinguished road
Nothing happen to see the Memo and also the Label which is quite on progressing hash generated on Delphi FMX. But the result works fine.

Generate with the directory
Code:
function GenerateHashMultiCallback(FileName: WideString; FileSize: extended;
  FileProgress, TotalProgress, TotalFiles, FileCounted,
  StatusCode: Integer): Boolean;
begin
  Form5.Label9.Text := Format(XH_FILENAME, [ExtractFileName(FileName)]);
  Form5.Label10.Text := Format(XH_FILEPOSITION, [ByteOrTb((FileSize * FileProgress) / 100), ByteOrTb(FileSize)]);
  Form5.Label11.Text := Format(XH_PERCENTAGE, [FileProgress]);

  Form5.Label12.Text := Format(XH_PERCENTAGE, [TotalProgress]);
  Form5.ProgressBar1.Value := TotalProgress;

  case StatusCode of
    H_FILE_HASHING_DONE:
      Form5.Memo1.Lines.Add(FileName + '  ... Done!');

    -1,-4,-5,-6,-7,-8,-9,-10,-12,-13:
      Form5.Memo1.Lines.Add('>>> Error code:  ' + IntToStr(StatusCode));
  end;

  Form5.Label14.Text := Format(XH_GENERATESTATUS, [FileCounted, TotalFiles]);

  ProcessMessages;
  Result := CancelAll;
end;
Attached Images
File Type: jpg Screenshot 2023-01-15 000449.jpg (67.1 KB, 181 views)
File Type: jpg Screenshot 2023-01-15 000719.jpg (73.2 KB, 179 views)
File Type: jpg Screenshot 2023-01-15 000734.jpg (76.6 KB, 178 views)
File Type: jpg Screenshot 2023-01-15 001013.jpg (65.7 KB, 178 views)

Last edited by Carldric Clement; 14-01-2023 at 08:11.
Reply With Quote