Login.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. //----------------------------------------------------------------------------
  2. #ifndef LoginH
  3. #define LoginH
  4. //----------------------------------------------------------------------------
  5. #include "ComboEdit.hpp"
  6. #include "GeneralSettings.h"
  7. #include "LogSettings.h"
  8. #include "PasswordEdit.hpp"
  9. #include "UpDownEdit.hpp"
  10. #include <System.Classes.hpp>
  11. #include <Vcl.ActnList.hpp>
  12. #include <Vcl.ComCtrls.hpp>
  13. #include <Vcl.Controls.hpp>
  14. #include <Vcl.ExtCtrls.hpp>
  15. #include <Vcl.Forms.hpp>
  16. #include <Vcl.ImgList.hpp>
  17. #include <Vcl.Mask.hpp>
  18. #include <Vcl.Menus.hpp>
  19. #include <Vcl.StdCtrls.hpp>
  20. //----------------------------------------------------------------------------
  21. #include <Configuration.h>
  22. #include <SessionData.h>
  23. #include <PasTools.hpp>
  24. #include "LogSettings.h"
  25. #include "GeneralSettings.h"
  26. #include "PngImageList.hpp"
  27. //----------------------------------------------------------------------------
  28. class TLoginDialog : public TForm
  29. {
  30. __published:
  31. TButton *LoginButton;
  32. TButton *CloseButton;
  33. TButton *AboutButton;
  34. TActionList *ActionList;
  35. TAction *EditSessionAction;
  36. TAction *SaveSessionAction;
  37. TAction *DeleteSessionAction;
  38. TAction *ImportSessionsAction;
  39. TAction *LoginAction;
  40. TAction *AboutAction;
  41. TAction *CleanUpAction;
  42. TAction *NewSessionAction;
  43. TPanel *MainPanel;
  44. TPageControl *PageControl;
  45. TTabSheet *SessionListSheet;
  46. TButton *LoadButton;
  47. TButton *DeleteButton;
  48. TTreeView *SessionTree;
  49. TButton *NewButton;
  50. TTabSheet *BasicSheet;
  51. TTabSheet *AdvancedSheet;
  52. TGroupBox *ProtocolGroup;
  53. TLabel *Label7;
  54. TRadioButton *SshProt1Button;
  55. TRadioButton *SshProt2Button;
  56. TCheckBox *CompressionCheck;
  57. TTabSheet *EnvironmentSheet;
  58. TTabSheet *ScpSheet;
  59. TGroupBox *OtherShellOptionsGroup;
  60. TCheckBox *LookupUserGroupsCheck;
  61. TCheckBox *ClearAliasesCheck;
  62. TCheckBox *UnsetNationalVarsCheck;
  63. TCheckBox *Scp1CompatibilityCheck;
  64. TGroupBox *ShellGroup;
  65. TComboBox *ShellEdit;
  66. TTabSheet *LogSheet;
  67. TLoggingFrame *LoggingFrame;
  68. TTabSheet *GeneralSheet;
  69. TLabel *Label13;
  70. TButton *PreferencesButton;
  71. TGeneralSettingsFrame *GeneralSettingsFrame;
  72. TPanel *LeftPanel;
  73. TTreeView *NavigationTree;
  74. TCheckBox *ShowAdvancedLoginOptionsCheck;
  75. TGroupBox *BasicGroup;
  76. TLabel *Label1;
  77. TLabel *Label2;
  78. TLabel *Label3;
  79. TLabel *Label4;
  80. TLabel *PrivateKeyLabel;
  81. TEdit *HostNameEdit;
  82. TEdit *UserNameEdit;
  83. TPasswordEdit *PasswordEdit;
  84. TUpDownEdit *PortNumberEdit;
  85. TFilenameEdit *PrivateKeyEdit;
  86. TTabSheet *ConnSheet;
  87. TGroupBox *TimeoutGroup;
  88. TLabel *Label11;
  89. TLabel *Label12;
  90. TUpDownEdit *TimeoutEdit;
  91. TTabSheet *ProxySheet;
  92. TGroupBox *ProxyTypeGroup;
  93. TLabel *ProxyHostLabel;
  94. TLabel *ProxyPortLabel;
  95. TUpDownEdit *ProxyPortEdit;
  96. TEdit *ProxyHostEdit;
  97. TEdit *ProxyUsernameEdit;
  98. TLabel *ProxyUsernameLabel;
  99. TLabel *ProxyPasswordLabel;
  100. TPasswordEdit *ProxyPasswordEdit;
  101. TGroupBox *ProxySettingsGroup;
  102. TLabel *ProxyTelnetCommandLabel;
  103. TEdit *ProxyTelnetCommandEdit;
  104. TTabSheet *BugsSheet;
  105. TGroupBox *BugsGroupBox;
  106. TLabel *BugIgnore1Label;
  107. TComboBox *BugIgnore1Combo;
  108. TLabel *BugPlainPW1Label;
  109. TComboBox *BugPlainPW1Combo;
  110. TLabel *BugRSA1Label;
  111. TComboBox *BugRSA1Combo;
  112. TLabel *BugHMAC2Label;
  113. TComboBox *BugHMAC2Combo;
  114. TLabel *BugDeriveKey2Label;
  115. TComboBox *BugDeriveKey2Combo;
  116. TLabel *BugRSAPad2Label;
  117. TComboBox *BugRSAPad2Combo;
  118. TRadioButton *SshProt1onlyButton;
  119. TRadioButton *SshProt2onlyButton;
  120. TTabSheet *AuthSheet;
  121. TGroupBox *AuthenticationGroup;
  122. TCheckBox *AuthTISCheck;
  123. TCheckBox *AuthKICheck;
  124. TGroupBox *EncryptionGroup;
  125. TListBox *CipherListBox;
  126. TLabel *Label8;
  127. TCheckBox *Ssh2LegacyDESCheck;
  128. TButton *CipherUpButton;
  129. TButton *CipherDownButton;
  130. TButton *SetDefaultSessionButton;
  131. TAction *SetDefaultSessionAction;
  132. TButton *ToolsMenuButton;
  133. TPopupMenu *ToolsPopupMenu;
  134. TMenuItem *Import1;
  135. TMenuItem *Cleanup1;
  136. TButton *ShellIconsButton;
  137. TAction *DesktopIconAction;
  138. TGroupBox *EnvironmentGroup;
  139. TPopupMenu *IconsPopupMenu;
  140. TMenuItem *Desktopicon1;
  141. TAction *SendToHookAction;
  142. TMenuItem *ExplorersSendtoshortcut1;
  143. TLabel *BugPKSessID2Label;
  144. TComboBox *BugPKSessID2Combo;
  145. TCheckBox *ProxyLocalhostCheck;
  146. TLabel *Label17;
  147. TAction *CheckForUpdatesAction;
  148. TMenuItem *CheckForUpdates1;
  149. TButton *SaveButton;
  150. TButton *LanguagesButton;
  151. TGroupBox *PingGroup;
  152. TLabel *PingIntervalLabel;
  153. TUpDownEdit *PingIntervalSecEdit;
  154. TRadioButton *PingOffButton;
  155. TRadioButton *PingNullPacketButton;
  156. TRadioButton *PingDummyCommandButton;
  157. TCheckBox *AuthKIPasswordCheck;
  158. TTabSheet *DirectoriesSheet;
  159. TGroupBox *DirectoriesGroup;
  160. TLabel *LocalDirectoryLabel;
  161. TLabel *RemoteDirectoryLabel;
  162. TLabel *LocalDirectoryDescLabel;
  163. TDirectoryEdit *LocalDirectoryEdit;
  164. TEdit *RemoteDirectoryEdit;
  165. TCheckBox *UpdateDirectoriesCheck;
  166. TCheckBox *CacheDirectoriesCheck;
  167. TCheckBox *ResolveSymlinksCheck;
  168. TCheckBox *CacheDirectoryChangesCheck;
  169. TCheckBox *PreserveDirectoryChangesCheck;
  170. TGroupBox *DSTModeGroup;
  171. TRadioButton *DSTModeUnixCheck;
  172. TRadioButton *DSTModeWinCheck;
  173. TGroupBox *ScpLsOptionsGroup;
  174. TCheckBox *IgnoreLsWarningsCheck;
  175. TCheckBox *SCPLsFullTimeAutoCheck;
  176. TTabSheet *SftpSheet;
  177. TGroupBox *SFTPBugsGroupBox;
  178. TLabel *Label10;
  179. TLabel *Label36;
  180. TComboBox *SFTPBugSymlinkCombo;
  181. TTabSheet *KexSheet;
  182. TGroupBox *KexOptionsGroup;
  183. TLabel *Label28;
  184. TListBox *KexListBox;
  185. TButton *KexUpButton;
  186. TButton *KexDownButton;
  187. TGroupBox *KexReexchangeGroup;
  188. TLabel *Label31;
  189. TUpDownEdit *RekeyTimeEdit;
  190. TLabel *Label32;
  191. TEdit *RekeyDataEdit;
  192. TGroupBox *IPvGroup;
  193. TRadioButton *IPAutoButton;
  194. TRadioButton *IPv4Button;
  195. TRadioButton *IPv6Button;
  196. TLabel *BugRekey2Label;
  197. TComboBox *BugRekey2Combo;
  198. TGroupBox *SFTPProtocolGroup;
  199. TLabel *Label34;
  200. TComboBox *SFTPMaxVersionCombo;
  201. TComboBox *SFTPBugSignedTSCombo;
  202. TButton *HelpButton;
  203. TButton *ColorButton;
  204. TPopupMenu *ColorPopupMenu;
  205. TMenuItem *ColorDefaultItem;
  206. TMenuItem *PickColorItem;
  207. TImageList *ColorImageList;
  208. TButton *RenameButton;
  209. TAction *RenameSessionAction;
  210. TGroupBox *DirectoryOptionsGroup;
  211. TTabSheet *TunnelSheet;
  212. TGroupBox *TunnelSessionGroup;
  213. TLabel *Label6;
  214. TLabel *Label14;
  215. TLabel *Label15;
  216. TLabel *Label16;
  217. TLabel *Label18;
  218. TEdit *TunnelHostNameEdit;
  219. TEdit *TunnelUserNameEdit;
  220. TPasswordEdit *TunnelPasswordEdit;
  221. TUpDownEdit *TunnelPortNumberEdit;
  222. TFilenameEdit *TunnelPrivateKeyEdit;
  223. TLabel *Label19;
  224. TComboBox *ReturnVarEdit;
  225. TLabel *Label20;
  226. TGroupBox *AuthenticationParamsGroup;
  227. TCheckBox *AgentFwdCheck;
  228. TCheckBox *TunnelCheck;
  229. TGroupBox *TunnelOptionsGroup;
  230. TLabel *Label21;
  231. TComboBox *TunnelLocalPortNumberEdit;
  232. TRadioButton *DSTModeKeepCheck;
  233. TGroupBox *ConnectionGroup;
  234. TCheckBox *FtpPasvModeCheck;
  235. TTabSheet *RecycleBinSheet;
  236. TGroupBox *RecycleBinGroup;
  237. TLabel *RecycleBinPathLabel;
  238. TCheckBox *DeleteToRecycleBinCheck;
  239. TCheckBox *OverwrittenToRecycleBinCheck;
  240. TEdit *RecycleBinPathEdit;
  241. TLabel *EOLTypeLabel;
  242. TComboBox *EOLTypeCombo;
  243. TLabel *UtfLabel;
  244. TComboBox *UtfCombo;
  245. TLabel *TimeDifferenceLabel;
  246. TUpDownEdit *TimeDifferenceEdit;
  247. TLabel *TimeDifferenceHoursLabel;
  248. TUpDownEdit *TimeDifferenceMinutesEdit;
  249. TLabel *TimeDifferenceMinutesLabel;
  250. TAction *ShellIconSessionAction;
  251. TLabel *Label9;
  252. TComboBox *ListingCommandEdit;
  253. TCheckBox *SshNoUserAuthCheck;
  254. TCheckBox *TryAgentCheck;
  255. TLabel *ProxyMethodLabel;
  256. TComboBox *SshProxyMethodCombo;
  257. TComboBox *ProxyDNSCombo;
  258. TComboBox *FtpProxyMethodCombo;
  259. TLabel *ProxyLocalCommandLabel;
  260. TEdit *ProxyLocalCommandEdit;
  261. TButton *ProxyLocalCommandBrowseButton;
  262. TStaticText *ProxyTelnetCommandHintText;
  263. TStaticText *ProxyLocalCommandHintText;
  264. TPngImageList *SessionImageList;
  265. TButton *NewFolderButton;
  266. TAction *NewSessionFolderAction;
  267. TGroupBox *FtpPingGroup;
  268. TLabel *FtpPingIntervalLabel;
  269. TUpDownEdit *FtpPingIntervalSecEdit;
  270. TRadioButton *FtpPingOffButton;
  271. TRadioButton *FtpPingNullPacketButton;
  272. TRadioButton *FtpPingDummyCommandButton;
  273. TLabel *Label23;
  274. TComboBox *SftpServerEdit;
  275. TTabSheet *FtpSheet;
  276. TGroupBox *FtpGroup;
  277. TLabel *Label25;
  278. TMemo *PostLoginCommandsMemo;
  279. TLabel *BugMaxPkt2Label;
  280. TComboBox *BugMaxPkt2Combo;
  281. TLabel *FtpListAllLabel;
  282. TComboBox *FtpListAllCombo;
  283. TComboBox *FtpForcePasvIpCombo;
  284. TLabel *Label22;
  285. TComboBox *TransferProtocolCombo;
  286. TComboBox *FtpsCombo;
  287. TCheckBox *AllowScpFallbackCheck;
  288. TLabel *FtpsLabel;
  289. TEdit *FtpAccountEdit;
  290. TLabel *FtpAccountLabel;
  291. TCheckBox *AnonymousLoginCheck;
  292. TCheckBox *BufferSizeCheck;
  293. TCheckBox *SynchronizeBrowsingCheck;
  294. TGroupBox *GSSAPIGroup;
  295. TCheckBox *AuthGSSAPICheck3;
  296. TCheckBox *GSSAPIFwdTGTCheck;
  297. TLabel *BugIgnore2Label;
  298. TComboBox *BugIgnore2Combo;
  299. TPopupMenu *SaveDropDownMenu;
  300. TMenuItem *Save1;
  301. TMenuItem *Setdefaults1;
  302. TGroupBox *BasicFtpGroup;
  303. TGroupBox *BasicSshGroup;
  304. TLabel *WebDavsLabel;
  305. TComboBox *WebDavsCombo;
  306. TComboBox *WebDavProxyMethodCombo;
  307. TMenuItem *N1;
  308. TMenuItem *N2;
  309. TMenuItem *Pageant1;
  310. TMenuItem *Puttygen1;
  311. TAction *RunPageantAction;
  312. TAction *RunPuttygenAction;
  313. TLabel *Label24;
  314. TComboBox *FtpUseMlsdCombo;
  315. TLabel *FtpForcePasvIpLabel;
  316. TAction *ImportAction;
  317. TAction *ExportAction;
  318. TMenuItem *N3;
  319. TMenuItem *ImportConfiguration1;
  320. TMenuItem *ExportConfiguration1;
  321. TStaticText *SitesIncrementalSearchLabel;
  322. void __fastcall DataChange(TObject *Sender);
  323. void __fastcall FormShow(TObject *Sender);
  324. void __fastcall SessionTreeDblClick(TObject *Sender);
  325. void __fastcall SessionTreeKeyDown(TObject *Sender, WORD &Key,
  326. TShiftState Shift);
  327. void __fastcall EditSessionActionExecute(TObject *Sender);
  328. void __fastcall SaveSessionActionExecute(TObject *Sender);
  329. void __fastcall DeleteSessionActionExecute(TObject *Sender);
  330. void __fastcall ImportSessionsActionExecute(TObject *Sender);
  331. void __fastcall CleanUpActionExecute(TObject *Sender);
  332. void __fastcall AboutActionExecute(TObject *Sender);
  333. void __fastcall ActionListUpdate(TBasicAction *Action,
  334. bool &Handled);
  335. void __fastcall PreferencesButtonClick(TObject *Sender);
  336. void __fastcall NewSessionActionExecute(TObject *Sender);
  337. void __fastcall NavigationTreeChange(TObject *Sender, TTreeNode *Node);
  338. void __fastcall PageControlChange(TObject *Sender);
  339. void __fastcall AlgListBoxStartDrag(TObject *Sender,
  340. TDragObject *&DragObject);
  341. void __fastcall AlgListBoxDragOver(TObject *Sender, TObject *Source,
  342. int X, int Y, TDragState State, bool &Accept);
  343. void __fastcall AlgListBoxDragDrop(TObject *Sender, TObject *Source,
  344. int X, int Y);
  345. void __fastcall CipherButtonClick(TObject *Sender);
  346. void __fastcall SetDefaultSessionActionExecute(TObject *Sender);
  347. void __fastcall ToolsMenuButtonClick(TObject *Sender);
  348. void __fastcall DesktopIconActionExecute(TObject *Sender);
  349. void __fastcall SendToHookActionExecute(TObject *Sender);
  350. void __fastcall CheckForUpdatesActionExecute(TObject *Sender);
  351. void __fastcall LanguagesButtonClick(TObject *Sender);
  352. void __fastcall AuthGSSAPICheck3Click(TObject *Sender);
  353. void __fastcall KexButtonClick(TObject *Sender);
  354. void __fastcall HelpButtonClick(TObject *Sender);
  355. void __fastcall PrivateKeyEditAfterDialog(TObject *Sender,
  356. UnicodeString &Name, bool &Action);
  357. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  358. void __fastcall ColorButtonClick(TObject *Sender);
  359. void __fastcall ColorDefaultItemClick(TObject *Sender);
  360. void __fastcall PickColorItemClick(TObject *Sender);
  361. void __fastcall RenameSessionActionExecute(TObject * Sender);
  362. void __fastcall PathEditBeforeDialog(TObject *Sender, UnicodeString &Name,
  363. bool &Action);
  364. void __fastcall TransferProtocolComboChange(TObject *Sender);
  365. void __fastcall NavigationTreeCollapsing(TObject *Sender,
  366. TTreeNode *Node, bool &AllowCollapse);
  367. void __fastcall ShellIconSessionActionExecute(TObject *Sender);
  368. void __fastcall ProxyLocalCommandBrowseButtonClick(TObject *Sender);
  369. void __fastcall SessionTreeChange(TObject *Sender, TTreeNode *Node);
  370. void __fastcall SessionTreeEdited(TObject *Sender, TTreeNode *Node,
  371. UnicodeString &S);
  372. void __fastcall SessionTreeEditing(TObject *Sender, TTreeNode *Node,
  373. bool &AllowEdit);
  374. void __fastcall SessionTreeCustomDrawItem(TCustomTreeView *Sender,
  375. TTreeNode *Node, TCustomDrawState State, bool &DefaultDraw);
  376. void __fastcall SessionTreeExpandedCollapsed(TObject *Sender, TTreeNode *Node);
  377. void __fastcall SessionTreeCompare(TObject *Sender, TTreeNode *Node1,
  378. TTreeNode *Node2, int Data, int &Compare);
  379. void __fastcall NewSessionFolderActionExecute(TObject *Sender);
  380. void __fastcall SessionTreeStartDrag(TObject *Sender,
  381. TDragObject *&DragObject);
  382. void __fastcall SessionTreeDragDrop(TObject *Sender, TObject *Source,
  383. int X, int Y);
  384. void __fastcall SessionTreeMouseMove(TObject *Sender, TShiftState Shift,
  385. int X, int Y);
  386. void __fastcall SessionTreeEndDrag(TObject *Sender, TObject *Target,
  387. int X, int Y);
  388. void __fastcall AnonymousLoginCheckClick(TObject *Sender);
  389. void __fastcall SaveButtonDropDownClick(TObject *Sender);
  390. void __fastcall SessionTreeExpanding(TObject *Sender, TTreeNode *Node, bool &AllowExpansion);
  391. void __fastcall RunPageantActionExecute(TObject *Sender);
  392. void __fastcall RunPuttygenActionExecute(TObject *Sender);
  393. void __fastcall PortNumberEditChange(TObject *Sender);
  394. void __fastcall ExportActionExecute(TObject *Sender);
  395. void __fastcall ImportActionExecute(TObject *Sender);
  396. void __fastcall SessionTreeKeyPress(TObject *Sender, System::WideChar &Key);
  397. void __fastcall SessionTreeExit(TObject *Sender);
  398. private:
  399. int NoUpdate;
  400. TSessionData * FSessionData;
  401. TSessionData * FEditingSessionData;
  402. TStoredSessionList * FStoredSessions;
  403. int FAlgDragSource, FAlgDragDest;
  404. int FOptions;
  405. TPopupMenu * FLanguagesPopupMenu;
  406. bool FInitialized;
  407. TTabSheet * FSavedTab;
  408. int FSavedSession;
  409. bool FLocaleChanging;
  410. void * FSystemSettings;
  411. UnicodeString FCurrentSessionName;
  412. TColor FColor;
  413. UnicodeString FBeforeDialogPath;
  414. TStringList * FTreeLabels;
  415. TWndMethod FOldSessionTreeProc;
  416. TTreeNode * FHintNode;
  417. TTreeViewScrollOnDragOver * FScrollOnDragOver;
  418. int FDefaultPort;
  419. TList * FDataList;
  420. bool FUpdatePortWithProtocol;
  421. UnicodeString FSitesIncrementalSearch;
  422. int FIncrementalSearching;
  423. bool FSitesIncrementalSearchHaveNext;
  424. void __fastcall LoadSession(TSessionData * aSessionData);
  425. void __fastcall UpdateControls();
  426. void __fastcall SetSessionData(TSessionData * value);
  427. TSessionData * __fastcall GetSessionData();
  428. void __fastcall SaveSession(TSessionData * aStoredSession);
  429. void __fastcall LoadSessions();
  430. TSessionData * __fastcall GetSelectedSession();
  431. void __fastcall CMDialogKey(TWMKeyDown & Message);
  432. void __fastcall WMHelp(TWMHelp & Message);
  433. int __fastcall FSProtocolToIndex(TFSProtocol FSProtocol, bool & AllowScpFallback);
  434. TFSProtocol __fastcall IndexToFSProtocol(int Index, bool AllowScpFallback);
  435. int __fastcall LastSupportedFtpProxyMethod();
  436. bool __fastcall SupportedFtpProxyMethod(int Method);
  437. int __fastcall GetSupportedFtpProxyMethod(int Method);
  438. int __fastcall GetSupportedWebDavProxyMethod(int Method);
  439. TProxyMethod __fastcall GetProxyMethod();
  440. int __fastcall GetFtpProxyLogonType();
  441. TFtps __fastcall GetFtps();
  442. TFSProtocol __fastcall GetFSProtocol();
  443. bool __fastcall IsSshProtocol(TFSProtocol FSProtocol);
  444. void __fastcall UpdateNavigationTree();
  445. void __fastcall UpdateTree(TTreeNode * ANode, bool Recursive);
  446. void __fastcall UpdateFolderNode(TTreeNode * Node);
  447. TTreeNode * __fastcall AddSession(TSessionData * Data);
  448. TTreeNode * __fastcall AddSessionPath(UnicodeString Path,
  449. bool CanCreate, bool IsWorkspace);
  450. void __fastcall DestroySession(TSessionData * Data);
  451. void __fastcall CheckDuplicateFolder(TTreeNode * Parent, UnicodeString Text,
  452. TTreeNode * Node);
  453. void __fastcall CheckIsSessionFolder(TTreeNode * Node);
  454. void __fastcall NewSessionFolderInputDialogInitialize(
  455. TObject * Sender, TInputDialogData * Data);
  456. UnicodeString __fastcall SessionNodePath(TTreeNode * Node);
  457. TTreeNode * __fastcall SessionFolderNode(TTreeNode * Node);
  458. TTreeNode * __fastcall CurrentSessionFolderNode();
  459. void __fastcall SessionTreeProc(TMessage & Message);
  460. bool __fastcall SessionAllowDrop(TTreeNode * DropTarget);
  461. int __fastcall DefaultPort();
  462. void __fastcall MasterPasswordRecrypt(TObject * Sender);
  463. void __fastcall SaveOpenedStoredSessionFolders(
  464. TTreeNode * Node, TStrings * OpenedStoredSessionFolders);
  465. void __fastcall LoadOpenedStoredSessionFolders(
  466. TTreeNode * Node, TStrings * OpenedStoredSessionFolders);
  467. bool __fastcall HasNodeAnySession(TTreeNode * Node, bool NeedCanLogin = false);
  468. void __fastcall SaveDataList(TList * DataList);
  469. inline bool __fastcall IsFolderNode(TTreeNode * Node);
  470. inline bool __fastcall IsWorkspaceNode(TTreeNode * Node);
  471. inline bool __fastcall IsFolderOrWorkspaceNode(TTreeNode * Node);
  472. inline bool __fastcall IsSessionNode(TTreeNode * Node);
  473. inline TSessionData * __fastcall GetNodeSession(TTreeNode * Node);
  474. void __fastcall ExecuteTool(const UnicodeString & Name);
  475. UnicodeString __fastcall ImportExportIniFilePath();
  476. void __fastcall ReloadSessions();
  477. void __fastcall ResetSitesIncrementalSearch();
  478. bool __fastcall SitesIncrementalSearch(const UnicodeString & Text,
  479. bool SkipCurrent, bool Reverse);
  480. TTreeNode * __fastcall SearchSite(const UnicodeString & Text,
  481. bool AllowExpanding, bool SkipCurrent, bool Reverse);
  482. TTreeNode * __fastcall GetNextNode(TTreeNode * Node, bool Reverse);
  483. protected:
  484. void __fastcall Default();
  485. void __fastcall LoadConfiguration();
  486. void __fastcall SaveConfiguration();
  487. void __fastcall LoadState();
  488. void __fastcall SaveState();
  489. void __fastcall ShowPreferencesDialog();
  490. void __fastcall ChangePage(TTabSheet * Tab);
  491. virtual void __fastcall Dispatch(void * Message);
  492. bool __fastcall AllowAlgDrag(TListBox * AlgListBox, int X, int Y);
  493. void __fastcall AlgMove(TListBox * AlgListBox, int Source, int Dest);
  494. void __fastcall LocaleClick(TObject * Sender);
  495. void __fastcall LocaleGetClick(TObject * Sender);
  496. void __fastcall Init();
  497. void __fastcall InitControls();
  498. void __fastcall VerifyKey(UnicodeString FileName, bool TypeOnly);
  499. void __fastcall EditSession();
  500. __property TSessionData * SelectedSession = { read=GetSelectedSession };
  501. public:
  502. virtual __fastcall TLoginDialog(TComponent* AOwner);
  503. __fastcall ~TLoginDialog();
  504. void __fastcall Init(TStoredSessionList *SessionList, int Options);
  505. bool __fastcall Execute(TList * DataList);
  506. };
  507. //----------------------------------------------------------------------------
  508. #endif