ImportSessions.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //----------------------------------------------------------------------------
  2. #ifndef ImportSessionsH
  3. #define ImportSessionsH
  4. //----------------------------------------------------------------------------
  5. #include <System.Classes.hpp>
  6. #include <Vcl.ComCtrls.hpp>
  7. #include <Vcl.Controls.hpp>
  8. #include <Vcl.StdCtrls.hpp>
  9. #include <Vcl.ExtCtrls.hpp>
  10. //---------------------------------------------------------------------
  11. #include <SessionData.h>
  12. #include <GUITools.h>
  13. //---------------------------------------------------------------------
  14. class TImportSessionsDialog : public TForm
  15. {
  16. __published:
  17. TButton *OKButton;
  18. TButton *CancelButton;
  19. TListView *SessionListView2;
  20. TLabel *Label;
  21. TButton *CheckAllButton;
  22. TButton *HelpButton;
  23. TComboBox *SourceComboBox;
  24. TPanel *ErrorPanel;
  25. TLabel *ErrorLabel;
  26. TButton *PasteButton;
  27. void __fastcall SessionListView2InfoTip(TObject *Sender,
  28. TListItem *Item, UnicodeString &InfoTip);
  29. void __fastcall SessionListView2MouseDown(TObject *Sender,
  30. TMouseButton Button, TShiftState Shift, int X, int Y);
  31. void __fastcall SessionListView2KeyUp(TObject *Sender, WORD &Key,
  32. TShiftState Shift);
  33. void __fastcall FormShow(TObject *Sender);
  34. void __fastcall CheckAllButtonClick(TObject *Sender);
  35. void __fastcall HelpButtonClick(TObject *Sender);
  36. void __fastcall SourceComboBoxSelect(TObject *Sender);
  37. void __fastcall PasteButtonClick(TObject *Sender);
  38. private:
  39. TList * FSessionListsList;
  40. TStrings * FErrors;
  41. std::unique_ptr<TStoredSessionList> FPastedKnownHosts;
  42. int FKnownHostsIndex;
  43. void __fastcall UpdateControls();
  44. void __fastcall LoadSessions();
  45. void __fastcall ClearSelections();
  46. void __fastcall SaveSelection();
  47. TStoredSessionList * __fastcall GetSessionList(int Index);
  48. TSessionData * GetSessionData(TListItem * Item);
  49. virtual void __fastcall CreateHandle();
  50. virtual void __fastcall DestroyHandle();
  51. virtual void __fastcall Dispatch(void * Message);
  52. INTERFACE_HOOK;
  53. public:
  54. virtual __fastcall TImportSessionsDialog(TComponent * AOwner);
  55. void __fastcall Init(TList * SessionListsList, TStrings * Errors);
  56. bool __fastcall Execute();
  57. };
  58. //----------------------------------------------------------------------------
  59. #endif