import GUI
var loginwin := Window.Open ("title:iHEALTH Login,position:top;center,graphics:225;200")
var FontID : int := Font.New ("Arial:13:italic,Bold,underline")
var FontID1 : int := Font.New ("Arial:11:italic")
var userTextField, passwordTextField : int
var user1 : string
var pass1 : string
forward procedure medhis
forward procedure journal
forward procedure med
forward procedure dcontact
forward procedure resources
%Login Menu
procedure UsernameEntered (text : string)
end UsernameEntered
procedure PasswordEntered (text : string)
end PasswordEntered
GUI.SetBackgroundColor (white)
var LoginButton := GUI.CreateButton (75, 25, 10, "Login", GUI.Quit)
GUI.SetColor (LoginButton, white)
userTextField := GUI.CreateTextFieldFull (100, 90, 100, "", UsernameEntered, GUI.INDENT, 0, 0)
passwordTextField := GUI.CreateTextFieldFull (100, 60, 100, "", PasswordEntered, GUI.INDENT, 0, 0)
GUI.SetEchoChar (passwordTextField, '*')
var nameLabel := GUI.CreateLabelFull (75, 90, "Username:", 0, 0, GUI.RIGHT, 0)
var addressLabel := GUI.CreateLabelFull (75, 60, "Password:", 0, 0, GUI.RIGHT, 0)
Pic.ScreenLoad ("C:/iHEALTH/iHEALTH.bmp", 0, 110, picCopy)
Font.Draw ("Please Login..", 60, 120, FontID1, black)
loop
exit when GUI.ProcessEvent
end loop
colorback (white)
user1 := GUI.GetText (userTextField)
pass1 := GUI.GetText (passwordTextField)
if user1 = "Admin" and pass1 = "forefront"
or user1 = "Peter" and pass1 = "Reid"
or user1 = "Chris" and pass1 = "Reid"
or user1 = "Guest" and pass1 = ""
then
GUI.Dispose (LoginButton)
locate (11, 7)
put "Welcome " + user1
delay (1000)
else
GUI.Dispose (LoginButton)
locate (11, 7)
put "Incorrect Login"
delay (99999999)
end if
var winID := Window.Open ("title:iHEALTH,position:top;center,graphics:800;300")
Window.Hide (loginwin)
var medhisb := GUI.CreateButton (140, 240, 0, "Medical History", medhis)
GUI.SetColor (medhisb, white)
var journalb := GUI.CreateButton (260, 240, 0, "My Journal", journal)
GUI.SetColor (journalb, white)
var medb := GUI.CreateButton (360, 240, 0, "My Medications", med)
GUI.SetColor (medb, white)
var dcontactsb := GUI.CreateButton (480, 240, 0, "My Doctors", dcontact)
GUI.SetColor (dcontactsb, white)
var resourcesb := GUI.CreateButton (580, 240, 0, "Resources", resources)
GUI.SetColor (resourcesb, white)
loop
exit when GUI.ProcessEvent
end loop
body procedure medhis
put "hey"
end medhis
body procedure journal
put "hey"
end journal
body procedure med
put "hey"
end med
body procedure dcontact
put "hey"
end dcontact
body procedure resources
put "hey"
end resources
|