Copy.h 3.6 KB

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