FrmDbPrgressF.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //---------------------------------------------------------------------------
  2. #ifndef FrmDbPrgressFH
  3. #define FrmDbPrgressFH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <ADODB.hpp>
  10. #include <DB.hpp>
  11. #include <ExtCtrls.hpp>
  12. #include "cxContainer.hpp"
  13. #include "cxControls.hpp"
  14. #include "cxEdit.hpp"
  15. #include "cxGraphics.hpp"
  16. #include "cxLookAndFeelPainters.hpp"
  17. #include "cxLookAndFeels.hpp"
  18. #include "cxProgressBar.hpp"
  19. #include "dxSkinBlack.hpp"
  20. #include "dxSkinBlue.hpp"
  21. #include "dxSkinsCore.hpp"
  22. //---------------------------------------------------------------------------
  23. class TDBThread : public TThread
  24. {
  25. private:
  26. TADOQuery *m_ADOQry;
  27. protected:
  28. TForm *FParentForm;
  29. void __fastcall Execute();
  30. public:
  31. __fastcall TDBThread();
  32. void __fastcall SetQry(TADOQuery *adoQry, TForm *AForm);
  33. };
  34. class TFrmDbProgress : public TForm
  35. {
  36. __published: // IDE-managed Components
  37. TButton *btnCancel;
  38. TcxProgressBar *PbProgress;
  39. TTimer *TmrProgress;
  40. TLabel *Label1;
  41. TEdit *Edit1;
  42. void __fastcall FormShow(TObject *Sender);
  43. void __fastcall btnCancelClick(TObject *Sender);
  44. void __fastcall TmrProgressTimer(TObject *Sender);
  45. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  46. private: // User declarations
  47. TForm *FParentForm;
  48. public: // User declarations
  49. __fastcall TFrmDbProgress(TComponent* Owner);
  50. TDBThread *m_pThrDb;
  51. void __fastcall Init(String sCaption, int nMax, bool bCancel=false, bool bTimer=false);
  52. void __fastcall Step(String sText, int nPos);
  53. void __fastcall SetQry(TADOQuery *adoQry);
  54. void __fastcall TermThread();
  55. };
  56. //---------------------------------------------------------------------------
  57. //extern PACKAGE TFrmDbProgress *FrmDbProgress;
  58. //---------------------------------------------------------------------------
  59. #endif