Copy.h 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 *Image;
  34. TPanel *ShortCutHintPanel;
  35. TLabel *ShortCutHintLabel;
  36. void __fastcall FormShow(TObject *Sender);
  37. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  38. void __fastcall LocalDirectoryBrowseButtonClick(TObject *Sender);
  39. void __fastcall ControlChange(TObject *Sender);
  40. void __fastcall TransferSettingsButtonClick(TObject *Sender);
  41. void __fastcall HelpButtonClick(TObject *Sender);
  42. void __fastcall CopyParamGroupClick(TObject *Sender);
  43. void __fastcall CopyParamGroupContextPopup(TObject *Sender,
  44. TPoint &MousePos, bool &Handled);
  45. void __fastcall TransferSettingsButtonDropDownClick(TObject *Sender);
  46. void __fastcall NeverShowAgainCheckClick(TObject *Sender);
  47. void __fastcall ShortCutHintLabelClick(TObject *Sender);
  48. private:
  49. bool FDefaultToRemote;
  50. bool FToRemote;
  51. TStrings * FFileList;
  52. bool FMove;
  53. int FOptions;
  54. int FOutputOptions;
  55. TGUICopyParamType FParams;
  56. TPopupMenu * FPresetsMenu;
  57. UnicodeString FPreset;
  58. TCopyParamType FCopyParams;
  59. int FCopyParamAttrs;
  60. bool FSaveSettings;
  61. UnicodeString __fastcall GetDirectory();
  62. THistoryComboBox * __fastcall GetDirectoryEdit();
  63. void __fastcall SetParams(const TGUICopyParamType & value);
  64. TGUICopyParamType __fastcall GetParams();
  65. void __fastcall SetDirectory(UnicodeString value);
  66. UnicodeString __fastcall GetFileMask();
  67. void __fastcall SetOutputOptions(int value);
  68. int __fastcall GetOutputOptions();
  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(TRect R, int AdditionalOptions);
  76. public:
  77. __fastcall TCopyDialog(TComponent* Owner, bool ToRemote, bool Move, TStrings * FileList, int Options, int CopyParamAttrs);
  78. virtual __fastcall ~TCopyDialog();
  79. bool __fastcall Execute();
  80. __property UnicodeString Directory = { read = GetDirectory, write = SetDirectory };
  81. __property THistoryComboBox * DirectoryEdit = { read = GetDirectoryEdit };
  82. __property TGUICopyParamType Params = { read = GetParams, write = SetParams };
  83. __property int OutputOptions = { read = GetOutputOptions, write = SetOutputOptions };
  84. };
  85. //---------------------------------------------------------------------------
  86. #endif