Copy.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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 <Menus.hpp>
  14. //---------------------------------------------------------------------------
  15. class TCopyDialog : public TForm
  16. {
  17. __published:
  18. TLabel *DirectoryLabel;
  19. THistoryComboBox *LocalDirectoryEdit;
  20. THistoryComboBox *RemoteDirectoryEdit;
  21. TButton *OkButton;
  22. TButton *CancelButton;
  23. TButton *LocalDirectoryBrowseButton;
  24. TCheckBox *QueueCheck2;
  25. TButton *HelpButton;
  26. TCheckBox *NeverShowAgainCheck;
  27. TButton *TransferSettingsButton;
  28. TGroupBox *CopyParamGroup;
  29. TLabel *CopyParamLabel;
  30. TImage *Image;
  31. TPanel *ShortCutHintPanel;
  32. TLabel *ShortCutHintLabel;
  33. TPopupMenu *OkMenu;
  34. TMenuItem *DownloadItem;
  35. TMenuItem *ExploreItem;
  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. void __fastcall LocalDirectoryEditExit(TObject *Sender);
  49. void __fastcall DownloadItemClick(TObject *Sender);
  50. void __fastcall ExploreItemClick(TObject *Sender);
  51. void __fastcall OkButtonDropDownClick(TObject *Sender);
  52. void __fastcall FormAfterMonitorDpiChanged(TObject *Sender, int OldDPI, int NewDPI);
  53. private:
  54. bool FToRemote;
  55. TStrings * FFileList;
  56. bool FMove;
  57. int FOptions;
  58. int FOutputOptions;
  59. TGUICopyParamType FParams;
  60. TPopupMenu * FPresetsMenu;
  61. UnicodeString FPreset;
  62. TCopyParamType FCopyParams;
  63. int FCopyParamAttrs;
  64. TSessionData * FSessionData;
  65. bool FSaveSettings;
  66. bool FExplore;
  67. UnicodeString __fastcall GetDirectory();
  68. THistoryComboBox * __fastcall GetDirectoryEdit();
  69. void __fastcall SetParams(const TGUICopyParamType & value);
  70. TGUICopyParamType __fastcall GetParams();
  71. void __fastcall SetDirectory(UnicodeString value);
  72. UnicodeString __fastcall GetFileMask();
  73. void __fastcall SetOutputOptions(int value);
  74. int __fastcall GetOutputOptions();
  75. void __fastcall CopyParamClick(TObject * Sender);
  76. void __fastcall GenerateCode();
  77. protected:
  78. void __fastcall UpdateControls();
  79. void __fastcall AdjustControls();
  80. void __fastcall AdjustTransferControls();
  81. bool __fastcall RemotePaths();
  82. void __fastcall CopyParamListPopup(TRect R, int AdditionalOptions);
  83. int __fastcall ActualCopyParamAttrs();
  84. virtual void __fastcall CreateWnd();
  85. INTERFACE_HOOK
  86. public:
  87. __fastcall TCopyDialog(
  88. TComponent* Owner, bool ToRemote, bool Move, TStrings * FileList, int Options,
  89. int CopyParamAttrs, TSessionData * SessionData);
  90. virtual __fastcall ~TCopyDialog();
  91. bool __fastcall Execute();
  92. __property UnicodeString Directory = { read = GetDirectory, write = SetDirectory };
  93. __property THistoryComboBox * DirectoryEdit = { read = GetDirectoryEdit };
  94. __property TGUICopyParamType Params = { read = GetParams, write = SetParams };
  95. __property int OutputOptions = { read = GetOutputOptions, write = SetOutputOptions };
  96. };
  97. //---------------------------------------------------------------------------
  98. #endif