SynchronizeProgress.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. #include "PngImageList.hpp"
  12. #include "TB2Dock.hpp"
  13. #include "TB2Item.hpp"
  14. #include "TB2Toolbar.hpp"
  15. #include "TBX.hpp"
  16. #include <Vcl.ImgList.hpp>
  17. #include <GUITools.h>
  18. //---------------------------------------------------------------------------
  19. class TSynchronizeProgressForm : public TForm
  20. {
  21. __published:
  22. TLabel *Label1;
  23. TLabel *Label2;
  24. TPathLabel *RemoteDirectoryLabel;
  25. TPathLabel *LocalDirectoryLabel;
  26. TLabel *StartTimeLabel;
  27. TLabel *Label4;
  28. TLabel *Label3;
  29. TLabel *TimeElapsedLabel;
  30. TTimer *UpdateTimer;
  31. TPngImageList *ImageList;
  32. TPanel *ToolbarPanel;
  33. TTBXDock *Dock;
  34. TTBXToolbar *Toolbar;
  35. TTBXItem *CancelItem;
  36. TTBXItem *MinimizeItem;
  37. TPaintBox *AnimationPaintBox;
  38. TPanel *ComponentsPanel;
  39. TPngImageList *ImageList120;
  40. TPngImageList *ImageList144;
  41. TPngImageList *ImageList192;
  42. void __fastcall UpdateTimerTimer(TObject *Sender);
  43. void __fastcall MinimizeItemClick(TObject *Sender);
  44. void __fastcall CancelItemClick(TObject *Sender);
  45. public:
  46. __fastcall TSynchronizeProgressForm(TComponent * Owner, bool AllowMinimize,
  47. bool CompareOnly);
  48. virtual __fastcall ~TSynchronizeProgressForm();
  49. void __fastcall Start();
  50. void __fastcall SetData(const UnicodeString LocalDirectory,
  51. const UnicodeString RemoteDirectory, bool & Continue);
  52. __property bool Started = { read = FStarted };
  53. protected:
  54. virtual void __fastcall Dispatch(void * Message);
  55. private:
  56. TDateTime FStartTime;
  57. TDateTime FElapsed;
  58. bool FStarted;
  59. bool FCanceled;
  60. void * FShowAsModalStorage;
  61. bool FMinimizedByMe;
  62. bool FCompareOnly;
  63. TFrameAnimation FFrameAnimation;
  64. void __fastcall UpdateControls();
  65. void __fastcall GlobalMinimize(TObject * Sender);
  66. void __fastcall CancelOperation();
  67. void __fastcall CMDialogKey(TCMDialogKey & Message);
  68. INTERFACE_HOOK;
  69. };
  70. //---------------------------------------------------------------------------
  71. #endif