From 83feefce163dfed8ee8ff18e2c3410f67a48f200 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 21 Feb 2008 19:21:08 +0000 Subject: [PATCH] =?UTF-8?q?Pantalla=20de=20login:=20desactivar=20el=20logi?= =?UTF-8?q?n=20autom=C3=A1tico=20cuando=20el=20usuario=20escribe=20algo.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@130 f4e31baf-9722-1c47-927c-6f952f962d4b --- Source/ApplicationBase/Usuarios/Views/uEditorLogin.dfm | 2 ++ Source/ApplicationBase/Usuarios/Views/uEditorLogin.pas | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Source/ApplicationBase/Usuarios/Views/uEditorLogin.dfm b/Source/ApplicationBase/Usuarios/Views/uEditorLogin.dfm index d0bd09c2..74b79e37 100644 --- a/Source/ApplicationBase/Usuarios/Views/uEditorLogin.dfm +++ b/Source/ApplicationBase/Usuarios/Views/uEditorLogin.dfm @@ -1029,6 +1029,7 @@ object fEditorLogin: TfEditorLogin Height = 21 PasswordChar = '*' TabOrder = 2 + OnKeyPress = edtUserKeyPress end object bAceptar: TButton Left = 208 @@ -1056,6 +1057,7 @@ object fEditorLogin: TfEditorLogin Width = 278 Height = 21 TabOrder = 1 + OnKeyPress = edtUserKeyPress end object Button1: TButton Left = 16 diff --git a/Source/ApplicationBase/Usuarios/Views/uEditorLogin.pas b/Source/ApplicationBase/Usuarios/Views/uEditorLogin.pas index d274eee1..0560eacc 100644 --- a/Source/ApplicationBase/Usuarios/Views/uEditorLogin.pas +++ b/Source/ApplicationBase/Usuarios/Views/uEditorLogin.pas @@ -32,6 +32,7 @@ type procedure Timer1Timer(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); + procedure edtUserKeyPress(Sender: TObject; var Key: Char); private FController : IUsuariosController; FIntentos : Integer; @@ -93,9 +94,15 @@ begin Timer1.Enabled := True; end; +procedure TfEditorLogin.edtUserKeyPress(Sender: TObject; var Key: Char); +begin + // Desactivar el timer si el usuario escribe algo + Timer1.Enabled := False; +end; + procedure TfEditorLogin.FormCreate(Sender: TObject); begin - FIntentos := 0; + FIntentos := 0; end; procedure TfEditorLogin.FormDestroy(Sender: TObject);