FullSynchronize.h 4.2 KB

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