RemoteTransfer.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //---------------------------------------------------------------------------
  2. #ifndef RemoteTransferH
  3. #define RemoteTransferH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include "HistoryComboBox.hpp"
  10. #include <Vcl.ExtCtrls.hpp>
  11. #include <Vcl.Imaging.pngimage.hpp>
  12. //---------------------------------------------------------------------------
  13. class TRemoteTransferDialog : public TForm
  14. {
  15. __published:
  16. TGroupBox *Group;
  17. TLabel *SessionLabel;
  18. TLabel *Label3;
  19. TComboBox *SessionCombo;
  20. THistoryComboBox *DirectoryEdit;
  21. TButton *OkButton;
  22. TButton *CancelButton;
  23. TButton *HelpButton;
  24. TCheckBox *NotDirectCopyCheck;
  25. TImage *Image;
  26. void __fastcall ControlChange(TObject *Sender);
  27. void __fastcall FormShow(TObject *Sender);
  28. void __fastcall HelpButtonClick(TObject *Sender);
  29. void __fastcall SessionComboChange(TObject *Sender);
  30. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  31. void __fastcall NotDirectCopyCheckClick(TObject *Sender);
  32. public:
  33. __fastcall TRemoteTransferDialog(TComponent * Owner);
  34. void __fastcall Init(
  35. bool Multi, TStrings * Sessions, TStrings * Directories, TDirectRemoteCopy AllowDirectCopy,
  36. void * CurrentSession, TDirectoryExistsEvent OnDirectoryExists, bool TargetConfirmed);
  37. bool __fastcall Execute(void *& Session, UnicodeString & Target,
  38. UnicodeString & FileMask, bool & DirectCopy);
  39. protected:
  40. void __fastcall UpdateControls();
  41. UnicodeString GetTarget();
  42. UnicodeString GetFileMask();
  43. bool __fastcall IsCurrentSessionSelected();
  44. void * GetSelectedSession();
  45. void __fastcall UpdateNotDirectCopyCheck();
  46. private:
  47. TStrings * FDirectories;
  48. void * FCurrentSession;
  49. bool FDirectCopy;
  50. bool FMulti;
  51. TDirectRemoteCopy FAllowDirectCopy;
  52. TDirectoryExistsEvent FOnDirectoryExists;
  53. bool FTargetConfirmed;
  54. UnicodeString FOriginalTarget;
  55. INTERFACE_HOOK;
  56. };
  57. //---------------------------------------------------------------------------
  58. #endif