Copy.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. TButton *HelpButton;
  28. TCheckBox *NeverShowAgainCheck;
  29. TButton *TransferSettingsButton;
  30. TGroupBox *CopyParamGroup;
  31. TLabel *CopyParamLabel;
  32. TImage *Image;
  33. TPanel *ShortCutHintPanel;
  34. TLabel *ShortCutHintLabel;
  35. TPopupMenu *OkMenu;
  36. TMenuItem *DownloadItem;
  37. TMenuItem *BrowseItem;
  38. void __fastcall FormShow(TObject *Sender);
  39. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  40. void __fastcall LocalDirectoryBrowseButtonClick(TObject *Sender);
  41. void __fastcall ControlChange(TObject *Sender);
  42. void __fastcall TransferSettingsButtonClick(TObject *Sender);
  43. void __fastcall HelpButtonClick(TObject *Sender);
  44. void __fastcall CopyParamGroupClick(TObject *Sender);
  45. void __fastcall CopyParamGroupContextPopup(TObject *Sender,
  46. TPoint &MousePos, bool &Handled);
  47. void __fastcall TransferSettingsButtonDropDownClick(TObject *Sender);
  48. void __fastcall NeverShowAgainCheckClick(TObject *Sender);
  49. void __fastcall ShortCutHintLabelClick(TObject *Sender);
  50. void __fastcall LocalDirectoryEditExit(TObject *Sender);
  51. void __fastcall DownloadItemClick(TObject *Sender);
  52. void __fastcall BrowseItemClick(TObject *Sender);
  53. void __fastcall OkButtonDropDownClick(TObject *Sender);
  54. void __fastcall FormAfterMonitorDpiChanged(TObject *Sender, int OldDPI, int NewDPI);
  55. private:
  56. bool FDefaultToRemote;
  57. bool FToRemote;
  58. TStrings * FFileList;
  59. bool FMove;
  60. int FOptions;
  61. int FOutputOptions;
  62. TGUICopyParamType FParams;
  63. TPopupMenu * FPresetsMenu;
  64. UnicodeString FPreset;
  65. TCopyParamType FCopyParams;
  66. int FCopyParamAttrs;
  67. TSessionData * FSessionData;
  68. bool FSaveSettings;
  69. bool FBrowse;
  70. UnicodeString __fastcall GetDirectory();
  71. THistoryComboBox * __fastcall GetDirectoryEdit();
  72. void __fastcall SetParams(const TGUICopyParamType & value);
  73. TGUICopyParamType __fastcall GetParams();
  74. void __fastcall SetDirectory(UnicodeString value);
  75. UnicodeString __fastcall GetFileMask();
  76. void __fastcall SetOutputOptions(int value);
  77. int __fastcall GetOutputOptions();
  78. void __fastcall CopyParamClick(TObject * Sender);
  79. void __fastcall GenerateCode();
  80. protected:
  81. void __fastcall UpdateControls();
  82. void __fastcall AdjustControls();
  83. void __fastcall AdjustTransferControls();
  84. bool __fastcall RemotePaths();
  85. void __fastcall CopyParamListPopup(TRect R, int AdditionalOptions);
  86. int __fastcall ActualCopyParamAttrs();
  87. INTERFACE_HOOK;
  88. public:
  89. __fastcall TCopyDialog(
  90. TComponent* Owner, bool ToRemote, bool Move, TStrings * FileList, int Options,
  91. int CopyParamAttrs, TSessionData * SessionData);
  92. virtual __fastcall ~TCopyDialog();
  93. bool __fastcall Execute();
  94. __property UnicodeString Directory = { read = GetDirectory, write = SetDirectory };
  95. __property THistoryComboBox * DirectoryEdit = { read = GetDirectoryEdit };
  96. __property TGUICopyParamType Params = { read = GetParams, write = SetParams };
  97. __property int OutputOptions = { read = GetOutputOptions, write = SetOutputOptions };
  98. };
  99. //---------------------------------------------------------------------------
  100. #endif