//--------------------------------------------------------------------------- #ifndef FrmLoginFH #define FrmLoginFH //--------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include //--------------------------------------------------------------------------- #include "ITSDbF.h" #include #include #include "cxButtons.hpp" #include "cxContainer.hpp" #include "cxControls.hpp" #include "cxEdit.hpp" #include "cxGraphics.hpp" #include "cxLabel.hpp" #include "cxLookAndFeelPainters.hpp" #include "cxLookAndFeels.hpp" #include "dxSkinBlack.hpp" #include "dxSkinBlue.hpp" #include "dxSkinsCore.hpp" #include "dxGDIPlusClasses.hpp" #include "dxSkinMcSkin.hpp" //--------------------------------------------------------------------------- #define USER_LOGIN_TRY_CNT 3 typedef enum { LOGIN_OK = 0, LOGIN_ID_ERR, LOGIN_PSWD_ERR, LOGIN_DB_ERR, } EN_LOGIN; //--------------------------------------------------------------------------- class TFRMLogin : public TForm { __published: // IDE-managed Components TPanel *Panel1; TCheckBox *ChkIdSave; TImage *Image1; TcxButton *BtnLogin; TcxButton *BtnPswdChnge; TcxButton *BtnClose; TcxLabel *LbMessage; TLabel *Label1; TLabel *Label2; TEdit *EdUserID; TEdit *EdPswd; TLabel *Label3; void __fastcall BtnCloseClick(TObject *Sender); void __fastcall BtnPswdChngeClick(TObject *Sender); void __fastcall BtnLoginClick(TObject *Sender); void __fastcall FormShow(TObject *Sender); void __fastcall EdUserIDKeyPress(TObject *Sender, char &Key); void __fastcall EdPswdKeyPress(TObject *Sender, char &Key); void __fastcall FormCreate(TObject *Sender); void __fastcall Image1MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y); void __fastcall FormClose(TObject *Sender, TCloseAction &Action); private: // User declarations public: // User declarations __fastcall TFRMLogin(TComponent* Owner); void __fastcall SetLocalSkin(); int __fastcall GetUserPassword(String sUserID, String sPswd); String __fastcall GetLocalIp(); String __fastcall GetPassword(String APswd); int m_nLoginTryCnt; String m_sUserName; String m_sUserID; String m_sUserRightID; String m_sUserRightName; String m_sLoginTime; bool m_bLogin; }; //--------------------------------------------------------------------------- extern PACKAGE TFRMLogin *FRMLogin; //--------------------------------------------------------------------------- #endif