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. 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. };
  69. //---------------------------------------------------------------------------
  70. #endif