ImportSessions.h 2.1 KB

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