You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
4.3KB

  1. ///////////////////////////////////////////////////////////////////////////
  2. // C++ code generated with wxFormBuilder (version Sep 8 2010)
  3. // http://www.wxformbuilder.org/
  4. //
  5. // PLEASE DO "NOT" EDIT THIS FILE!
  6. ///////////////////////////////////////////////////////////////////////////
  7. #include "optionsGUI.h"
  8. ///////////////////////////////////////////////////////////////////////////
  9. dialog_Options::dialog_Options( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
  10. {
  11. this->SetSizeHints( wxDefaultSize, wxDefaultSize );
  12. wxBoxSizer* verticalsizer;
  13. verticalsizer = new wxBoxSizer( wxVERTICAL );
  14. wxStaticBoxSizer* sizer_db;
  15. sizer_db = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Base de données") ), wxVERTICAL );
  16. statictext_dbpath = new wxStaticText( this, wxID_ANY, wxT("Chemin vers la base de données"), wxDefaultPosition, wxDefaultSize, 0 );
  17. statictext_dbpath->Wrap( -1 );
  18. sizer_db->Add( statictext_dbpath, 0, wxALL|wxEXPAND, 5 );
  19. dirpicker_dbpath = new wxDirPickerCtrl( this, wxID_ANY, wxEmptyString, wxT("Choisir le répertoire"), wxDefaultPosition, wxDefaultSize, wxDIRP_DEFAULT_STYLE|wxDIRP_USE_TEXTCTRL );
  20. sizer_db->Add( dirpicker_dbpath, 0, wxALL|wxEXPAND, 5 );
  21. verticalsizer->Add( sizer_db, 1, wxEXPAND, 5 );
  22. wxStaticBoxSizer* sizer_connexion;
  23. sizer_connexion = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Connexion") ), wxVERTICAL );
  24. checkbox_proxy = new wxCheckBox( this, wxID_ANY, wxT("Utiliser un proxy ?"), wxDefaultPosition, wxDefaultSize, 0 );
  25. checkbox_proxy->SetValue(true);
  26. sizer_connexion->Add( checkbox_proxy, 0, wxALL, 5 );
  27. wxBoxSizer* horizontalsizer_proxy;
  28. horizontalsizer_proxy = new wxBoxSizer( wxHORIZONTAL );
  29. statictext_url = new wxStaticText( this, wxID_ANY, wxT("Adresse"), wxDefaultPosition, wxDefaultSize, 0 );
  30. statictext_url->Wrap( -1 );
  31. horizontalsizer_proxy->Add( statictext_url, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
  32. textctrl_url = new wxTextCtrl( this, wxID_ANY, wxT("www-proxy.chu-nancy.fr"), wxDefaultPosition, wxDefaultSize, 0 );
  33. horizontalsizer_proxy->Add( textctrl_url, 1, wxALIGN_CENTER_VERTICAL, 5 );
  34. statictext_port = new wxStaticText( this, wxID_ANY, wxT("Port"), wxDefaultPosition, wxDefaultSize, 0 );
  35. statictext_port->Wrap( -1 );
  36. horizontalsizer_proxy->Add( statictext_port, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
  37. spinctrl_port = new wxSpinCtrl( this, wxID_ANY, wxT("8080"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 65536, 8080 );
  38. horizontalsizer_proxy->Add( spinctrl_port, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
  39. sizer_connexion->Add( horizontalsizer_proxy, 1, wxALIGN_CENTER|wxEXPAND, 5 );
  40. verticalsizer->Add( sizer_connexion, 1, wxEXPAND, 5 );
  41. wxBoxSizer* horizontalsizer_boutons;
  42. horizontalsizer_boutons = new wxBoxSizer( wxHORIZONTAL );
  43. bouton_annuler = new wxButton( this, wxID_ANY, wxT("Annuler"), wxDefaultPosition, wxDefaultSize, 0 );
  44. horizontalsizer_boutons->Add( bouton_annuler, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
  45. bouton_ok = new wxButton( this, wxID_ANY, wxT("Valider"), wxDefaultPosition, wxDefaultSize, 0 );
  46. horizontalsizer_boutons->Add( bouton_ok, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
  47. verticalsizer->Add( horizontalsizer_boutons, 0, wxALIGN_RIGHT, 5 );
  48. this->SetSizer( verticalsizer );
  49. this->Layout();
  50. this->Centre( wxBOTH );
  51. // Connect Events
  52. this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( dialog_Options::OnCancel ) );
  53. checkbox_proxy->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_Options::OnToggleProxy ), NULL, this );
  54. bouton_annuler->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialog_Options::OnCancel ), NULL, this );
  55. bouton_ok->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialog_Options::OnOk ), NULL, this );
  56. }
  57. dialog_Options::~dialog_Options()
  58. {
  59. // Disconnect Events
  60. this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( dialog_Options::OnCancel ) );
  61. checkbox_proxy->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_Options::OnToggleProxy ), NULL, this );
  62. bouton_annuler->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialog_Options::OnCancel ), NULL, this );
  63. bouton_ok->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialog_Options::OnOk ), NULL, this );
  64. }