14DIALOG_DATABASE_LIB_SETTINGS_BASE::DIALOG_DATABASE_LIB_SETTINGS_BASE( wxWindow* parent, wxWindowID
id,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style ) :
DIALOG_SHIM( parent, id, title, pos, size, style )
16 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
18 wxBoxSizer* bmainSizer;
19 bmainSizer =
new wxBoxSizer( wxVERTICAL );
22 m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
26 bmainSizer->Add(
m_infoBar, 0, wxEXPAND|wxBOTTOM, 5 );
28 wxBoxSizer* bupperSizer;
29 bupperSizer =
new wxBoxSizer( wxVERTICAL );
31 wxStaticBoxSizer* sbSizer4;
32 sbSizer4 =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Connection") ), wxVERTICAL );
34 wxGridBagSizer* gbSizer2;
35 gbSizer2 =
new wxGridBagSizer( 0, 0 );
36 gbSizer2->SetFlexibleDirection( wxBOTH );
37 gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
39 m_rbDSN =
new wxRadioButton( sbSizer4->GetStaticBox(), wxID_ANY,
_(
"DSN:"), wxDefaultPosition, wxDefaultSize, 0 );
40 gbSizer2->Add(
m_rbDSN, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
42 m_txtDSN =
new wxTextCtrl( sbSizer4->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
43 gbSizer2->Add(
m_txtDSN, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxALL|wxEXPAND, 5 );
45 m_staticText2 =
new wxStaticText( sbSizer4->GetStaticBox(), wxID_ANY,
_(
"Username:"), wxDefaultPosition, wxDefaultSize, 0 );
47 gbSizer2->Add(
m_staticText2, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
49 m_txtUser =
new wxTextCtrl( sbSizer4->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
50 m_txtUser->SetMinSize( wxSize( 150,-1 ) );
52 gbSizer2->Add(
m_txtUser, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
54 m_staticText3 =
new wxStaticText( sbSizer4->GetStaticBox(), wxID_ANY,
_(
"Password:"), wxDefaultPosition, wxDefaultSize, 0 );
56 gbSizer2->Add(
m_staticText3, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
58 m_txtPassword =
new wxTextCtrl( sbSizer4->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
61 gbSizer2->Add(
m_txtPassword, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
64 gbSizer2->AddGrowableCol( 2 );
66 sbSizer4->Add( gbSizer2, 1, wxALL|wxEXPAND, 5 );
69 bSizer4 =
new wxBoxSizer( wxVERTICAL );
71 m_rbConnectionString =
new wxRadioButton( sbSizer4->GetStaticBox(), wxID_ANY,
_(
"Connection String:"), wxDefaultPosition, wxDefaultSize, 0 );
74 m_txtConnectionString =
new wxTextCtrl( sbSizer4->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
80 sbSizer4->Add( bSizer4, 0, wxALL|wxEXPAND, 5 );
83 bSizer5 =
new wxBoxSizer( wxHORIZONTAL );
85 m_btnTest =
new wxButton( sbSizer4->GetStaticBox(), wxID_ANY,
_(
"Test"), wxDefaultPosition, wxDefaultSize, 0 );
86 bSizer5->Add(
m_btnTest, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
88 m_stConnectionTestStatus =
new wxStaticText( sbSizer4->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_MIDDLE );
93 sbSizer4->Add( bSizer5, 0, wxALL|wxEXPAND, 5 );
96 bupperSizer->Add( sbSizer4, 0, wxALL|wxEXPAND, 5 );
98 wxStaticBoxSizer* sbSizer2;
99 sbSizer2 =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Libraries") ), wxHORIZONTAL );
102 bSizer6 =
new wxBoxSizer( wxHORIZONTAL );
104 m_btnReloadConfig =
new wxButton( sbSizer2->GetStaticBox(), wxID_ANY,
_(
"Reload Configuration"), wxDefaultPosition, wxDefaultSize, 0 );
109 m_stLibrariesStatus =
new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
114 sbSizer2->Add( bSizer6, 1, wxALL|wxEXPAND, 5 );
117 bupperSizer->Add( sbSizer2, 0, wxALL|wxEXPAND, 5 );
119 wxStaticBoxSizer* sbSizer3;
120 sbSizer3 =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Caching") ), wxVERTICAL );
122 wxFlexGridSizer* fgSizer1;
123 fgSizer1 =
new wxFlexGridSizer( 0, 2, 0, 0 );
124 fgSizer1->SetFlexibleDirection( wxBOTH );
125 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
127 m_staticText5 =
new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY,
_(
"Cache size:"), wxDefaultPosition, wxDefaultSize, 0 );
129 m_staticText5->SetToolTip(
_(
"How many database queries to cache") );
131 fgSizer1->Add(
m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
133 m_spinCacheSize =
new wxSpinCtrl( sbSizer3->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1024, 256 );
138 m_staticText6 =
new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY,
_(
"Cache timeout:"), wxDefaultPosition, wxDefaultSize, 0 );
140 m_staticText6->SetToolTip(
_(
"Time in seconds that database queries will be cached for") );
142 fgSizer1->Add(
m_staticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
144 m_spinCacheTimeout =
new wxSpinCtrl( sbSizer3->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 600, 10 );
145 m_spinCacheTimeout->SetToolTip(
_(
"Time in seconds that database queries will be cached for") );
150 sbSizer3->Add( fgSizer1, 1, wxEXPAND, 5 );
153 bupperSizer->Add( sbSizer3, 1, wxALL|wxEXPAND, 5 );
156 bmainSizer->Add( bupperSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 6 );
158 wxBoxSizer* m_buttonsSizer;
159 m_buttonsSizer =
new wxBoxSizer( wxHORIZONTAL );
162 m_buttonsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
171 m_buttonsSizer->Add(
m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
174 bmainSizer->Add( m_buttonsSizer, 0, wxEXPAND|wxLEFT, 5 );
177 this->SetSizer( bmainSizer );
wxStaticText * m_stLibrariesStatus
wxStaticText * m_stConnectionTestStatus
virtual void OnConnectionStringSelected(wxCommandEvent &event)
wxStaticText * m_staticText2
wxStaticText * m_staticText6
virtual void OnClose(wxCloseEvent &event)
virtual void OnBtnTest(wxCommandEvent &event)
~DIALOG_DATABASE_LIB_SETTINGS_BASE()
virtual void OnBtnReloadConfig(wxCommandEvent &event)
virtual void OnDSNSelected(wxCommandEvent &event)
wxStaticText * m_staticText5
wxStdDialogButtonSizer * m_sdbSizer1
wxButton * m_btnReloadConfig
wxButton * m_sdbSizer1Cancel
DIALOG_DATABASE_LIB_SETTINGS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Database Library Settings"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(500, 600), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxSpinCtrl * m_spinCacheSize
wxRadioButton * m_rbConnectionString
virtual void OnApplyClick(wxCommandEvent &event)
wxTextCtrl * m_txtPassword
wxTextCtrl * m_txtConnectionString
wxSpinCtrl * m_spinCacheTimeout
wxStaticText * m_staticText3
virtual void OnCloseClick(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
A modified version of the wxInfoBar class that allows us to: