SynchronizeProgress.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. #include <Vcl.ComCtrls.hpp>
  19. #include <System.ImageList.hpp>
  20. //---------------------------------------------------------------------------
  21. class TSynchronizeProgressForm : public TForm
  22. {
  23. __published:
  24. TLabel *LeftLabel;
  25. TLabel *RightLabel;
  26. TPathLabel *RightDirectoryLabel;
  27. TPathLabel *LeftDirectoryLabel;
  28. TLabel *StartTimeLabel;
  29. TLabel *StartTimeLabelLabel;
  30. TLabel *Label3;
  31. TLabel *TimeElapsedLabel;
  32. TTimer *UpdateTimer;
  33. TPngImageList *ImageList;
  34. TPanel *ToolbarPanel;
  35. TTBXDock *Dock;
  36. TTBXToolbar *Toolbar;
  37. TTBXItem *CancelItem;
  38. TTBXItem *MinimizeItem;
  39. TPaintBox *AnimationPaintBox;
  40. TPanel *ComponentsPanel;
  41. TPngImageList *ImageList120;
  42. TPngImageList *ImageList144;
  43. TPngImageList *ImageList192;
  44. TProgressBar *OperationProgress;
  45. TLabel *TimeLeftLabelLabel;
  46. TLabel *TimeLeftLabel;
  47. void __fastcall UpdateTimerTimer(TObject *Sender);
  48. void __fastcall MinimizeItemClick(TObject *Sender);
  49. void __fastcall CancelItemClick(TObject *Sender);
  50. public:
  51. __fastcall TSynchronizeProgressForm(TComponent * Owner, bool AllowMinimize, int Files, bool LocalLocal);
  52. virtual __fastcall ~TSynchronizeProgressForm();
  53. void __fastcall Start();
  54. int __fastcall SetData(
  55. const UnicodeString & Directory1, const UnicodeString & Directory2, int Progress, bool & Continue);
  56. __property bool Started = { read = FStarted };
  57. protected:
  58. virtual void __fastcall Dispatch(void * Message);
  59. int __fastcall CalculateProgress();
  60. private:
  61. TDateTime FStartTime;
  62. bool FStarted;
  63. bool FCanceled;
  64. void * FShowAsModalStorage;
  65. bool FMinimizedByMe;
  66. TFrameAnimation FFrameAnimation;
  67. void __fastcall UpdateControls();
  68. void __fastcall GlobalMinimize(TObject * Sender);
  69. void __fastcall CancelOperation();
  70. void __fastcall CMDialogKey(TCMDialogKey & Message);
  71. INTERFACE_HOOK
  72. };
  73. //---------------------------------------------------------------------------
  74. #endif