GenerateUrl.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. //---------------------------------------------------------------------------
  2. #ifndef GenerateUrlH
  3. #define GenerateUrlH
  4. //---------------------------------------------------------------------------
  5. #include <System.Classes.hpp>
  6. #include <Vcl.Controls.hpp>
  7. #include <Vcl.StdCtrls.hpp>
  8. #include <Vcl.Forms.hpp>
  9. #include "SessionData.h"
  10. #include <Vcl.ComCtrls.hpp>
  11. #include <Vcl.Menus.hpp>
  12. #include <System.Actions.hpp>
  13. #include <Vcl.ActnList.hpp>
  14. #include <Vcl.StdActns.hpp>
  15. #include <WinInterface.h>
  16. //---------------------------------------------------------------------------
  17. class TGenerateUrlDialog : public TForm
  18. {
  19. __published:
  20. TGroupBox *ResultGroup;
  21. TMemo *ResultMemo;
  22. TButton *CancelBtn;
  23. TButton *HelpButton;
  24. TButton *ClipboardButton;
  25. TPageControl *OptionsPageControl;
  26. TTabSheet *UrlSheet;
  27. TTabSheet *ScriptSheet;
  28. TTabSheet *AssemblySheet;
  29. TCheckBox *UserNameCheck;
  30. TCheckBox *HostKeyCheck;
  31. TCheckBox *WinSCPSpecificCheck;
  32. TCheckBox *SaveExtensionCheck;
  33. TCheckBox *RemoteDirectoryCheck;
  34. TCheckBox *PasswordCheck;
  35. TLabel *Label2;
  36. TComboBox *ScriptFormatCombo;
  37. TLabel *Label1;
  38. TComboBox *AssemblyLanguageCombo;
  39. TLabel *ScriptDescriptionLabel;
  40. TLabel *AssemblyDescriptionLabel;
  41. void __fastcall ControlChange(TObject *Sender);
  42. void __fastcall ClipboardButtonClick(TObject *Sender);
  43. void __fastcall HelpButtonClick(TObject *Sender);
  44. void __fastcall WMNCCreate(TWMNCCreate & Message);
  45. void __fastcall FormShow(TObject *Sender);
  46. private:
  47. TSessionData * FData;
  48. std::unique_ptr<TStrings> FPaths;
  49. bool FPathsSample;
  50. bool FChanging;
  51. TRichEdit * FResultMemoWithLinks;
  52. bool FTransfer;
  53. bool FToRemote;
  54. bool FMove;
  55. int FCopyParamAttrs;
  56. UnicodeString FPath;
  57. TFilesSelected FFilesSelected;
  58. UnicodeString FSourcePath;
  59. TCopyParamType FCopyParam;
  60. bool FUrlCounted;
  61. bool FScriptCounted;
  62. bool FAssemblyCounted;
  63. protected:
  64. void __fastcall UpdateControls();
  65. UnicodeString __fastcall GenerateUrl(UnicodeString Path);
  66. bool __fastcall IsFileUrl();
  67. virtual void __fastcall CreateParams(TCreateParams & Params);
  68. virtual void __fastcall Dispatch(void * AMessage);
  69. UnicodeString __fastcall GenerateUrl();
  70. UnicodeString __fastcall GenerateScript(UnicodeString & ScriptDescription);
  71. UnicodeString __fastcall GenerateAssemblyCode(UnicodeString & AssemblyDescription);
  72. void __fastcall AddSampleDescription(UnicodeString & Description);
  73. public:
  74. __fastcall TGenerateUrlDialog(
  75. TComponent * Owner, TSessionData * Data, TFilesSelected FilesSelected, TStrings * Paths,
  76. bool Transfer, bool ToRemote, bool Move, int CopyParamAttrs, const UnicodeString & Path, const TCopyParamType & CopyParam);
  77. void __fastcall Execute();
  78. };
  79. //---------------------------------------------------------------------------
  80. #endif