|
|
@@ -5,11 +5,49 @@ optionsRche::optionsRche( wxWindow* parent, config* configuration ) |
|
|
|
dialog_optionsRche( parent ) |
|
|
|
{ |
|
|
|
this->configuration = configuration; |
|
|
|
int nbrule = configuration->getnbrule(); |
|
|
|
for (int i=0; i<nbrule; i++) |
|
|
|
{ |
|
|
|
wxString nom = configuration->getrule(i).name; |
|
|
|
checklist_ruleset->InsertItems(1, &nom, i); |
|
|
|
if (configuration->getrule(i).inuse) |
|
|
|
checklist_ruleset->Check(i); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void optionsRche::OnChecklistSelect( wxCommandEvent& event ) |
|
|
|
{ |
|
|
|
// TODO: Implement OnChecklistSelect |
|
|
|
rule currentrule = configuration->getrule(event.GetInt()); |
|
|
|
|
|
|
|
textctrl_nomset->SetValue(currentrule.name); |
|
|
|
|
|
|
|
radio_demandeur->SetSelection(currentrule.demandeur); |
|
|
|
radio_both->SetSelection(currentrule.both); |
|
|
|
radio_responsable->SetSelection(currentrule.responsable); |
|
|
|
|
|
|
|
radio_delai->SetValue(!currentrule.type_date); |
|
|
|
radio_dates->SetValue(currentrule.type_date); |
|
|
|
|
|
|
|
checkbox_debut->SetValue(currentrule.usedebut); |
|
|
|
checkbox_fin->SetValue(currentrule.usefin); |
|
|
|
|
|
|
|
if (currentrule.type_date == delai) |
|
|
|
{ |
|
|
|
spinctrl_debut->SetValue(currentrule.debut); |
|
|
|
spinctrl_fin->SetValue(currentrule.fin); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
//TODO: conversions wxDateTime <-> int |
|
|
|
} |
|
|
|
|
|
|
|
checkbox_ville->SetValue(currentrule.useville); |
|
|
|
textctrl_ville->SetValue(currentrule.ville); |
|
|
|
|
|
|
|
checkbox_suppl->SetValue(currentrule.usesuppl); |
|
|
|
textctrl_suppl->SetValue(currentrule.suppl); |
|
|
|
|
|
|
|
spinctrl_retmax->SetValue(currentrule.retmax); |
|
|
|
} |
|
|
|
|
|
|
|
void optionsRche::OnAdd( wxCommandEvent& event ) |
|
|
@@ -39,6 +77,8 @@ void optionsRche::OnUpdate( wxCommandEvent& event ) |
|
|
|
|
|
|
|
void optionsRche::OnOk( wxCommandEvent& event ) |
|
|
|
{ |
|
|
|
//TODO: actualiser les checkés ! |
|
|
|
//TODO: sauvegarder la config !!!! |
|
|
|
Close(); |
|
|
|
} |
|
|
|
|
|
|
|