Copy.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. //---------------------------------------------------------------------------
  2. #ifndef CopyH
  3. #define CopyH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <Mask.hpp>
  10. #include <ExtCtrls.hpp>
  11. #include <HistoryComboBox.hpp>
  12. #include "Rights.h"
  13. #include "CopyParams.h"
  14. #include <Menus.hpp>
  15. //---------------------------------------------------------------------------
  16. class TCopyDialog : public TForm
  17. {
  18. __published:
  19. TLabel *DirectoryLabel;
  20. THistoryComboBox *LocalDirectoryEdit;
  21. THistoryComboBox *RemoteDirectoryEdit;
  22. TButton *CopyButton;
  23. TButton *CancelButton;
  24. TButton *LocalDirectoryBrowseButton;
  25. TCheckBox *QueueCheck;
  26. TCheckBox *QueueIndividuallyCheck;
  27. TButton *HelpButton;
  28. TCheckBox *NewerOnlyCheck;
  29. TCheckBox *NeverShowAgainCheck;
  30. TButton *TransferSettingsButton;
  31. TGroupBox *CopyParamGroup;
  32. TLabel *CopyParamLabel;
  33. void __fastcall FormShow(TObject *Sender);
  34. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  35. void __fastcall LocalDirectoryBrowseButtonClick(TObject *Sender);
  36. void __fastcall ControlChange(TObject *Sender);
  37. void __fastcall TransferSettingsButtonClick(TObject *Sender);
  38. void __fastcall HelpButtonClick(TObject *Sender);
  39. void __fastcall CopyParamGroupDblClick(TObject *Sender);
  40. void __fastcall CopyParamGroupContextPopup(TObject *Sender,
  41. TPoint &MousePos, bool &Handled);
  42. private:
  43. bool FDefaultToRemote;
  44. bool FToRemote;
  45. TStrings * FFileList;
  46. bool FMove;
  47. int FOptions;
  48. int FOutputOptions;
  49. TGUICopyParamType FParams;
  50. TPopupMenu * FPresetsMenu;
  51. AnsiString FPreset;
  52. TCopyParamType FCopyParams;
  53. int FCopyParamAttrs;
  54. bool FSaveSettings;
  55. AnsiString __fastcall GetDirectory();
  56. void __fastcall SetToRemote(bool value);
  57. THistoryComboBox * __fastcall GetDirectoryEdit();
  58. void __fastcall SetParams(const TGUICopyParamType & value);
  59. TGUICopyParamType __fastcall GetParams();
  60. void __fastcall SetDirectory(AnsiString value);
  61. void __fastcall SetFileList(TStrings * value);
  62. void __fastcall SetMove(bool value);
  63. AnsiString __fastcall GetFileMask();
  64. void __fastcall SetOptions(int value);
  65. void __fastcall SetOutputOptions(int value);
  66. int __fastcall GetOutputOptions();
  67. void __fastcall SetCopyParamAttrs(int value);
  68. int __fastcall GetCopyParamAttrs();
  69. void __fastcall CopyParamClick(TObject * Sender);
  70. protected:
  71. void __fastcall UpdateControls();
  72. void __fastcall AdjustControls();
  73. void __fastcall AdjustTransferControls();
  74. bool __fastcall RemotePaths();
  75. void __fastcall CopyParamListPopup(TPoint P, int AdditionalOptions);
  76. public:
  77. __fastcall TCopyDialog(TComponent* Owner);
  78. virtual __fastcall ~TCopyDialog();
  79. bool __fastcall Execute();
  80. __property bool ToRemote = { read = FToRemote, write = SetToRemote };
  81. __property AnsiString Directory = { read = GetDirectory, write = SetDirectory };
  82. __property THistoryComboBox * DirectoryEdit = { read = GetDirectoryEdit };
  83. __property TStrings * FileList = { read = FFileList, write = SetFileList };
  84. __property TGUICopyParamType Params = { read = GetParams, write = SetParams };
  85. __property bool Move = { read = FMove, write = SetMove };
  86. __property int Options = { read = FOptions, write = SetOptions };
  87. __property int CopyParamAttrs = { read = GetCopyParamAttrs, write = SetCopyParamAttrs };
  88. __property int OutputOptions = { read = GetOutputOptions, write = SetOutputOptions };
  89. };
  90. //---------------------------------------------------------------------------
  91. #endif