0
|
1 // Filename : auth.h
|
16
|
2 // Last Change: 2019-07-08 ŒŽ 08:46:18.
|
0
|
3 //
|
|
4
|
16
|
5 #pragma once
|
0
|
6
|
|
7 #include <wx/gdicmn.h>
|
|
8 #include <wx/font.h>
|
|
9 #include <wx/colour.h>
|
|
10 #include <wx/settings.h>
|
3
|
11 #include <wx/button.h>
|
0
|
12 #include <wx/textctrl.h>
|
|
13 #include <wx/sizer.h>
|
|
14 #include <wx/stattext.h>
|
3
|
15 #include <wx/textfile.h>
|
0
|
16 #include <wx/dialog.h>
|
|
17 #include <wx/msgdlg.h>
|
|
18
|
|
19 class AuthDialog : public wxDialog
|
|
20 {
|
|
21 DECLARE_EVENT_TABLE()
|
|
22 private:
|
3
|
23 bool m_load = false;
|
|
24 wxString m_server;
|
|
25 wxString m_user;
|
|
26 wxArrayString m_users;
|
0
|
27
|
|
28 protected:
|
|
29 wxStaticText* m_staticTextId;
|
|
30 wxTextCtrl* m_textCtrlId;
|
|
31 wxStaticText* m_staticTextIdmsg;
|
|
32 wxStaticText* m_staticTextPw;
|
|
33 wxTextCtrl* m_textCtrlPw;
|
|
34 wxStaticText* m_staticTextPwmsg;
|
3
|
35 wxButton* m_buttonLogin;
|
|
36 wxButton* m_buttonCancel;
|
0
|
37
|
|
38 public:
|
|
39 AuthDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
|
|
40 ~AuthDialog();
|
3
|
41
|
|
42 void SetServer( wxString server ) { m_server = server; };
|
|
43 void CreateControls( void );
|
5
|
44 bool LoadDB( void );
|
3
|
45 bool IsValidUser( void );
|
|
46 wxString GetUser( void ) { return m_user; };
|
|
47 void InDevelop( bool );
|
|
48
|
|
49 void OnShow( wxShowEvent& event );
|
|
50 void OnEnter( wxCommandEvent& event );
|
0
|
51 void OnCheckUserID( wxCommandEvent& event );
|
|
52 void OnCheckPassword( wxCommandEvent& event );
|
|
53 };
|
|
54
|