GenerateUrl.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. TCheckBox *RawSettingsCheck;
  42. void __fastcall ControlChange(TObject *Sender);
  43. void __fastcall ClipboardButtonClick(TObject *Sender);
  44. void __fastcall HelpButtonClick(TObject *Sender);
  45. void __fastcall WMNCCreate(TWMNCCreate & Message);
  46. void __fastcall FormShow(TObject *Sender);
  47. private:
  48. TSessionData * FData;
  49. std::unique_ptr<TStrings> FPaths;
  50. bool FPathsSample;
  51. bool FChanging;
  52. TRichEdit * FResultMemoWithLinks;
  53. bool FTransfer;
  54. bool FToRemote;
  55. bool FMove;
  56. int FCopyParamAttrs;
  57. UnicodeString FPath;
  58. TFilesSelected FFilesSelected;
  59. UnicodeString FSourcePath;
  60. TCopyParamType FCopyParam;
  61. bool FUrlCounted;
  62. bool FScriptCounted;
  63. bool FAssemblyCounted;
  64. protected:
  65. void __fastcall UpdateControls();
  66. UnicodeString __fastcall GenerateUrl(UnicodeString Path);
  67. bool __fastcall IsFileUrl();
  68. virtual void __fastcall CreateParams(TCreateParams & Params);
  69. virtual void __fastcall Dispatch(void * AMessage);
  70. UnicodeString __fastcall GenerateUrl();
  71. UnicodeString __fastcall GenerateScript(UnicodeString & ScriptDescription);
  72. UnicodeString __fastcall GenerateAssemblyCode(UnicodeString & AssemblyDescription);
  73. void __fastcall AddSampleDescription(UnicodeString & Description);
  74. public:
  75. __fastcall TGenerateUrlDialog(
  76. TComponent * Owner, TSessionData * Data, TFilesSelected FilesSelected, TStrings * Paths,
  77. bool Transfer, bool ToRemote, bool Move, int CopyParamAttrs, const UnicodeString & Path, const TCopyParamType & CopyParam);
  78. void __fastcall Execute();
  79. };
  80. //---------------------------------------------------------------------------
  81. #endif