Copy.h 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. TMoreButton *MoreButton;
  24. TButton *CopyButton;
  25. TButton *CancelButton;
  26. TPanel *MorePanel;
  27. TCheckBox *SaveSettingsCheck;
  28. TCopyParamsFrame *CopyParamsFrame;
  29. TButton *LocalDirectoryBrowseButton;
  30. TCheckBox *QueueCheck;
  31. TCheckBox *QueueNoConfirmationCheck;
  32. TCheckBox *NewerOnlyCheck;
  33. TButton *PresetsButton;
  34. TButton *HelpButton;
  35. TCheckBox *NeverShowAgainCheck;
  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 PresetsButtonClick(TObject *Sender);
  41. void __fastcall HelpButtonClick(TObject *Sender);
  42. private:
  43. bool FDefaultToRemote;
  44. bool FToRemote;
  45. TStrings * FFileList;
  46. bool FMove;
  47. int FOptions;
  48. int FOutputOptions;
  49. TGUICopyParamType FParams;
  50. TPopupMenu * FPresetsMenu;
  51. AnsiString FPreset;
  52. AnsiString __fastcall GetDirectory();
  53. void __fastcall SetToRemote(bool value);
  54. THistoryComboBox * __fastcall GetDirectoryEdit();
  55. void __fastcall SetParams(const TGUICopyParamType & value);
  56. TGUICopyParamType __fastcall GetParams();
  57. void __fastcall SetDirectory(AnsiString value);
  58. void __fastcall SetFileList(TStrings * value);
  59. void __fastcall SetMove(bool value);
  60. AnsiString __fastcall GetFileMask();
  61. void __fastcall SetOptions(int value);
  62. void __fastcall SetOutputOptions(int value);
  63. int __fastcall GetOutputOptions();
  64. void __fastcall SetCopyParamAttrs(int value);
  65. int __fastcall GetCopyParamAttrs();
  66. void __fastcall CopyParamClick(TObject * Sender);
  67. protected:
  68. void __fastcall UpdateControls();
  69. void __fastcall AdjustControls();
  70. void __fastcall AdjustTransferControls();
  71. bool __fastcall RemotePaths();
  72. public:
  73. __fastcall TCopyDialog(TComponent* Owner);
  74. virtual __fastcall ~TCopyDialog();
  75. bool __fastcall Execute();
  76. __property bool ToRemote = { read = FToRemote, write = SetToRemote };
  77. __property AnsiString Directory = { read = GetDirectory, write = SetDirectory };
  78. __property THistoryComboBox * DirectoryEdit = { read = GetDirectoryEdit };
  79. __property TStrings * FileList = { read = FFileList, write = SetFileList };
  80. __property TGUICopyParamType Params = { read = GetParams, write = SetParams };
  81. __property bool Move = { read = FMove, write = SetMove };
  82. __property int Options = { read = FOptions, write = SetOptions };
  83. __property int CopyParamAttrs = { read = GetCopyParamAttrs, write = SetCopyParamAttrs };
  84. __property int OutputOptions = { read = GetOutputOptions, write = SetOutputOptions };
  85. };
  86. //---------------------------------------------------------------------------
  87. #endif