Authenticate.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //---------------------------------------------------------------------------
  2. #ifndef AuthenticateH
  3. #define AuthenticateH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <ComCtrls.hpp>
  10. #include <ExtCtrls.hpp>
  11. #include "PasswordEdit.hpp"
  12. #include "WinInterface.h"
  13. //---------------------------------------------------------------------------
  14. class TAuthenticateForm : public TForm
  15. {
  16. __published:
  17. TListView *LogView;
  18. TPanel *PasswordPanel;
  19. TPanel *PasswordEditPanel;
  20. TStaticText *PasswordLabel;
  21. TPasswordEdit *PasswordEdit;
  22. TPanel *ServerPromptPanel;
  23. TLabel *ServerPromptLabel;
  24. TCheckBox *HideTypingCheck;
  25. TButton *PasswordOKButton;
  26. TButton *PasswordCancelButton;
  27. TButton *PasswordHelpButton;
  28. TPanel *BannerPanel;
  29. TMemo *BannerMemo;
  30. TCheckBox *NeverShowAgainCheck;
  31. TButton *BannerCloseButton;
  32. TButton *BannerHelpButton;
  33. void __fastcall FormShow(TObject *Sender);
  34. void __fastcall FormResize(TObject *Sender);
  35. void __fastcall HelpButtonClick(TObject *Sender);
  36. void __fastcall HideTypingCheckClick(TObject *Sender);
  37. public:
  38. __fastcall TAuthenticateForm(TComponent * Owner, AnsiString SessionName);
  39. virtual __fastcall ~TAuthenticateForm();
  40. void __fastcall ShowAsModal();
  41. void __fastcall HideAsModal();
  42. void __fastcall Log(const AnsiString Message);
  43. void __fastcall ChangeStatus(const AnsiString Status);
  44. bool __fastcall PromptUser(AnsiString Caption,
  45. TPromptKind Kind, AnsiString &Password);
  46. void __fastcall Banner(const AnsiString & Banner, bool & NeverShowAgain,
  47. int Options);
  48. protected:
  49. void __fastcall ClearLog();
  50. void __fastcall AdjustControls();
  51. void __fastcall UpdateControls();
  52. bool __fastcall Execute(AnsiString Status, TControl * Control,
  53. TWinControl * FocusControl, TButton * DefaultButton, TButton * CancelButton,
  54. bool FixHeight, bool Zoom);
  55. private:
  56. void * FShowAsModalStorage;
  57. TWinControl * FFocusControl;
  58. AnsiString FSessionName;
  59. AnsiString FStatus;
  60. };
  61. //---------------------------------------------------------------------------
  62. #endif