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

#ifndef LogIn_FormH
#define LogIn_FormH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <ExtCtrls.hpp>
#include "TntButtons.hpp"
#include "TntExtCtrls.hpp"
#include "TntStdCtrls.hpp"
#include "TntForms.hpp"
//---------------------------------------------------------------------------
class TLogInForm : public TTntForm
{
__published:	// IDE-managed Components
	TTntPanel *RegistrationPanel;
	TTntEdit *IDEdit;
	TTntEdit *PWEdit1;
	TTntEdit *PWEdit2;
	TTntBitBtn *RegistBtn;
	TTntStaticText *StaticText3;
	TTntStaticText *StaticText4;
	TTntStaticText *StaticText5;
	TTntBitBtn *RegistCancelBtn;
	TTntPanel *ModifyPWPanel;
	TTntEdit *CurrentPWEdit;
	TTntEdit *NewPWEdit1;
	TTntEdit *NewPWEdit2;
	TTntBitBtn *ModifyBtn;
	TTntStaticText *StaticText6;
	TTntStaticText *StaticText7;
	TTntStaticText *StaticText8;
	TTntBitBtn *ModifyCancelBtn;
	TTntPanel *SelectIDPanel;
	TEdit *PWEdit;
	TTntStaticText *StaticText1;
	TTntStaticText *StaticText2;
	TTntBitBtn *LogInBtn;
	TEdit *UserNameEdit;
	TTntPanel *Panel1;
	void __fastcall LogInBtnClick(TObject *Sender);
	void __fastcall PWEditClick(TObject *Sender);
	void __fastcall UserNameEditClick(TObject *Sender);
	void __fastcall FormCreate(TObject *Sender);
	void __fastcall FormDestroy(TObject *Sender);
  void __fastcall TntFormShow(TObject *Sender);
  void __fastcall UserNameEditChange(TObject *Sender);
private:	// User declarations
	int CurrentUserWrongPWCount;
	AnsiString CurrentUserName;
        WideString LoginMsgList[4];
	void __fastcall WriteRecentLogOn(void);
	void __fastcall ReadRecentLogOn(void);
	void __fastcall CSV_WriteLogInAttemptCount(void);
	void __fastcall CSV_WriteUnpermittedUser(AnsiString userName);
public:		// User declarations
	__fastcall TLogInForm(TComponent* Owner);

  bool bRequestSystemIDLogIn;
};

//---------------------------------------------------------------------------
extern PACKAGE TLogInForm *LogInForm;
extern bool __fastcall CheckPassword(AnsiString ID, AnsiString password);
//---------------------------------------------------------------------------
#endif
