lboBusinessNotes,
&NoteCount);
- // Process the
+ // Process the categories (CATEGORIES).
+
+ LoadData(&ContactEditorData.CategoriesList,
+ &ContactEditorData.CategoriesListPref,
+ lboCategories,
+ &CategoryCount);
for (std::map<int,wxString>::iterator iter = ContactFileLines.begin();
iter != ContactFileLines.end(); ++iter){
LoadNote(wxSPropertySeg1, wxSPropertySeg2, &NoteCount);
- }*/ else if (wxSProperty == wxT("CATEGORIES")) {
+ } else if (wxSProperty == wxT("CATEGORIES")) {
// See frmContactEditor-LoadCategory.cpp
LoadCategory(wxSPropertySeg1, wxSPropertySeg2, &CategoryCount);
- } else if (wxSProperty == wxT("PHOTO")) {
+ }*/ else if (wxSProperty == wxT("PHOTO")) {
// See frmContactEditor-LoadPhoto.cpp
long ListCtrlIndex = -1;
- // Deal with the general addresses.
+ // Deal with the general items.
for (std::map<int,wxString>::iterator Iter = GeneralList->begin();
Iter != GeneralList->end();
}
- // Deal with the home addresses.
+ // Deal with the home items.
for (std::map<int,wxString>::iterator Iter = HomeList->begin();
Iter != HomeList->end();
}
- // Deal with the work addresses.
+ // Deal with the work items.
for (std::map<int,wxString>::iterator Iter = BusinessList->begin();
Iter != BusinessList->end();
}
+}
+
+void frmContactEditor::LoadData(std::map<int,wxString> *ItemList,
+ std::map<int,int> *ItemListPref,
+ wxListCtrl *ItemCtrl,
+ int *DataCount){
+
+ long ListCtrlIndex = -1;
+
+ for (std::map<int,wxString>::iterator Iter = ItemList->begin();
+ Iter != ItemList->end();
+ Iter++){
+
+ wxListItem coldata;
+
+ coldata.SetId(*DataCount);
+ coldata.SetData(*DataCount);
+ coldata.SetText(Iter->second);
+
+ ListCtrlIndex = ItemCtrl->InsertItem(coldata);
+
+ if (MapDataExists(DataCount, ItemListPref)){
+
+ ItemCtrl->SetItem(ListCtrlIndex, 1, wxString::Format("%i", ItemListPref->find(*DataCount)->second));
+
+ }
+
+ (*DataCount)++;
+
+ }
+
}
\ No newline at end of file
std::map<int, int> *BusinessTZPref,
wxListCtrl *BusinessListCtrl,
int *DataCount);
+
+ void LoadData(std::map<int,wxString> *ItemList,
+ std::map<int,int> *ItemListPref,
+ wxListCtrl *ItemCtrl,
+ int *DataCount);
void LoadGender(wxString *GenderComponent, wxString *GenderIdentity);
void LoadBirthday(wxString *BirthdayData, bool *BirthdayText);