Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Aybek_Dzhumadillayev_diplomEN.docx
Скачиваний:
20
Добавлен:
25.02.2016
Размер:
630.99 Кб
Скачать

3.2.2 Register.Java[11]

This class is used for registering a user. Registration is very simple, it has only the login, password and for checking re-password. It has 3 textboxess and 1 button for submission.

Description of the functions and variables of the class Register.java

protected void onCreate (Bundle savedInstanceState) - it is a function of the main interface for querying

public void onClick (View v) - this function starts when you press the button, and if the entered information is correct, sends the information to the database and logs the user

public void onPreExecute () - this function creates a PDialog and shows until the program receives data from the Base

protected String doInBackground (String. .. args) - main function is to register

protected void onPostExecute (String file_url) - sends data to the interface

Table 3 – variables of class Register.java

Name

Type

Description

jsonParser

JSONParser

To send information to the base

Submit

Button

If the information entered is correct, sends the information to the database and logs the user

ePass

String

Variable for storing passwords

rePass

String

Variable for storing the password again

eError

String

Display errors on this variable if you want to

Ko

Boolean

To check the stored contacts

Yo

TextView

Text if you have successfully logged

url

String

URL php script

Success

Int

For validation

PDialog

ProgressDialog

Animation boot

Login

String

user

3.2.3 Login.java[11]

This class is used for user login. To log in a user must write only two parameters: login and password. If these parameters are true, the user enters the main page.

3.2.2.1 Description of the functions and variables of the class Register.java

protected void onCreate (Bundle savedInstanceState) - is a function of the main interface for querying

public void onClick (View v) - this function starts when you press the button, and if the information is correct, it sends the information to the database and logs the user in.

public void onPreExecute () - this function creates a PDialog and shows until the program receives data from the Base

protected String doInBackground (String. .. args) - main function is to register

protected void onPostExecute (String file_url) - sends data to the interface

Table 4 – variables of class Login.java

Name

Type

Description

jsonParser

JSONParser

To send information to the base

Submit

Button

If the information entered is correct, sends the information to the database and logs the user

ePass

String

Variable for storing passwords

rePass

String

Variable for storing the password again

eError

String

Display errors on this variable if you want to

Ok

Boolean

To verify the correct password

Ko

Boolean

To check the stored contacts

Yo

TextView

Text if you have successfully logged

url

String

URL php script

Success

Int

For validation

PDialog

ProgressDialog

Animation boot

Continue of Table 4 – variables of class Login.java

Login

String

user

login

String

for login

password

String

For password

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]