SynchronizeProgress.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. TButton *MinimizeButton;
  26. void __fastcall CancelButtonClick(TObject *Sender);
  27. void __fastcall UpdateTimerTimer(TObject *Sender);
  28. void __fastcall MinimizeButtonClick(TObject *Sender);
  29. public:
  30. __fastcall TSynchronizeProgressForm(TComponent * Owner, bool AllowMinimize,
  31. bool CompareOnly);
  32. virtual __fastcall ~TSynchronizeProgressForm();
  33. void __fastcall Start();
  34. void __fastcall SetData(const UnicodeString LocalDirectory,
  35. const UnicodeString RemoteDirectory, bool & Continue);
  36. __property bool Started = { read = FStarted };
  37. protected:
  38. virtual void __fastcall Dispatch(void * Message);
  39. private:
  40. TDateTime FStartTime;
  41. TDateTime FElapsed;
  42. bool FStarted;
  43. bool FCanceled;
  44. void * FShowAsModalStorage;
  45. bool FMinimizedByMe;
  46. bool FCompareOnly;
  47. void __fastcall UpdateControls();
  48. void __fastcall GlobalMinimize(TObject * Sender);
  49. void __fastcall CancelOperation();
  50. };
  51. //---------------------------------------------------------------------------
  52. #endif