Synchronize.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //----------------------------------------------------------------------------
  2. #ifndef SynchronizeH
  3. #define SynchronizeH
  4. //----------------------------------------------------------------------------
  5. #include <vcl\System.hpp>
  6. #include <vcl\Windows.hpp>
  7. #include <vcl\SysUtils.hpp>
  8. #include <vcl\Classes.hpp>
  9. #include <vcl\Graphics.hpp>
  10. #include <vcl\StdCtrls.hpp>
  11. #include <vcl\Forms.hpp>
  12. #include <vcl\Controls.hpp>
  13. #include <vcl\Buttons.hpp>
  14. #include <vcl\ExtCtrls.hpp>
  15. #include <MoreButton.hpp>
  16. #include <WinInterface.h>
  17. #include "CopyParams.h"
  18. //----------------------------------------------------------------------------
  19. class TSynchronizeDialog : public TForm
  20. {
  21. __published:
  22. TButton *StartButton;
  23. TButton *StopButton;
  24. TButton *CloseButton;
  25. TLabel *StatusLabel;
  26. TPanel *MorePanel;
  27. TCopyParamsFrame *CopyParamsFrame;
  28. TCheckBox *SaveSettingsCheck;
  29. TMoreButton *MoreButton;
  30. TButton *MinimizeButton;
  31. TCheckBox *ExistingOnlyCheck;
  32. void __fastcall FormShow(TObject *Sender);
  33. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  34. void __fastcall StartButtonClick(TObject *Sender);
  35. void __fastcall StopButtonClick(TObject *Sender);
  36. void __fastcall MinimizeButtonClick(TObject *Sender);
  37. private:
  38. TSynchronizeStartStopEvent FOnStartStop;
  39. bool FSynchronizing;
  40. TSynchronizeParamType FParams;
  41. bool FWasExpanded;
  42. bool FMinimizedByMe;
  43. void __fastcall SetParams(TSynchronizeParamType value);
  44. TSynchronizeParamType __fastcall GetParams();
  45. bool __fastcall GetExistingOnly();
  46. void __fastcall SetExistingOnly(bool value);
  47. protected:
  48. void __fastcall UpdateControls();
  49. void __fastcall Validate();
  50. virtual void __fastcall DoStartStop(Boolean Start, TSynchronizeParamType Params);
  51. void __fastcall MinimizeApp();
  52. public:
  53. virtual __fastcall TSynchronizeDialog(TComponent* AOwner);
  54. bool __fastcall Execute();
  55. void __fastcall Stop();
  56. __property TSynchronizeParamType Params = { read = GetParams, write = SetParams };
  57. __property TSynchronizeStartStopEvent OnStartStop = { read=FOnStartStop, write=FOnStartStop };
  58. __property bool ExistingOnly = { read=GetExistingOnly, write=SetExistingOnly };
  59. };
  60. //----------------------------------------------------------------------------
  61. #endif