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.

61 lines
1.2KB

  1. #include "cosmos.h"
  2. cosmos::cosmos( wxWindow* parent )
  3. :
  4. cosmosGUI( parent )
  5. {
  6. fenetre_options = new options(this);
  7. if (fenetre_options->GetConfiguration()->IsFirstTime())
  8. fenetre_options->ShowModal();
  9. bdd = new class_bdd(fenetre_options->GetConfiguration()->GetDbpath());
  10. }
  11. void cosmos::OnImport( wxCommandEvent& event )
  12. {
  13. wxFileDialog * opendialog = new wxFileDialog(this, "Importer", "", "", "*.csv", wxFD_OPEN | wxFD_FILE_MUST_EXIST);
  14. if (opendialog->ShowModal() == wxID_CANCEL)
  15. return;
  16. else
  17. bdd->import(opendialog->GetPath());
  18. delete opendialog;
  19. }
  20. void cosmos::OnExport( wxCommandEvent& event )
  21. {
  22. // TODO: Implement OnExport
  23. }
  24. void cosmos::OnQuit( wxCommandEvent& event )
  25. {
  26. delete bdd;
  27. delete fenetre_options;
  28. this->Close();
  29. }
  30. void cosmos::OnStart( wxCommandEvent& event )
  31. {
  32. // TODO: Implement OnStart
  33. }
  34. void cosmos::OnOptionsRche( wxCommandEvent& event )
  35. {
  36. // TODO: Implement OnOptionsRche
  37. }
  38. void cosmos::OnCorrections( wxCommandEvent& event )
  39. {
  40. // TODO: Implement OnCorrections
  41. }
  42. void cosmos::OnSearch( wxCommandEvent& event )
  43. {
  44. // TODO: Implement OnSearch
  45. }
  46. void cosmos::OnOptionsProg( wxCommandEvent& event )
  47. {
  48. fenetre_options->Show(true);
  49. }