SynchronizeProgress.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //---------------------------------------------------------------------------
  2. #ifndef SynchronizeProgressH
  3. #define SynchronizeProgressH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include "PathLabel.hpp"
  10. #include <ExtCtrls.hpp>
  11. //---------------------------------------------------------------------------
  12. class TSynchronizeProgressForm : public TForm
  13. {
  14. __published:
  15. TLabel *Label1;
  16. TLabel *Label2;
  17. TPathLabel *RemoteDirectoryLabel;
  18. TPathLabel *LocalDirectoryLabel;
  19. TLabel *StartTimeLabel;
  20. TLabel *Label4;
  21. TLabel *Label3;
  22. TLabel *TimeElapsedLabel;
  23. TButton *CancelButton;
  24. TTimer *UpdateTimer;
  25. void __fastcall CancelButtonClick(TObject *Sender);
  26. void __fastcall UpdateTimerTimer(TObject *Sender);
  27. public:
  28. __fastcall TSynchronizeProgressForm(TComponent* Owner);
  29. virtual __fastcall ~TSynchronizeProgressForm();
  30. void __fastcall Start();
  31. void __fastcall Stop();
  32. void __fastcall SetData(const AnsiString LocalDirectory,
  33. const AnsiString RemoteDirectory, bool & Continue);
  34. private:
  35. TDateTime FStartTime;
  36. TDateTime FElapsed;
  37. bool FStarted;
  38. bool FCanceled;
  39. void * FShowAsModalStorage;
  40. void __fastcall UpdateControls();
  41. };
  42. //---------------------------------------------------------------------------
  43. #endif