Good morning,
I am the developer of a medium sized PDA application that will be used out on the streets. The PDA will contain some vaguely sensitive data (names and addresses, etc). The encryption on the mobile database is already handled, however if someone got hold of the PDA whilst it was logged in they could happily go through the data until the battery died or they closed the application and had to log in again.
When the users access the PDA application they need to enter their username and PIN number. Version 1 of this software had an event hooked into every button in the system so that when the button was pressed, it updated a variable called LastActionTime. A timer ran on the main form and if that LastActionTime was more than 10 minutes ago then the system would throw up the login form again until the previous user/admin logged back in again (just like the windows lockout screen).
This worked fine... in a sense... the problem with that is that it was only handling buttons and wasn't handling the other controls, like ListViews, PictureBoxes, etc.
Is there any good way of achieving this? For example, is there a way I could extend a Windows Form Class to handle every single event and update that variable accordingly? Or can I do something windows-esque that would handle every single mouse event on the form?
To be completely concise, what I want to achieve is that when the PDA screen/buttons have not been touched for 10 minutes, the PDA will know this and allow me to fire my lockout method.
Any thoughts, help and guidance would be much appreciated.
Edit: I am using Compact Framework 2.0 on Windows Mobile 6.0, however the function needs to work on Windows Mobile 5.0 and above.