LocationProfiles.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 <XPGroupBox.hpp>
  18. #include <FileOperationProgress.h>
  19. #include <Terminal.h>
  20. #include <WinInterface.h>
  21. #include <Bookmarks.h>
  22. #include "IEComboBox.hpp"
  23. #include <ComCtrls.hpp>
  24. #include <ImgList.hpp>
  25. //----------------------------------------------------------------------------
  26. class TLocationProfilesDialog : public TForm
  27. {
  28. __published:
  29. TButton *OKBtn;
  30. TButton *CancelBtn;
  31. TXPGroupBox *BookmarksGroup;
  32. TTreeView *ProfilesView;
  33. TButton *AddBookmarkButton;
  34. TButton *RemoveBookmarkButton;
  35. TButton *DownBookmarkButton;
  36. TButton *UpBookmarkButton;
  37. TLabel *LocalDirectoryLabel;
  38. TDirectoryEdit *LocalDirectoryEdit;
  39. TIEComboBox *RemoteDirectoryEdit;
  40. TButton *RenameButton;
  41. TLabel *RemoteDirectoryLabel;
  42. TButton *MoveToButton;
  43. TImageList *BookmarkImageList;
  44. void __fastcall ControlChange(TObject *Sender);
  45. void __fastcall AddBookmarkButtonClick(TObject *Sender);
  46. void __fastcall RemoveBookmarkButtonClick(TObject *Sender);
  47. void __fastcall BookmarkButtonClick(TObject *Sender);
  48. void __fastcall ProfilesViewStartDrag(TObject *Sender,
  49. TDragObject *&DragObject);
  50. void __fastcall ProfilesViewDragOver(TObject *Sender, TObject *Source,
  51. int X, int Y, TDragState State, bool &Accept);
  52. void __fastcall ProfilesViewDragDrop(TObject *Sender, TObject *Source,
  53. int X, int Y);
  54. void __fastcall ProfilesViewDblClick(TObject *Sender);
  55. void __fastcall FormShow(TObject *Sender);
  56. void __fastcall ProfilesViewKeyDown(TObject *Sender, WORD &Key,
  57. TShiftState Shift);
  58. void __fastcall DirectoryEditChange(TObject *Sender);
  59. void __fastcall ProfilesViewChange(TObject *Sender, TTreeNode *Node);
  60. void __fastcall MoveToButtonClick(TObject *Sender);
  61. void __fastcall RenameButtonClick(TObject *Sender);
  62. void __fastcall ProfilesViewGetImageIndex(TObject *Sender,
  63. TTreeNode *Node);
  64. void __fastcall ProfilesViewGetSelectedIndex(TObject *Sender,
  65. TTreeNode *Node);
  66. public:
  67. __fastcall TLocationProfilesDialog(TComponent* AOwner);
  68. __fastcall ~TLocationProfilesDialog();
  69. bool __fastcall Execute();
  70. __property AnsiString LocalDirectory = { read = GetLocalDirectory, write = SetLocalDirectory };
  71. __property AnsiString RemoteDirectory = { read = GetRemoteDirectory, write = SetRemoteDirectory };
  72. __property TTerminal * Terminal = { read = FTerminal, write = FTerminal };
  73. __property TOperationSide OperationSide = { read = FOperationSide, write = FOperationSide };
  74. __property TStrings * RemoteDirectories = { read=GetRemoteDirectories, write=SetRemoteDirectories };
  75. __property TOpenDirectoryMode Mode = { read = FMode, write = FMode };
  76. protected:
  77. void __fastcall BookmarkMove(TTreeNode * Source, TTreeNode * Dest);
  78. void __fastcall UpdateControls();
  79. bool __fastcall AddAsBookmark();
  80. private:
  81. TOpenDirectoryMode FMode;
  82. TTerminal * FTerminal;
  83. TOperationSide FOperationSide;
  84. TStringList * FFolders;
  85. bool FChanging;
  86. TTreeNode * FBookmarkDragSource;
  87. TBookmarkList * FBookmarkList;
  88. AnsiString FLocalDirectory;
  89. AnsiString FRemoteDirectory;
  90. void __fastcall SetLocalDirectory(AnsiString value);
  91. AnsiString __fastcall GetLocalDirectory();
  92. void __fastcall SetRemoteDirectory(AnsiString value);
  93. AnsiString __fastcall GetRemoteDirectory();
  94. void __fastcall SetOperationSide(TOperationSide value);
  95. void __fastcall LoadBookmarks();
  96. void __fastcall FindProfile();
  97. void __fastcall SetRemoteDirectories(TStrings * value);
  98. TStrings * __fastcall GetRemoteDirectories();
  99. };
  100. //----------------------------------------------------------------------------
  101. #endif