Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Implemented loading for TZ using ContactDataObject.
[xestiaab/.git] / source / contacteditor / frmContactEditor-Load.cpp
index a0f67ea..c8e1362 100644 (file)
@@ -90,13 +90,13 @@ bool frmContactEditor::LoadContact(wxString Filename){
        bool HasExtraNicknames = FALSE;
        bool IgnoreGender = FALSE;
        bool ExtraLineSeek = TRUE;
-       bool BirthdayProcessed = FALSE;
-       bool AnniversaryProcessed = FALSE;
+       //bool BirthdayProcessed = FALSE;
+       //bool AnniversaryProcessed = FALSE;
        bool FNProcessed = FALSE;
        bool GenderProcessed = FALSE;
        bool NameProcessed = FALSE;
-       bool UIDProcessed = FALSE;
-       bool KindProcessed = FALSE;
+       //bool UIDProcessed = FALSE;
+       //bool KindProcessed = FALSE;
        bool ETagFound = FALSE;
        bool ETagOrigFound = FALSE;
        bool VersionProcessed = FALSE;
@@ -136,6 +136,10 @@ bool frmContactEditor::LoadContact(wxString Filename){
        int XTokenCount = 0;
        //int intValueSeek = 1;
 
+       // Process the unique ID (UID)
+       
+       UIDToken = ContactEditorData.UIDToken;
+
        // Process the contact type (KIND) (frmContactEditor-LoadGroup.cpp)
 
        LoadKind(&ContactEditorData.ContactKind);
@@ -151,6 +155,45 @@ bool frmContactEditor::LoadContact(wxString Filename){
        // Process the Gender (GENDER) (frmContactEditor-LoadGender.cpp)
        
        LoadGender(&ContactEditorData.Gender, &ContactEditorData.GenderDetails);
+       
+       // Process the Name (N) (frmContactEditor-LoadName.cpp)
+       
+       LoadName(&ContactEditorData.NameTitle, &ContactEditorData.NameForename,
+               &ContactEditorData.NameSurname, &ContactEditorData.NameOtherNames,
+               &ContactEditorData.NameSuffix);
+               
+       // Process the group members (MEMBER) (frmContactEditor-LoadGroup.cpp)
+               
+       LoadMember(&ContactEditorData.GroupsList);
+
+       // Process the address (ADR) (frmContactEditor-LoadAddress.cpp)
+       
+       LoadAddress(&ContactEditorData.GeneralAddressList,
+               &ContactEditorData.GeneralAddressListTown,
+               &ContactEditorData.GeneralAddressListCounty,
+               &ContactEditorData.GeneralAddressListPostCode,
+               &ContactEditorData.GeneralAddressListPref,
+               &ContactEditorData.HomeAddressList,
+               &ContactEditorData.HomeAddressListTown,
+               &ContactEditorData.HomeAddressListCounty,
+               &ContactEditorData.HomeAddressListPostCode,
+               &ContactEditorData.HomeAddressListPref,
+               &ContactEditorData.BusinessAddressList,
+               &ContactEditorData.BusinessAddressListTown,
+               &ContactEditorData.BusinessAddressListCounty,
+               &ContactEditorData.BusinessAddressListPostCode,
+               &ContactEditorData.BusinessAddressListPref,
+               &ADRCount);
+
+       // Process the timezone (TZ) (frmContactEditor-LoadTimeZone.cpp)
+       
+       LoadTimeZone(&ContactEditorData.GeneralTZList,
+               &ContactEditorData.GeneralTZListPref,
+               &ContactEditorData.HomeTZList,
+               &ContactEditorData.HomeTZListPref,
+               &ContactEditorData.BusinessTZList,
+               &ContactEditorData.BusinessTZListPref,
+               &TZCount);
 
        for (std::map<int,wxString>::iterator iter = ContactFileLines.begin(); 
         iter != ContactFileLines.end(); ++iter){
@@ -259,25 +302,25 @@ bool frmContactEditor::LoadContact(wxString Filename){
                
                        LoadKind(wxSPropertySeg2);
                
-               }*/ else if (wxSProperty == wxT("MEMBER")){
+               }/* else if (wxSProperty == wxT("MEMBER")){
 
                        // See frmContactEditor-LoadGroup.cpp
 
                        LoadMember(wxSPropertySeg2, &GroupCount);               
                
-               } else if (wxSProperty == wxT("FN")){
+               }*/ else if (wxSProperty == wxT("FN")){
                
                        // See frmContactEditor-LoadName.cpp
                
                        LoadFN(wxSPropertySeg1, wxSPropertySeg2, &FNCount, &FNProcessed, &ContactData);
                
-               } else if (wxSProperty == wxT("N") && NameProcessed == FALSE){
+               }/* else if (wxSProperty == wxT("N") && NameProcessed == FALSE){
                
                        // See frmContactEditor-LoadName.cpp
                
                        LoadN(wxSPropertySeg1, wxSPropertySeg2, &NameProcessed, &ContactData);
                
-               } else if (wxSProperty == wxT("NICKNAME")){
+               }*/ else if (wxSProperty == wxT("NICKNAME")){
                        
                        // See frmContactEditor-LoadNickname.cpp
                        
@@ -301,19 +344,19 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        
                        LoadAnniversary(wxSPropertySeg1, wxSPropertySeg2, &AnniversaryProcessed);
                
-               }*/ else if (wxSProperty == wxT("TZ")){
+               } else if (wxSProperty == wxT("TZ")){
                
                        // See frmContactEditor-LoadTimeZone.cpp
                
                        LoadTimeZone(wxSPropertySeg1, wxSPropertySeg2, &TZCount);       
                
-               } else if (wxSProperty == wxT("ADR")){
+               }  else if (wxSProperty == wxT("ADR")){
                        
                        // See frmContactEditor-LoadAddress.cpp
                
                        LoadADR(wxSPropertySeg1, wxSPropertySeg2, &ADRCount);
                
-               } else if (wxSProperty == wxT("EMAIL")){
+               }*/ else if (wxSProperty == wxT("EMAIL")){
                
                        // See frmContactEditor-LoadEmail.cpp
                        
@@ -427,12 +470,12 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        
                        LoadKey(wxSPropertySeg1, wxSPropertySeg2, &KeyCount);
                
-               } else if (wxSProperty == wxT("UID") && UIDProcessed == FALSE){
+               }/* else if (wxSProperty == wxT("UID") && UIDProcessed == FALSE){
                
                        UIDToken = wxSPropertySeg2;
                        UIDProcessed = TRUE;
                
-               } else if (wxSProperty.Mid(0, 3) == wxT("VND")){
+               }*/ else if (wxSProperty.Mid(0, 3) == wxT("VND")){
                
                        // Split the Vendor three ways.
                        
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy