GenerateUrl.h 3.1 KB

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