Synchronize.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //---------------------------------------------------------------------------
  2. #ifndef SynchronizeH
  3. #define SynchronizeH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <XPGroupBox.hpp>
  10. #include <HistoryComboBox.hpp>
  11. #include <WinInterface.h>
  12. //---------------------------------------------------------------------------
  13. class TSynchronizeDialog : public TForm
  14. {
  15. __published:
  16. TXPGroupBox *DirectoriesGroup;
  17. TButton *StopButton;
  18. TButton *CancelButton;
  19. TLabel *LocalDirectoryLabel;
  20. TLabel *RemoteDirectoryLabel;
  21. THistoryComboBox *RemoteDirectoryEdit;
  22. THistoryComboBox *LocalDirectoryEdit;
  23. TXPGroupBox *OptionsGroup;
  24. TCheckBox *SynchronizeDeleteCheck;
  25. TCheckBox *SynchronizeNoConfirmationCheck;
  26. TButton *LocalDirectoryBrowseButton;
  27. TCheckBox *SaveSettingsCheck;
  28. TCheckBox *SynchronizeExistingOnlyCheck;
  29. TButton *StartButton;
  30. TButton *MinimizeButton;
  31. TButton *TransferPreferencesButton;
  32. TCheckBox *SynchronizeRecursiveCheck;
  33. void __fastcall ControlChange(TObject *Sender);
  34. void __fastcall LocalDirectoryBrowseButtonClick(TObject *Sender);
  35. void __fastcall DirectoryEditKeyDown(TObject *Sender, WORD &Key,
  36. TShiftState Shift);
  37. void __fastcall TransferPreferencesButtonClick(TObject *Sender);
  38. void __fastcall StartButtonClick(TObject *Sender);
  39. void __fastcall StopButtonClick(TObject *Sender);
  40. void __fastcall MinimizeButtonClick(TObject *Sender);
  41. void __fastcall FormShow(TObject *Sender);
  42. private:
  43. TSynchronizeParamType FParams;
  44. TSynchronizeStartStopEvent FOnStartStop;
  45. bool FSynchronizing;
  46. bool FMinimizedByMe;
  47. bool FAbort;
  48. bool FClose;
  49. void __fastcall SetParams(const TSynchronizeParamType& value);
  50. TSynchronizeParamType __fastcall GetParams();
  51. void __fastcall SetSaveSettings(bool value);
  52. bool __fastcall GetSaveSettings();
  53. protected:
  54. void __fastcall DoStartStop(bool Start);
  55. void __fastcall DoAbort(TObject * Sender, bool Close);
  56. void __fastcall Stop();
  57. virtual void __fastcall Dispatch(void * Message);
  58. public:
  59. __fastcall TSynchronizeDialog(TComponent* Owner);
  60. bool __fastcall Execute();
  61. __property TSynchronizeParamType Params = { read = GetParams, write = SetParams };
  62. __property TSynchronizeStartStopEvent OnStartStop = { read=FOnStartStop, write=FOnStartStop };
  63. __property bool SaveSettings = { read = GetSaveSettings, write = SetSaveSettings };
  64. protected:
  65. void __fastcall UpdateControls();
  66. };
  67. //---------------------------------------------------------------------------
  68. #endif