PDA

View Full Version : Show User on Touch


Dave Byron
13 Jul 05, 10:16 AM
He is a bit of code to show the user on a color touch screen.
dave



Variables

{Enter Variable definitions here}

lastuser : integer;
Procedures

Functions

{ Get the user level }
function WhoamI : integer;
begin
whoami := getaccesslevel;
end;
Initialisation

{Enter Initialisation code here}
{ Set to 99 so will start the first time }
lastuser := 99;

Module "UserText"

{ See if user changed ? }
if whoami <> lastuser then
begin
{ Set font size and position on screen }
setfontsize (11);
setfontstyle(0);textpos(500,460);
{ Which user }
Case whoami of
0: drawtext('Anyone');
1: drawtext('Guest');
2: drawtext('Cleaner');
3: drawtext('Owner');
4: drawtext('Supervisor');
5: drawtext('Admin');
end;
{ Set lastuser to current user }
lastuser:= whoami;
end;

[IL]NewGen
20 Jul 05, 04:32 PM
does this display on screen via simualtion mode ? :o

Dave Byron
20 Jul 05, 07:44 PM
sure does - need so i can tell who the user is logged in as this effects what they can do on the touch.

dave