|
|
@@ -6,6 +6,7 @@ dialog_resultats( parent ) |
|
|
|
{ |
|
|
|
this->bdd = bdd; |
|
|
|
this->grid = grid; |
|
|
|
changed = false; |
|
|
|
} |
|
|
|
|
|
|
|
void resultats::OnCellClick( wxGridEvent& event ) |
|
|
@@ -17,23 +18,44 @@ void resultats::OnCellClick( wxGridEvent& event ) |
|
|
|
|
|
|
|
void resultats::OnCheckPubli( wxCommandEvent& event ) |
|
|
|
{ |
|
|
|
// TODO: Implement OnCheckPubli |
|
|
|
list_publi[currentpubli] = list_publi[currentpubli].AfterLast('!').AfterLast('@'); |
|
|
|
switch (checkbox_publi->Get3StateValue()) |
|
|
|
{ |
|
|
|
case wxCHK_CHECKED: list_publi[currentpubli] = "@" + list_publi[currentpubli]; |
|
|
|
grid_publis->SetCellBackgroundColour(currentpubli, 0, *wxGREEN); |
|
|
|
break; |
|
|
|
case wxCHK_UNDETERMINED: list_publi[currentpubli] = "!" + list_publi[currentpubli]; |
|
|
|
grid_publis->SetCellBackgroundColour(currentpubli, 0, *wxLIGHT_GREY); |
|
|
|
break; |
|
|
|
default: grid_publis->SetCellBackgroundColour(currentpubli, 0, grid_publis->GetDefaultCellBackgroundColour()); |
|
|
|
break; |
|
|
|
} |
|
|
|
changed = true; |
|
|
|
} |
|
|
|
|
|
|
|
void resultats::OnPrev( wxCommandEvent& event ) |
|
|
|
{ |
|
|
|
if (changed) |
|
|
|
bdd->setidresult(grid->GetCellValue(currentrow, 13), list_publi); |
|
|
|
changed = false; |
|
|
|
currentrow--; |
|
|
|
update(); |
|
|
|
} |
|
|
|
|
|
|
|
void resultats::OnNext( wxCommandEvent& event ) |
|
|
|
{ |
|
|
|
if (changed) |
|
|
|
bdd->setidresult(grid->GetCellValue(currentrow, 13), list_publi); |
|
|
|
changed = false; |
|
|
|
currentrow++; |
|
|
|
update(); |
|
|
|
} |
|
|
|
|
|
|
|
void resultats::OnOk( wxCommandEvent& event ) |
|
|
|
{ |
|
|
|
if (changed) |
|
|
|
bdd->setidresult(grid->GetCellValue(currentrow, 13), list_publi); |
|
|
|
changed = false; |
|
|
|
Close(); |
|
|
|
} |
|
|
|
|
|
|
@@ -71,6 +93,18 @@ void resultats::update() |
|
|
|
grid_publis->SelectRow(currentpubli); |
|
|
|
update_detail(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
textctrl_titre->SetValue(""); |
|
|
|
textctrl_auteurs->SetValue(""); |
|
|
|
textctrl_abstract->SetValue(""); |
|
|
|
textctrl_revue->SetValue(""); |
|
|
|
statictext_date->SetLabel("Date de publication : "); |
|
|
|
hyperlink_lien->SetURL(""); |
|
|
|
hyperlink_lien->Disable(); |
|
|
|
checkbox_publi->Set3StateValue(wxCHK_UNCHECKED); |
|
|
|
checkbox_publi->Disable(); |
|
|
|
} |
|
|
|
if (currentrow == 0) |
|
|
|
bouton_prec->Disable(); |
|
|
|
else |
|
|
@@ -90,7 +124,9 @@ void resultats::update_detail() |
|
|
|
textctrl_abstract->SetValue(detail_publi[2]); |
|
|
|
textctrl_revue->SetValue(detail_publi[3]); |
|
|
|
statictext_date->SetLabel("Date de publication : " + detail_publi[5]); |
|
|
|
hyperlink_lien->Enable(); |
|
|
|
hyperlink_lien->SetURL(detail_publi[4]); |
|
|
|
checkbox_publi->Enable(); |
|
|
|
wxCheckBoxState etat; |
|
|
|
if (list_publi[currentpubli].Left(1) == "!") |
|
|
|
etat = wxCHK_UNDETERMINED; |
|
|
|