| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- //---------------------------------------------------------------------------
- #ifndef FrmLoginFH
- #define FrmLoginFH
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #include <Classes.hpp>
- #include <Controls.hpp>
- #include <StdCtrls.hpp>
- #include <Buttons.hpp>
- #include <ExtCtrls.hpp>
- #include <jpeg.hpp>
- #include <Graphics.hpp>
- #include <Menus.hpp>
- //---------------------------------------------------------------------------
- #include "ITSDbF.h"
- #include <ADODB.hpp>
- #include <DB.hpp>
- #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
|