Em um botão: CheckUserIdentity("DIGITAL",Authentication)
Em uma procedure: PROCEDURE Authentication(nStatus is int, sErrorMessage is string) SWITCH nStatus CASE cuiAuthenticated ToastDisplay("Autenticação OK",toastShort,vaMiddle,haCenter,RGB(255,0,0)) Open(WIN_Menu) CASE cuiAuthenticationFailure Error("Falha na autenticação: " + sErrorMessage) CASE cuiAuthenticationUnavailable Error("Autenticação nao é possivel nesse celular") CASE cuiCustomAuthentication pwd is string // Comments typed by the user in a multiline control SWITCH Input("Entre com a senha: ", pwd) // OK CASE 1: IF pwd = 123 Open(WIN_Menu) ELSE Info("Senha incorreta!") END // Cancel CASE 0: Info("Senha incorreta!") END END
|