//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "f_Main.h"
#include "f_Register.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TfRegister *fRegister;
//---------------------------------------------------------------------------
__fastcall TfRegister::TfRegister(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TfRegister::btnRegisterClick(TObject *Sender)
{
	if(leLogin->Text == ""){
		ShowMessage("Введите логин");
		return;
	}

	if(lePass->Text == ""){
		ShowMessage("Введите пароль");
		return;
	}

	if(lePass->Text != lePassConfirm->Text){
		ShowMessage("Проверьте правильность введённого пароля");
		return;
	}

	fMain->leLogin->Text = leLogin->Text;
	fMain->lePass->Text = lePass->Text;

	fMain->cbRememberPass->Checked = cbRememberPass->Checked;
	fRegister->Close();
}
//---------------------------------------------------------------------------
