LocationProfiles.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. //----------------------------------------------------------------------------
  2. #ifndef LocationProfilesH
  3. #define LocationProfilesH
  4. //----------------------------------------------------------------------------
  5. #include <vcl\System.hpp>
  6. #include <vcl\Windows.hpp>
  7. #include <vcl\SysUtils.hpp>
  8. #include <vcl\Classes.hpp>
  9. #include <vcl\Graphics.hpp>
  10. #include <vcl\StdCtrls.hpp>
  11. #include <vcl\Forms.hpp>
  12. #include <vcl\Controls.hpp>
  13. #include <vcl\Buttons.hpp>
  14. #include <vcl\ExtCtrls.hpp>
  15. #include <Mask.hpp>
  16. #include <ComboEdit.hpp>
  17. #include <FileOperationProgress.h>
  18. #include <Terminal.h>
  19. #include <WinInterface.h>
  20. #include <Bookmarks.h>
  21. #include "IEComboBox.hpp"
  22. #include <ComCtrls.hpp>
  23. #include <ImgList.hpp>
  24. #include <PasTools.hpp>
  25. //----------------------------------------------------------------------------
  26. class TLocationProfilesDialog : public TForm
  27. {
  28. __published:
  29. TButton *OKBtn;
  30. TButton *CancelBtn;
  31. TGroupBox *BookmarksGroup;
  32. TTreeView *ProfilesView;
  33. TButton *AddBookmarkButton;
  34. TButton *RemoveBookmarkButton;
  35. TButton *DownBookmarkButton;
  36. TButton *UpBookmarkButton;
  37. TLabel *LocalDirectoryLabel;
  38. TIEComboBox *RemoteDirectoryEdit;
  39. TButton *RenameButton;
  40. TLabel *RemoteDirectoryLabel;
  41. TButton *MoveToButton;
  42. TImageList *BookmarkImageList;
  43. TIEComboBox *LocalDirectoryEdit;
  44. TButton *LocalDirectoryBrowseButton;
  45. TButton *SwitchButton;
  46. TButton *HelpButton;
  47. void __fastcall ControlChange(TObject *Sender);
  48. void __fastcall AddBookmarkButtonClick(TObject *Sender);
  49. void __fastcall RemoveBookmarkButtonClick(TObject *Sender);
  50. void __fastcall BookmarkButtonClick(TObject *Sender);
  51. void __fastcall ProfilesViewStartDrag(TObject *Sender,
  52. TDragObject *&DragObject);
  53. void __fastcall ProfilesViewDragOver(TObject *Sender, TObject *Source,
  54. int X, int Y, TDragState State, bool &Accept);
  55. void __fastcall ProfilesViewDragDrop(TObject *Sender, TObject *Source,
  56. int X, int Y);
  57. void __fastcall ProfilesViewDblClick(TObject *Sender);
  58. void __fastcall FormShow(TObject *Sender);
  59. void __fastcall ProfilesViewKeyDown(TObject *Sender, WORD &Key,
  60. TShiftState Shift);
  61. void __fastcall DirectoryEditChange(TObject *Sender);
  62. void __fastcall ProfilesViewChange(TObject *Sender, TTreeNode *Node);
  63. void __fastcall MoveToButtonClick(TObject *Sender);
  64. void __fastcall RenameButtonClick(TObject *Sender);
  65. void __fastcall ProfilesViewGetImageIndex(TObject *Sender,
  66. TTreeNode *Node);
  67. void __fastcall ProfilesViewGetSelectedIndex(TObject *Sender,
  68. TTreeNode *Node);
  69. void __fastcall LocalDirectoryBrowseButtonClick(TObject *Sender);
  70. void __fastcall SwitchButtonClick(TObject *Sender);
  71. void __fastcall HelpButtonClick(TObject *Sender);
  72. void __fastcall ProfilesViewCollapsed(TObject *Sender, TTreeNode *Node);
  73. void __fastcall ProfilesViewExpanded(TObject *Sender, TTreeNode *Node);
  74. void __fastcall ProfilesViewEdited(TObject * Sender, TTreeNode * Node,
  75. AnsiString & S);
  76. void __fastcall ProfilesViewEditing(TObject * Sender, TTreeNode * Node,
  77. bool & AllowEdit);
  78. void __fastcall ProfilesViewEndDrag(TObject *Sender, TObject *Target,
  79. int X, int Y);
  80. public:
  81. __fastcall TLocationProfilesDialog(TComponent* AOwner);
  82. __fastcall ~TLocationProfilesDialog();
  83. bool __fastcall Execute();
  84. __property AnsiString LocalDirectory = { read = GetLocalDirectory, write = SetLocalDirectory };
  85. __property AnsiString RemoteDirectory = { read = GetRemoteDirectory, write = SetRemoteDirectory };
  86. __property TTerminal * Terminal = { read = FTerminal, write = FTerminal };
  87. __property TOperationSide OperationSide = { read = FOperationSide, write = FOperationSide };
  88. __property TStrings * RemoteDirectories = { read=GetRemoteDirectories, write=SetRemoteDirectories };
  89. __property TStrings * LocalDirectories = { read=GetLocalDirectories, write=SetLocalDirectories };
  90. __property TOpenDirectoryMode Mode = { read = FMode, write = FMode };
  91. protected:
  92. void __fastcall BookmarkMove(TTreeNode * Source, TTreeNode * Dest);
  93. void __fastcall UpdateControls();
  94. bool __fastcall AddAsBookmark();
  95. virtual void __fastcall UpdateActions();
  96. private:
  97. TOpenDirectoryMode FMode;
  98. TTerminal * FTerminal;
  99. TOperationSide FOperationSide;
  100. TStringList * FFolders;
  101. bool FChanging;
  102. TTreeNode * FBookmarkDragSource;
  103. TBookmarkList * FBookmarkList;
  104. AnsiString FLocalDirectory;
  105. AnsiString FRemoteDirectory;
  106. TTreeViewScrollOnDragOver * FScrollOnDragOver;
  107. void __fastcall SetLocalDirectory(AnsiString value);
  108. AnsiString __fastcall GetLocalDirectory();
  109. void __fastcall SetRemoteDirectory(AnsiString value);
  110. AnsiString __fastcall GetRemoteDirectory();
  111. void __fastcall SetOperationSide(TOperationSide value);
  112. void __fastcall LoadBookmarks();
  113. void __fastcall FindProfile();
  114. void __fastcall SetRemoteDirectories(TStrings * value);
  115. TStrings * __fastcall GetRemoteDirectories();
  116. void __fastcall SetLocalDirectories(TStrings * value);
  117. TStrings * __fastcall GetLocalDirectories();
  118. };
  119. //----------------------------------------------------------------------------
  120. #endif