CopyParams.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. //---------------------------------------------------------------------------
  2. #ifndef CopyParamsH
  3. #define CopyParamsH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <ExtCtrls.hpp>
  10. #include <HistoryComboBox.hpp>
  11. #include <XPThemes.hpp>
  12. #include <WinInterface.h>
  13. #include "Rights.h"
  14. //---------------------------------------------------------------------------
  15. const int cfAllowTransferMode = 0x01;
  16. const int cfAllowExcludeMask = 0x02;
  17. const int cfAllowClearArchive = 0x04;
  18. const int cfDisablePreserveTime = 0x08;
  19. const int cfAllowExcludeMaskOnly = 0x10;
  20. //---------------------------------------------------------------------------
  21. class TCopyParamsFrame : public TFrame
  22. {
  23. __published:
  24. TXPGroupBox *TransferModeGroup;
  25. TLabel *AsciiFileMaskLabel;
  26. TRadioButton *TMTextButton;
  27. TRadioButton *TMBinaryButton;
  28. TRadioButton *TMAutomaticButton;
  29. THistoryComboBox *AsciiFileMaskCombo;
  30. TXPGroupBox *RemotePropertiesGroup;
  31. TRightsFrame *RightsFrame;
  32. TCheckBox *RemotePreserveTimeCheck;
  33. TXPGroupBox *LocalPropertiesGroup;
  34. TCheckBox *PreserveReadOnlyCheck;
  35. TCheckBox *LocalPreserveTimeCheck;
  36. TCheckBox *PreserveRightsCheck;
  37. TXPGroupBox *ChangeCaseGroup;
  38. TRadioButton *CCNoChangeButton;
  39. TRadioButton *CCUpperCaseButton;
  40. TRadioButton *CCLowerCaseButton;
  41. TRadioButton *CCFirstUpperCaseButton;
  42. TXPGroupBox *CommonPropertiesGroup;
  43. TCheckBox *CommonPreserveTimestampCheck;
  44. TCheckBox *ReplaceInvalidCharsCheck;
  45. TCheckBox *CommonCalculateSizeCheck;
  46. TXPGroupBox *OtherGroup;
  47. TLabel *ExclusionFileMaskLabel;
  48. THistoryComboBox *ExcludeFileMaskCombo;
  49. TRadioButton *CCLowerCaseShortButton;
  50. TCheckBox *ClearArchiveCheck;
  51. TComboBox *NegativeExcludeCombo;
  52. TStaticText *ExcludeFileMaskHintText;
  53. void __fastcall ControlChange(TObject *Sender);
  54. void __fastcall ValidateMaskComboExit(TObject *Sender);
  55. private:
  56. TParamsForDirection FDirection;
  57. AnsiString FOrigMasks;
  58. TCopyParamType * FParams;
  59. int FOptions;
  60. void __fastcall SetParams(TCopyParamType value);
  61. TCopyParamType __fastcall GetParams();
  62. void __fastcall SetDirection(TParamsForDirection value);
  63. TCheckBox * __fastcall GetPreserveTimeCheck();
  64. void __fastcall SetOptions(int value);
  65. protected:
  66. void __fastcall UpdateControls();
  67. virtual void __fastcall SetEnabled(Boolean Value);
  68. __property TCheckBox * PreserveTimeCheck = { read = GetPreserveTimeCheck };
  69. public:
  70. __fastcall TCopyParamsFrame(TComponent* Owner);
  71. __fastcall ~TCopyParamsFrame();
  72. void __fastcall BeforeExecute();
  73. void __fastcall AfterExecute();
  74. void __fastcall Validate();
  75. __property int Options = { read = FOptions, write = SetOptions };
  76. __property TParamsForDirection Direction = { read = FDirection, write = SetDirection };
  77. __property TCopyParamType Params = { read = GetParams, write = SetParams };
  78. };
  79. //---------------------------------------------------------------------------
  80. #endif