Copy.h 3.5 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 <Vcl.Imaging.pngimage.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 *OkButton;
  24. TButton *CancelButton;
  25. TButton *LocalDirectoryBrowseButton;
  26. TCheckBox *QueueCheck2;
  27. TCheckBox *QueueIndividuallyCheck;
  28. TButton *HelpButton;
  29. TCheckBox *NeverShowAgainCheck;
  30. TButton *TransferSettingsButton;
  31. TGroupBox *CopyParamGroup;
  32. TLabel *CopyParamLabel;
  33. TImage *CopyImage;
  34. TImage *MoveImage;
  35. TImage *CopyUploadImage;
  36. TImage *CopyDownloadImage;
  37. TImage *MoveDownloadImage;
  38. TImage *MoveUploadImage;
  39. TPanel *ShortCutHintPanel;
  40. TLabel *ShortCutHintLabel;
  41. void __fastcall FormShow(TObject *Sender);
  42. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  43. void __fastcall LocalDirectoryBrowseButtonClick(TObject *Sender);
  44. void __fastcall ControlChange(TObject *Sender);
  45. void __fastcall TransferSettingsButtonClick(TObject *Sender);
  46. void __fastcall HelpButtonClick(TObject *Sender);
  47. void __fastcall CopyParamGroupClick(TObject *Sender);
  48. void __fastcall CopyParamGroupContextPopup(TObject *Sender,
  49. TPoint &MousePos, bool &Handled);
  50. void __fastcall TransferSettingsButtonDropDownClick(TObject *Sender);
  51. void __fastcall NeverShowAgainCheckClick(TObject *Sender);
  52. void __fastcall ShortCutHintLabelClick(TObject *Sender);
  53. private:
  54. bool FDefaultToRemote;
  55. bool FToRemote;
  56. TStrings * FFileList;
  57. bool FMove;
  58. int FOptions;
  59. int FOutputOptions;
  60. TGUICopyParamType FParams;
  61. TPopupMenu * FPresetsMenu;
  62. UnicodeString FPreset;
  63. TCopyParamType FCopyParams;
  64. int FCopyParamAttrs;
  65. bool FSaveSettings;
  66. UnicodeString __fastcall GetDirectory();
  67. THistoryComboBox * __fastcall GetDirectoryEdit();
  68. void __fastcall SetParams(const TGUICopyParamType & value);
  69. TGUICopyParamType __fastcall GetParams();
  70. void __fastcall SetDirectory(UnicodeString value);
  71. UnicodeString __fastcall GetFileMask();
  72. void __fastcall SetOutputOptions(int value);
  73. int __fastcall GetOutputOptions();
  74. void __fastcall CopyParamClick(TObject * Sender);
  75. protected:
  76. void __fastcall UpdateControls();
  77. void __fastcall AdjustControls();
  78. void __fastcall AdjustTransferControls();
  79. bool __fastcall RemotePaths();
  80. void __fastcall CopyParamListPopup(TRect R, int AdditionalOptions);
  81. public:
  82. __fastcall TCopyDialog(TComponent* Owner, bool ToRemote, bool Move, TStrings * FileList, int Options, int CopyParamAttrs);
  83. virtual __fastcall ~TCopyDialog();
  84. bool __fastcall Execute();
  85. __property UnicodeString Directory = { read = GetDirectory, write = SetDirectory };
  86. __property THistoryComboBox * DirectoryEdit = { read = GetDirectoryEdit };
  87. __property TGUICopyParamType Params = { read = GetParams, write = SetParams };
  88. __property int OutputOptions = { read = GetOutputOptions, write = SetOutputOptions };
  89. };
  90. //---------------------------------------------------------------------------
  91. #endif