procedure check_register
% -------------------
% Gets all the Input
% -------------------
new_user := GUI.GetText (name_field)
new_pass := GUI.GetText (password_field)
conf_pass := GUI.GetText (passwordconfirm_field)
new_email := GUI.GetText (emailid_field)
if length (new_user) not= 0 and length (new_email) not= 0 and length (conf_pass) not= 0 and length (new_pass) not= 0 then
if new_pass = conf_pass then
put "Registration is complete"
GUI.Disable(x_register)
else
put "Passwords dont match"
end if
else
put "Please fill all fields"
end if
end check_register
procedure register_fields
render.bg
var registerButton := GUI.CreateButton (x_register - 50, 200, 200, "Register", check_register)
name_field := GUI.CreateTextFieldFull (x_register, 400, 150, "",
NameEntered, GUI.INDENT, 0, 0)
emailid_field := GUI.CreateTextFieldFull (x_register, 370, 130, "",
emailEntered, GUI.INDENT, 0, 0)
password_field := GUI.CreateTextFieldFull (x_register, 340, 120, "",
passwordEntered, GUI.INDENT, 0, 0)
GUI.SetEchoChar (password_field, '*')
passwordconfirm_field := GUI.CreateTextFieldFull (x_register, 310, 120, "",
password2Entered, GUI.INDENT, 0, 0)
GUI.SetEchoChar (passwordconfirm_field, '*')
var nameLabel := GUI.CreateLabelFull (x_register - 50, 400, "User Name:", 0, 0,
GUI.RIGHT, 0)
var addressLabel := GUI.CreateLabelFull (x_register - 50, 370, "Email:", 0, 0,
GUI.RIGHT, font_register)
var passlabel := GUI.CreateLabelFull (x_register - 50, 340, "Password:", 0, 0,
GUI.RIGHT, font_register)
var pass2label := GUI.CreateLabelFull (x_register - 50, 310, " Confirm Password:", 0, 0,
GUI.RIGHT, font_register)
loop
exit when GUI.ProcessEvent
end loop
end register_fields
|