GenerateUrl.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 FChanging;
  57. TRichEdit41 * FResultMemo41;
  58. bool FTransfer;
  59. bool FToRemote;
  60. bool FMove;
  61. int FCopyParamAttrs;
  62. UnicodeString FPath;
  63. TFilesSelected FFilesSelected;
  64. UnicodeString FSourcePath;
  65. TCopyParamType FCopyParam;
  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();
  75. public:
  76. __fastcall TGenerateUrlDialog(
  77. TComponent * Owner, TSessionData * Data, TFilesSelected FilesSelected, TStrings * Paths,
  78. bool Transfer, bool ToRemote, bool Move, int CopyParamAttrs, const UnicodeString & Path, const TCopyParamType & CopyParam);
  79. void __fastcall Execute();
  80. };
  81. //---------------------------------------------------------------------------
  82. #endif