123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- //---------------------------------------------------------------------------
- #ifndef FrmDbPrgressFH
- #define FrmDbPrgressFH
- //---------------------------------------------------------------------------
- #include <Classes.hpp>
- #include <Controls.hpp>
- #include <StdCtrls.hpp>
- #include <Forms.hpp>
- #include <ADODB.hpp>
- #include <DB.hpp>
- #include <ExtCtrls.hpp>
- #include "cxContainer.hpp"
- #include "cxControls.hpp"
- #include "cxEdit.hpp"
- #include "cxGraphics.hpp"
- #include "cxLookAndFeelPainters.hpp"
- #include "cxLookAndFeels.hpp"
- #include "cxProgressBar.hpp"
- #include "dxSkinBlack.hpp"
- #include "dxSkinBlue.hpp"
- #include "dxSkinsCore.hpp"
- //---------------------------------------------------------------------------
- class TDBThread : public TThread
- {
- private:
- TADOQuery *m_ADOQry;
- protected:
- TForm *FParentForm;
- void __fastcall Execute();
- public:
- __fastcall TDBThread();
- void __fastcall SetQry(TADOQuery *adoQry, TForm *AForm);
- };
- class TFrmDbProgress : public TForm
- {
- __published: // IDE-managed Components
- TButton *btnCancel;
- TcxProgressBar *PbProgress;
- TTimer *TmrProgress;
- TLabel *Label1;
- TEdit *Edit1;
- void __fastcall FormShow(TObject *Sender);
- void __fastcall btnCancelClick(TObject *Sender);
- void __fastcall TmrProgressTimer(TObject *Sender);
- void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
- private: // User declarations
- TForm *FParentForm;
- public: // User declarations
- __fastcall TFrmDbProgress(TComponent* Owner);
- TDBThread *m_pThrDb;
- void __fastcall Init(String sCaption, int nMax, bool bCancel=false, bool bTimer=false);
- void __fastcall Step(String sText, int nPos);
- void __fastcall SetQry(TADOQuery *adoQry);
- void __fastcall TermThread();
- };
- //---------------------------------------------------------------------------
- //extern PACKAGE TFrmDbProgress *FrmDbProgress;
- //---------------------------------------------------------------------------
- #endif
|