SynchronizeProgress.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. void __fastcall FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
  46. public:
  47. __fastcall TSynchronizeProgressForm(TComponent * Owner, bool AllowMinimize,
  48. bool CompareOnly);
  49. virtual __fastcall ~TSynchronizeProgressForm();
  50. void __fastcall Start();
  51. void __fastcall SetData(const UnicodeString LocalDirectory,
  52. const UnicodeString RemoteDirectory, bool & Continue);
  53. __property bool Started = { read = FStarted };
  54. protected:
  55. virtual void __fastcall Dispatch(void * Message);
  56. private:
  57. TDateTime FStartTime;
  58. TDateTime FElapsed;
  59. bool FStarted;
  60. bool FCanceled;
  61. void * FShowAsModalStorage;
  62. bool FMinimizedByMe;
  63. bool FCompareOnly;
  64. TFrameAnimation FFrameAnimation;
  65. void __fastcall UpdateControls();
  66. void __fastcall GlobalMinimize(TObject * Sender);
  67. void __fastcall CancelOperation();
  68. };
  69. //---------------------------------------------------------------------------
  70. #endif