Created
October 4, 2023 12:25
-
-
Save felipebastosweb/29d1b039cd9fba9d14665df9b5b6cce9 to your computer and use it in GitHub Desktop.
Delphi Open HomeForm after BiometryAuthentication
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// not open HomeForm | |
procedure TMainForm.ListBox1ItemClick(const Sender: TCustomListBox; | |
const Item: TListBoxItem); | |
if BiometricAuth1.IsSupported then begin | |
BiometricAuth1.Authenticate; | |
end; | |
end; | |
procedure TMainForm.BiometricAuth1AuthenticateSuccess(Sender: TObject); | |
begin | |
HomeForm.Show; | |
end; | |
// Unit.pas Global var BiometrySuccess := False; | |
// not open HomeForm | |
procedure TMainForm.ListBox1ItemClick(const Sender: TCustomListBox; | |
const Item: TListBoxItem); | |
if BiometricAuth1.IsSupported then begin | |
// change BiometrySuccess to True | |
BiometricAuth1.Authenticate; | |
if BiometrySuccess then begin | |
// Go to HomeForm fail | |
HomeForm.Show; | |
end; | |
end; | |
end; | |
procedure TMainForm.BiometricAuth1AuthenticateSuccess(Sender: TObject); | |
begin | |
BiometrySuccess := True; | |
//ShowMessage('Fingerprint verified with success.'); | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment