GenerateUrl.h 3.0 KB

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