-//////////////////////////////////////////////////////////////////////////////////
-// BJO 20000115 : New stuff : dialog to ask for username and password
-//////////////////////////////////////////////////////////////////////////////////
-class UserDialog : public wxDialog
-{
- public:
- UserDialog(wxWindow* parent);
- virtual ~UserDialog();
- void OnOK(wxCommandEvent& event);
- wxString s_UserName, s_Password;
-
- private:
- wxButton *m_OK;
- wxStaticText *m_Label1, *m_Label2;
- wxTextCtrl *m_UserName, *m_Password;
-
-
- DECLARE_EVENT_TABLE()
-};
-//---------------------------------------------------------------------------
-BEGIN_EVENT_TABLE(UserDialog, wxDialog)
- EVT_BUTTON(wxID_OK, UserDialog::OnOK)
-END_EVENT_TABLE()
-//---------------------------------------------------------------------------
-UserDialog::UserDialog(wxWindow *parent):
- wxDialog(parent, -1, _("ODBC user"),wxDefaultPosition, wxSize(310, 300),wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE)
-{
- wxLayoutConstraints* layout;
- SetAutoLayout(TRUE);
- //-----------------------------------------------
- m_OK = new wxButton(this, wxID_OK, _("Ok"));
- layout = new wxLayoutConstraints;
- layout->left.SameAs(this, wxLeft, 10);
- layout->top.SameAs(this, wxTop,10);
- layout->height.AsIs();
- layout->width.Absolute(75);
- m_OK->SetConstraints(layout);
-
- m_Label1 = new wxStaticText(this, -1, _("User name:"));
- layout = new wxLayoutConstraints;
- layout->left.SameAs(m_OK, wxLeft);
- layout->top.SameAs(m_OK, wxBottom, 10);
- layout->height.AsIs();
- layout->width.AsIs();
- m_Label1->SetConstraints(layout);