int XTokenCount = 0;
//int intValueSeek = 1;
- // Process the Gender (GENDER).
+ // Process the Birthday (BDAY) (frmContactEditor-LoadBADays.cpp)
+
+ LoadBirthday(&ContactEditorData.Birthday, &ContactEditorData.BirthdayText);
+
+ // Process the Anniversary (ANNIVERSARY) (frmContactEditor-LoadBADays.cpp)
+
+ LoadAnniversary(&ContactEditorData.Anniversary, &ContactEditorData.AnniversaryText);
+
+ // Process the Gender (GENDER) (frmContactEditor-LoadGender.cpp)
LoadGender(&ContactEditorData.Gender, &ContactEditorData.GenderDetails);
LoadNickname(wxSPropertySeg1, wxSPropertySeg2, &NicknameCount, &ContactData);
- } else if (wxSProperty == wxT("GENDER") && GenderProcessed == FALSE){
+ }/* else if (wxSProperty == wxT("GENDER") && GenderProcessed == FALSE){
// See frmContactEditor-LoadGender.cpp
- //LoadGender(wxSPropertySeg1, wxSPropertySeg2, &GenderProcessed, &ContactData);
+ LoadGender(wxSPropertySeg1, wxSPropertySeg2, &GenderProcessed, &ContactData);
} else if (wxSProperty == wxT("BDAY") && BirthdayProcessed == FALSE){
LoadAnniversary(wxSPropertySeg1, wxSPropertySeg2, &AnniversaryProcessed);
- } else if (wxSProperty == wxT("TZ")){
+ }*/ else if (wxSProperty == wxT("TZ")){
// See frmContactEditor-LoadTimeZone.cpp
#include "frmContactEditor.h"
+void frmContactEditor::LoadBirthday(wxString *BirthdayData, bool *BirthdayText){
+
+ if (*BirthdayText == FALSE){
+
+ int DateYear = 0;
+ wxDateTime::Month DateMonth;
+ unsigned int DateDay;
+
+ wxString wxSData;
+
+ if (Birthday.Mid(0, 2) == wxT("--")){
+
+ // Skip year.
+
+ } else {
+
+ DateYear = wxAtoi(BirthdayData->Mid(0,4));
+
+ }
+
+ DateMonth = (wxDateTime::Month)(wxAtoi(BirthdayData->Mid(4,2)) - 1);
+ DateDay = wxAtoi(BirthdayData->Mid(6,2));
+
+ wxDateTime BDayDate(DateDay,DateMonth,DateYear);
+
+ dapBirthday->SetValue(BDayDate);
+
+ } else {
+
+ txtBirthday->SetValue(*BirthdayData);
+
+ }
+
+}
+
+void frmContactEditor::LoadAnniversary(wxString *AnniversaryData, bool *AnniversaryText){
+
+ if (*AnniversaryText == FALSE){
+
+ int DateYear = 0;
+ wxDateTime::Month DateMonth;
+ int DateDay;
+
+ wxString wxSData;
+
+ if (Anniversary.Mid(0, 2) == wxT("--")){
+
+ // Skip year.
+
+ } else {
+
+ DateYear = wxAtoi(AnniversaryData->Mid(0,4));
+
+ }
+
+ DateMonth = (wxDateTime::Month)(wxAtoi(AnniversaryData->Mid(4,2)) - 1);
+ DateDay = wxAtoi(AnniversaryData->Mid(6,2));
+
+ wxDateTime ADayDate(DateDay,DateMonth,DateYear);
+
+ dapAnniversary->SetValue(ADayDate);
+
+ } else {
+
+ txtAnniversary->SetValue(*AnniversaryData);
+
+ }
+
+}
+
void frmContactEditor::LoadBDay(wxString wxSPropertySeg1, wxString wxSPropertySeg2, bool *BirthdayProcessed){
// Process date. Preserve the remainder in the string.
void LoadKey(wxString wxSPropertySeg1, wxString wxSPropertySeg2, int *KeyCount);
void LoadGender(wxString *GenderComponent, wxString *GenderIdentity);
+ void LoadBirthday(wxString *BirthdayData, bool *BirthdayText);
+ void LoadAnniversary(wxString *AnniversaryData, bool *AnniversaryText);
int intValueSeek = 1;
bool IsGroup = FALSE;