GenerateUrl.h 3.0 KB

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