2 #include "getcontactinfo.h"
5 void LoadContactData(vCard *vCardObj, wxHtmlWindow *HTMLObj){
7 wxString strPageHeader;
8 wxString strPageFooter;
11 wxString strvCardData;
13 strPageHeader = wxT("<html>\n\t<body>");
14 strPageFooter = wxT("\n\t</body>\n</html>");
16 // Get the full name of the contact.
18 strvCardData = vCardObj->Get(wxT("FN"));
20 strPageData = wxT("<h2>") + strvCardData + wxT("</h2>");
21 strPageData.Append(wxT("<br><br>"));
25 strvCardData = vCardObj->Get(wxT("NICKNAME"));
27 if (!strvCardData.IsEmpty()){
29 strPageData.Append(wxT("Nickname: "));
30 strPageData.Append(strvCardData);
31 strPageData.Append(wxT("<br><br>"));
35 strvCardData = vCardObj->Get(wxT("TITLE"));
37 if (!strvCardData.IsEmpty()){
39 strPageData.Append(wxT("Title: "));
40 strPageData.Append(strvCardData);
41 strPageData.Append(wxT("<br><br>"));
45 strvCardData = vCardObj->Get(wxT("ROLE"));
47 if (!strvCardData.IsEmpty()){
49 strPageData.Append(wxT("Role: "));
50 strPageData.Append(strvCardData);
51 strPageData.Append(wxT("<br><br>"));
55 strvCardData = vCardObj->Get(wxT("GENDER"));
57 if (!strvCardData.IsEmpty()){
59 strPageData.Append(wxT("Gender: "));
61 if (strvCardData == wxT("M")){
62 strPageData.Append(wxT("Male"));
63 } else if (strvCardData == wxT("F")){
64 strPageData.Append(wxT("Female"));
65 } else if (strvCardData == wxT("O")){
66 strPageData.Append(wxT("Other"));
67 } else if (strvCardData == wxT("N")){
68 strPageData.Append(wxT("None/Not Applicable"));
69 } else if (strvCardData == wxT("U")){
70 strPageData.Append(wxT("Unknown"));
73 strPageData.Append(wxT("<br><br>"));
77 strFinal = strPageHeader + strPageData + strPageFooter;
79 HTMLObj->SetPage(strFinal);