FullSynchronize.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. //---------------------------------------------------------------------------
  2. #ifndef FullSynchronizeH
  3. #define FullSynchronizeH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <HistoryComboBox.hpp>
  10. #include <WinInterface.h>
  11. #include <CopyParam.h>
  12. #include <Vcl.ExtCtrls.hpp>
  13. #include <Vcl.Imaging.pngimage.hpp>
  14. //---------------------------------------------------------------------------
  15. class TFullSynchronizeDialog : public TForm
  16. {
  17. __published:
  18. TGroupBox *DirectoriesGroup;
  19. TButton *OkButton;
  20. TButton *CancelButton;
  21. TLabel *LocalDirectoryLabel;
  22. TLabel *RemoteDirectoryLabel;
  23. THistoryComboBox *RemoteDirectoryEdit;
  24. THistoryComboBox *LocalDirectoryEdit;
  25. TGroupBox *OptionsGroup;
  26. TCheckBox *SynchronizeDeleteCheck;
  27. TCheckBox *SynchronizeSelectedOnlyCheck;
  28. TButton *LocalDirectoryBrowseButton;
  29. TCheckBox *SynchronizeExistingOnlyCheck;
  30. TButton *TransferSettingsButton;
  31. TCheckBox *SynchronizePreviewChangesCheck;
  32. TGroupBox *DirectionGroup;
  33. TRadioButton *SynchronizeBothButton;
  34. TRadioButton *SynchronizeRemoteButton;
  35. TRadioButton *SynchronizeLocalButton;
  36. TGroupBox *CompareCriterionsGroup;
  37. TCheckBox *SynchronizeByTimeCheck;
  38. TCheckBox *SynchronizeBySizeCheck;
  39. TCheckBox *SaveSettingsCheck;
  40. TGroupBox *CopyParamGroup;
  41. TLabel *CopyParamLabel;
  42. TButton *HelpButton;
  43. TGroupBox *ModeGroup;
  44. TRadioButton *SynchronizeFilesButton;
  45. TRadioButton *MirrorFilesButton;
  46. TRadioButton *SynchronizeTimestampsButton;
  47. TImage *Image;
  48. void __fastcall ControlChange(TObject *Sender);
  49. void __fastcall LocalDirectoryBrowseButtonClick(TObject *Sender);
  50. void __fastcall TransferSettingsButtonClick(TObject *Sender);
  51. void __fastcall FormShow(TObject *Sender);
  52. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  53. void __fastcall CopyParamGroupContextPopup(TObject *Sender,
  54. TPoint &MousePos, bool &Handled);
  55. void __fastcall CopyParamGroupClick(TObject *Sender);
  56. void __fastcall HelpButtonClick(TObject *Sender);
  57. void __fastcall TransferSettingsButtonDropDownClick(TObject *Sender);
  58. private:
  59. int FParams;
  60. bool FSaveMode;
  61. TSynchronizeMode FOrigMode;
  62. int FOptions;
  63. TUsableCopyParamAttrs FCopyParamAttrs;
  64. TCopyParamType FCopyParams;
  65. TPopupMenu * FPresetsMenu;
  66. UnicodeString FPreset;
  67. UnicodeString FSynchronizeBySizeCaption;
  68. void __fastcall SetRemoteDirectory(const UnicodeString value);
  69. UnicodeString __fastcall GetRemoteDirectory();
  70. void __fastcall SetLocalDirectory(const UnicodeString value);
  71. UnicodeString __fastcall GetLocalDirectory();
  72. void __fastcall SetMode(TSynchronizeMode value);
  73. TSynchronizeMode __fastcall GetMode();
  74. void __fastcall SetParams(int value);
  75. int __fastcall GetParams();
  76. void __fastcall SetSaveSettings(bool value);
  77. bool __fastcall GetSaveSettings();
  78. void __fastcall SetOptions(int value);
  79. void __fastcall SetCopyParams(const TCopyParamType & value);
  80. TCopyParamType __fastcall GetCopyParams();
  81. void __fastcall CopyParamClick(TObject * Sender);
  82. int __fastcall ActualCopyParamAttrs();
  83. void __fastcall CopyParamListPopup(TRect R, int AdditionalOptions);
  84. public:
  85. __fastcall TFullSynchronizeDialog(TComponent* Owner);
  86. virtual __fastcall ~TFullSynchronizeDialog();
  87. bool __fastcall Execute();
  88. __property UnicodeString RemoteDirectory = { read = GetRemoteDirectory, write = SetRemoteDirectory };
  89. __property UnicodeString LocalDirectory = { read = GetLocalDirectory, write = SetLocalDirectory };
  90. __property int Params = { read = GetParams, write = SetParams };
  91. __property TSynchronizeMode Mode = { read = GetMode, write = SetMode };
  92. __property bool SaveSettings = { read = GetSaveSettings, write = SetSaveSettings };
  93. __property bool SaveMode = { read = FSaveMode, write = FSaveMode };
  94. __property int Options = { read = FOptions, write = SetOptions };
  95. __property TUsableCopyParamAttrs CopyParamAttrs = { read = FCopyParamAttrs, write = FCopyParamAttrs };
  96. __property TCopyParamType CopyParams = { read = GetCopyParams, write = SetCopyParams };
  97. protected:
  98. void __fastcall UpdateControls();
  99. };
  100. //---------------------------------------------------------------------------
  101. #endif