- FMTimer.SetupPointers(this);
- //wxIcon contacticon;
- //contacticon.CopyFromBitmap(contacticonbmp);
-
-}
-
-void frmContactEditor::AddGeneralNickname( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
- frameCENickname->SetEditorMode(FALSE, CE_GENERAL);
- intResult = GetLastInt(&GeneralNicknamesList);
- frameCENickname->SetupPointers(&GeneralNicknamesList,
- &GeneralNicknamesListAltID,
- &GeneralNicknamesListPID,
- &GeneralNicknamesListType,
- &GeneralNicknamesListLanguage,
- &GeneralNicknamesListTokens,
- &GeneralNicknamesListPref,
- lboNicknames,
- (intValueSeek));
- frameCENickname->ShowModal();
- delete frameCENickname;
- frameCENickname = NULL;
-}
-
-void frmContactEditor::ModifyGeneralNickname( wxCommandEvent& event )
-{
-
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboNicknames,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
- frameCENickname->SetupPointers(&GeneralNicknamesList,
- &GeneralNicknamesListAltID,
- &GeneralNicknamesListPID,
- &GeneralNicknamesListType,
- &GeneralNicknamesListLanguage,
- &GeneralNicknamesListTokens,
- &GeneralNicknamesListPref,
- lboNicknames,
- intSelectedData);
- frameCENickname->SetEditorMode(TRUE, CE_GENERAL);
- frameCENickname->ShowModal();
- delete frameCENickname;
- frameCENickname = NULL;
-
-}
-
-void frmContactEditor::DeleteGeneralNickname( wxCommandEvent& event )
-{
-
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboNicknames,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboNicknames->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData,
- &GeneralNicknamesList,
- &GeneralNicknamesListLanguage,
- &GeneralNicknamesListAltID,
- &GeneralNicknamesListPID,
- &GeneralNicknamesListTokens,
- &GeneralNicknamesListType,
- &GeneralNicknamesListPref);
-
-}
-
-void frmContactEditor::AddGeneralAddress( wxCommandEvent& event )
-{
-
- int intResult = 0;
-
- frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
- frameCEAddress->SetEditorMode(FALSE, CE_GENERAL);
- intResult = GetLastInt(&GeneralAddressList);
- frameCEAddress->SetupPointers(&GeneralAddressList,
- &GeneralAddressListTown,
- &GeneralAddressListCounty,
- &GeneralAddressListPostCode,
- &GeneralAddressListCountry,
- &GeneralAddressListLabel,
- &GeneralAddressListLang,
- &GeneralAddressListAltID,
- &GeneralAddressListPID,
- &GeneralAddressListTokens,
- &GeneralAddressListGeo,
- &GeneralAddressListTimezone,
- &GeneralAddressListType,
- &GeneralAddressListMediatype,
- &GeneralAddressListPref,
- lboAddresses,
- (intValueSeek));
- frameCEAddress->ShowModal();
- delete frameCEAddress;
- frameCEAddress = NULL;
-}
-
-void frmContactEditor::ModifyGeneralAddress( wxCommandEvent& event )
-{
-
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboAddresses,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- if (longSelected == -1){
- return;
- }
-
- frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
- frameCEAddress->SetupPointers(&GeneralAddressList,
- &GeneralAddressListTown,
- &GeneralAddressListCounty,
- &GeneralAddressListPostCode,
- &GeneralAddressListCountry,
- &GeneralAddressListLabel,
- &GeneralAddressListLang,
- &GeneralAddressListAltID,
- &GeneralAddressListPID,
- &GeneralAddressListTokens,
- &GeneralAddressListGeo,
- &GeneralAddressListTimezone,
- &GeneralAddressListType,
- &GeneralAddressListMediatype,
- &GeneralAddressListPref,
- lboAddresses,
- intSelectedData);
- frameCEAddress->SetEditorMode(TRUE, CE_GENERAL);
- frameCEAddress->ShowModal();
- delete frameCEAddress;
- frameCEAddress = NULL;
-
-}
-
-void frmContactEditor::DeleteGeneralAddress( wxCommandEvent& event )
-{
-
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboAddresses,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboAddresses->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &GeneralAddressList,
- &GeneralAddressListTown, &GeneralAddressListCounty,
- &GeneralAddressListPostCode, &GeneralAddressListCountry,
- &GeneralAddressList, &GeneralAddressListLabel,
- &GeneralAddressListLang, &GeneralAddressListAltID,
- &GeneralAddressListPID, &GeneralAddressListTokens,
- &GeneralAddressListGeo, &GeneralAddressListTimezone,
- &GeneralAddressListType, &GeneralAddressListMediatype,
- &GeneralAddressListPref);
-
-}
-
-void frmContactEditor::AddGeneralEmail( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
- frameCEEmail->SetEditorMode(FALSE, CE_GENERAL);
- intResult = GetLastInt(&GeneralAddressList);
- frameCEEmail->SetupPointers(&GeneralEmailList,
- &GeneralEmailListAltID,
- &GeneralEmailListPID,
- &GeneralEmailListType,
- &GeneralEmailListTokens,
- &GeneralEmailListPref,
- lboEmails,
- (intValueSeek));
- frameCEEmail->ShowModal();
- delete frameCEEmail;
- frameCEEmail = NULL;
-}
-
-void frmContactEditor::ModifyGeneralEmail( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboEmails,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
- frameCEEmail->SetupPointers(&GeneralEmailList,
- &GeneralEmailListAltID,
- &GeneralEmailListPID,
- &GeneralEmailListType,
- &GeneralEmailListTokens,
- &GeneralEmailListPref,
- lboEmails,
- intSelectedData);
- frameCEEmail->SetEditorMode(TRUE, CE_GENERAL);
- frameCEEmail->ShowModal();
- delete frameCEEmail;
- frameCEEmail = NULL;
-}
-
-void frmContactEditor::DeleteGeneralEmail( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboEmails,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboEmails->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &GeneralEmailList,
- &GeneralEmailListAltID, &GeneralEmailListPID,
- &GeneralEmailListType, &GeneralEmailListTokens,
- &GeneralEmailListPref);
-
-}
-
-void frmContactEditor::AddGeneralIM( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
- frameCEIM->SetEditorMode(FALSE, CE_GENERAL);
- intResult = GetLastInt(&GeneralIMList);
- frameCEIM->SetupPointers(&GeneralIMList,
- &GeneralIMListAltID,
- &GeneralIMListPID,
- &GeneralIMListType,
- &GeneralIMListTokens,
- &GeneralIMListMediatype,
- &GeneralIMListPref,
- lboIM,
- (intValueSeek));
- frameCEIM->ShowModal();
- delete frameCEIM;
- frameCEIM = NULL;
-}
-
-void frmContactEditor::ModifyGeneralIM( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboIM,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
- frameCEIM->SetupPointers(&GeneralIMList,
- &GeneralIMListAltID,
- &GeneralIMListPID,
- &GeneralIMListType,
- &GeneralIMListTokens,
- &GeneralIMListMediatype,
- &GeneralIMListPref,
- lboIM,
- intSelectedData);
- frameCEIM->SetEditorMode(TRUE, CE_GENERAL);
- frameCEIM->ShowModal();
- delete frameCEIM;
- frameCEIM = NULL;
-}
-
-void frmContactEditor::DeleteGeneralIM( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboIM,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboIM->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &GeneralIMList,
- &GeneralIMListAltID, &GeneralIMListPID,
- &GeneralIMListType, &GeneralIMListTokens,
- &GeneralIMListMediatype, &GeneralIMListPref);
-
-}
-
-void frmContactEditor::AddGeneralTelephone( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
- frameCETel->SetEditorMode(FALSE, CE_GENERAL);
- intResult = GetLastInt(&GeneralTelephoneList);
- frameCETel->SetupPointers(&GeneralTelephoneList,
- &GeneralTelephoneListAltID,
- &GeneralTelephoneListPID,
- &GeneralTelephoneListType,
- &GeneralTelephoneListTokens,
- &GeneralTelephoneListPref,
- lboTelephone,
- (intValueSeek));
- frameCETel->ShowModal();
- delete frameCETel;
- frameCETel = NULL;
-}
-
-void frmContactEditor::ModifyGeneralTelephone( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboTelephone,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
- frameCETel->SetupPointers(&GeneralTelephoneList,
- &GeneralTelephoneListAltID,
- &GeneralTelephoneListPID,
- &GeneralTelephoneListType,
- &GeneralTelephoneListTokens,
- &GeneralTelephoneListPref,
- lboTelephone,
- intSelectedData);
- frameCETel->SetEditorMode(TRUE, CE_GENERAL);
- frameCETel->ShowModal();
- delete frameCETel;
- frameCETel = NULL;
-}
-
-void frmContactEditor::DeleteGeneralTelephone( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboTelephone,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboTelephone->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &GeneralTelephoneList,
- &GeneralTelephoneListAltID, &GeneralTelephoneListPID,
- &GeneralTelephoneListType, &GeneralTelephoneListTokens,
- &GeneralTelephoneListPref);
-
-}
-
-void frmContactEditor::AddGeneralLanguages( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
- frameCELang->SetEditorMode(FALSE, CE_GENERAL);
- intResult = GetLastInt(&GeneralLanguageList);
- frameCELang->SetupPointers(&GeneralLanguageList,
- &GeneralLanguageListAltID,
- &GeneralLanguageListPID,
- &GeneralLanguageListType,
- &GeneralLanguageListTokens,
- &GeneralLanguageListPref,
- lboLanguages,
- (intValueSeek));
- frameCELang->ShowModal();
- delete frameCELang;
- frameCELang = NULL;
-}
-
-void frmContactEditor::ModifyGeneralLanguages( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboLanguages,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
- frameCELang->SetupPointers(&GeneralLanguageList,
- &GeneralLanguageListAltID,
- &GeneralLanguageListPID,
- &GeneralLanguageListType,
- &GeneralLanguageListTokens,
- &GeneralLanguageListPref,
- lboLanguages,
- intSelectedData);
- frameCELang->SetEditorMode(TRUE, CE_GENERAL);
- frameCELang->ShowModal();
- delete frameCELang;
- frameCELang = NULL;
-}
-
-void frmContactEditor::DeleteGeneralLanguage( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboLanguages,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboLanguages->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &GeneralLanguageList,
- &GeneralLanguageListAltID, &GeneralLanguageListPID,
- &GeneralLanguageListType, &GeneralLanguageListTokens,
- &GeneralLanguageListPref);
-
-}
-
-void frmContactEditor::AddGeneralTimezone( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
- frameCETZ->SetEditorMode(FALSE, CE_GENERAL);
- intResult = GetLastInt(&GeneralTZList);
- frameCETZ->SetupPointers(&GeneralTZList,
- &GeneralTZListAltID,
- &GeneralTZListPID,
- &GeneralTZListType,
- &GeneralTZListTokens,
- &GeneralTZListMediatype,
- &GeneralTZListPref,
- lboTimezones,
- (intValueSeek));
- frameCETZ->ShowModal();
- delete frameCETZ;
- frameCETZ = NULL;
-}
-
-void frmContactEditor::ModifyGeneralTimezone( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboTimezones,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
- frameCETZ->SetupPointers(&GeneralTZList,
- &GeneralTZListAltID,
- &GeneralTZListPID,
- &GeneralTZListType,
- &GeneralTZListTokens,
- &GeneralTZListMediatype,
- &GeneralTZListPref,
- lboTimezones,
- intSelectedData);
- frameCETZ->SetEditorMode(TRUE, CE_GENERAL);
- frameCETZ->ShowModal();
- delete frameCETZ;
- frameCETZ = NULL;
-}
-
-void frmContactEditor::DeleteGeneralTimezone( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboTimezones,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboTimezones->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &GeneralTZList,
- &GeneralTZListAltID, &GeneralTZListPID,
- &GeneralTZListType, &GeneralTZListTokens,
- &GeneralTZListMediatype, &GeneralTZListPref);
-
-}
-
-void frmContactEditor::AddGeneralGeoposition( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
- frameCEGeo->SetEditorMode(FALSE, CE_GENERAL);
- intResult = GetLastInt(&GeneralGeographyList);
- frameCEGeo->SetupPointers(&GeneralGeographyList,
- &GeneralGeographyListAltID,
- &GeneralGeographyListPID,
- &GeneralGeographyListType,
- &GeneralGeographyListTokens,
- &GeneralGeographyListMediatype,
- &GeneralGeographyListPref,
- lboGeoposition,
- (intValueSeek));
- frameCEGeo->ShowModal();
- delete frameCEGeo;
- frameCEGeo = NULL;
-}
-
-void frmContactEditor::ModifyGeneralGeoposition( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboGeoposition,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
- frameCEGeo->SetupPointers(&GeneralGeographyList,
- &GeneralGeographyListAltID,
- &GeneralGeographyListPID,
- &GeneralGeographyListType,
- &GeneralGeographyListTokens,
- &GeneralGeographyListMediatype,
- &GeneralGeographyListPref,
- lboGeoposition,
- intSelectedData);
- frameCEGeo->SetEditorMode(TRUE, CE_GENERAL);
- frameCEGeo->ShowModal();
- delete frameCEGeo;
- frameCEGeo = NULL;
-}
-
-void frmContactEditor::DeleteGeneralGeoposition( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboGeoposition,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboGeoposition->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &GeneralGeographyList,
- &GeneralGeographyListAltID, &GeneralGeographyListPID,
- &GeneralGeographyListType, &GeneralGeographyListTokens,
- &GeneralGeographyListMediatype, &GeneralGeographyListPref);
-
-}
-
-void frmContactEditor::AddGeneralRelated( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
- frameCERel->SetEditorMode(FALSE, CE_GENERAL);
- intResult = GetLastInt(&GeneralRelatedList);
- frameCERel->SetupPointers(&GeneralRelatedList,
- &GeneralRelatedListRelType,
- &GeneralRelatedListAltID,
- &GeneralRelatedListPID,
- &GeneralRelatedListType,
- &GeneralRelatedListTokens,
- &GeneralRelatedListPref,
- lboRelated,
- (intValueSeek));
- frameCERel->ShowModal();
- delete frameCERel;
- frameCERel = NULL;
-}
-
-void frmContactEditor::ModifyGeneralRelated( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboRelated,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
- frameCERel->SetupPointers(&GeneralRelatedList,
- &GeneralRelatedListRelType,
- &GeneralRelatedListAltID,
- &GeneralRelatedListPID,
- &GeneralRelatedListType,
- &GeneralRelatedListTokens,
- &GeneralRelatedListPref,
- lboRelated,
- intSelectedData);
- frameCERel->SetEditorMode(TRUE, CE_GENERAL);
- frameCERel->ShowModal();
- delete frameCERel;
- frameCERel = NULL;
-}
-
-void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboRelated,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboRelated->DeleteItem(longSelected);
-
- GeneralRelatedList.erase(intSelectedData);
- GeneralRelatedListRelType.erase(intSelectedData);
- GeneralRelatedListAltID.erase(intSelectedData);
- GeneralRelatedListPID.erase(intSelectedData);
- GeneralRelatedListType.erase(intSelectedData);
- GeneralRelatedListTokens.erase(intSelectedData);
- GeneralRelatedListPref.erase(intSelectedData);
-}
-
-void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
- frameCEWeb->SetEditorMode(FALSE, CE_GENERAL);
- intResult = GetLastInt(&GeneralWebsiteList);
- frameCEWeb->SetupPointers(&GeneralWebsiteList,
- &GeneralWebsiteListAltID,
- &GeneralWebsiteListPID,
- &GeneralWebsiteListType,
- &GeneralWebsiteListTokens,
- &GeneralWebsiteListMediatype,
- &GeneralWebsiteListPref,
- lboWebsites,
- (intValueSeek));
- frameCEWeb->ShowModal();
- delete frameCEWeb;
- frameCEWeb = NULL;
-}
-
-void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboWebsites,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
- frameCEWeb->SetupPointers(&GeneralWebsiteList,
- &GeneralWebsiteListAltID,
- &GeneralWebsiteListPID,
- &GeneralWebsiteListType,
- &GeneralWebsiteListTokens,
- &GeneralWebsiteListMediatype,
- &GeneralWebsiteListPref,
- lboWebsites,
- intSelectedData);
- frameCEWeb->SetEditorMode(TRUE, CE_GENERAL);
- frameCEWeb->ShowModal();
- delete frameCEWeb;
- frameCEWeb = NULL;
-}
-
-void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboWebsites,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboWebsites->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &GeneralWebsiteList,
- &GeneralWebsiteListAltID, &GeneralWebsiteListPID,
- &GeneralWebsiteListType, &GeneralWebsiteListTokens,
- &GeneralWebsiteListMediatype, &GeneralWebsiteListPref);
-
-}
-
-void frmContactEditor::AddGeneralTitle( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
- frameCETitle->SetEditorMode(FALSE, CE_GENERAL);
- intResult = GetLastInt(&GeneralTitleList);
- frameCETitle->SetupPointers(&GeneralTitleList,
- &GeneralTitleListLanguage,
- &GeneralTitleListAltID,
- &GeneralTitleListPID,
- &GeneralTitleListType,
- &GeneralTitleListTokens,
- &GeneralTitleListPref,
- lboTitles,
- (intValueSeek));
- frameCETitle->ShowModal();
- delete frameCETitle;
- frameCETitle = NULL;
-}
-
-void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboTitles,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
- frameCETitle->SetupPointers(&GeneralTitleList,
- &GeneralTitleListLanguage,
- &GeneralTitleListAltID,
- &GeneralTitleListPID,
- &GeneralTitleListType,
- &GeneralTitleListTokens,
- &GeneralTitleListPref,
- lboTitles,
- intSelectedData);
- frameCETitle->SetEditorMode(TRUE, CE_GENERAL);
- frameCETitle->ShowModal();
- delete frameCETitle;
- frameCETitle = NULL;
-}
-
-void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboTitles,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboTitles->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &GeneralTitleList,
- &GeneralTitleListLanguage, &GeneralTitleListAltID,
- &GeneralTitleListPID, &GeneralTitleListType,
- &GeneralTitleListTokens, &GeneralTitleListPref);
-
-}
-
-void frmContactEditor::AddGeneralRole( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
- frameCERole->SetEditorMode(FALSE, CE_GENERAL);
- intResult = GetLastInt(&GeneralRoleList);
- frameCERole->SetupPointers(&GeneralRoleList,
- &GeneralRoleListLanguage,
- &GeneralRoleListAltID,
- &GeneralRoleListPID,
- &GeneralRoleListType,
- &GeneralRoleListTokens,
- &GeneralRoleListPref,
- lboRoles,
- (intValueSeek));
- frameCERole->ShowModal();
- delete frameCERole;
- frameCERole = NULL;
-}
-
-void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboRoles,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
- frameCERole->SetupPointers(&GeneralRoleList,
- &GeneralRoleListLanguage,
- &GeneralRoleListAltID,
- &GeneralRoleListPID,
- &GeneralRoleListType,
- &GeneralRoleListTokens,
- &GeneralRoleListPref,
- lboRoles,
- intSelectedData);
- frameCERole->SetEditorMode(TRUE, CE_GENERAL);
- frameCERole->ShowModal();
- delete frameCERole;
- frameCERole = NULL;
-}
-
-void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboRoles,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboRoles->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &GeneralRoleList,
- &GeneralRoleListLanguage, &GeneralRoleListAltID,
- &GeneralRoleListPID, &GeneralRoleListType,
- &GeneralRoleListTokens, &GeneralRoleListPref);
-
-}
-
-void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
- frameCEOrg->SetEditorMode(FALSE, CE_GENERAL);
- intResult = GetLastInt(&GeneralOrganisationsList);
- frameCEOrg->SetupPointers(&GeneralOrganisationsList,
- &GeneralOrganisationsListLanguage,
- &GeneralOrganisationsListSortAs,
- &GeneralOrganisationsListAltID,
- &GeneralOrganisationsListPID,
- &GeneralOrganisationsListType,
- &GeneralOrganisationsListTokens,
- &GeneralOrganisationsListPref,
- lboOrganisations,
- (intValueSeek));
- frameCEOrg->ShowModal();
- delete frameCEOrg;
- frameCEOrg = NULL;
-}
-
-void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboOrganisations,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
- frameCEOrg->SetupPointers(&GeneralOrganisationsList,
- &GeneralOrganisationsListLanguage,
- &GeneralOrganisationsListSortAs,
- &GeneralOrganisationsListAltID,
- &GeneralOrganisationsListPID,
- &GeneralOrganisationsListType,
- &GeneralOrganisationsListTokens,
- &GeneralOrganisationsListPref,
- lboOrganisations,
- intSelectedData);
- frameCEOrg->SetEditorMode(TRUE, CE_GENERAL);
- frameCEOrg->ShowModal();
- delete frameCEOrg;
- frameCEOrg = NULL;
-}
-
-void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboOrganisations,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboOrganisations->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &GeneralOrganisationsList,
- &GeneralOrganisationsListLanguage, &GeneralOrganisationsListSortAs,
- &GeneralOrganisationsListAltID, &GeneralOrganisationsListPID,
- &GeneralOrganisationsListType, &GeneralOrganisationsListTokens,
- &GeneralOrganisationsListPref);
-
-}
-
-void frmContactEditor::AddGeneralNote( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
- frameCENote->SetEditorMode(FALSE, CE_GENERAL);
- intResult = GetLastInt(&GeneralNoteList);
- frameCENote->SetupPointers(&GeneralNoteList,
- &GeneralNoteListLanguage,
- &GeneralNoteListAltID,
- &GeneralNoteListPID,
- &GeneralNoteListType,
- &GeneralNoteListTokens,
- &GeneralNoteListPref,
- lboNotes,
- (intValueSeek));
- frameCENote->ShowModal();
- delete frameCENote;
- frameCENote = NULL;
-}
-
-void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboNotes,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
- frameCENote->SetupPointers(&GeneralNoteList,
- &GeneralNoteListLanguage,
- &GeneralNoteListAltID,
- &GeneralNoteListPID,
- &GeneralNoteListType,
- &GeneralNoteListTokens,
- &GeneralNoteListPref,
- lboNotes,
- intSelectedData);
- frameCENote->SetEditorMode(TRUE, CE_GENERAL);
- frameCENote->ShowModal();
- delete frameCENote;
- frameCENote = NULL;
-}
-
-void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboNotes,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboNotes->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &GeneralNoteList,
- &GeneralNoteListLanguage, &GeneralNoteListAltID,
- &GeneralNoteListPID, &GeneralNoteListType,
- &GeneralNoteListTokens, &GeneralNoteListPref);
-
-}
-
-void frmContactEditor::AddHomeNickname( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
- frameCENickname->SetEditorMode(FALSE, CE_HOME);
- intResult = GetLastInt(&HomeNicknamesList);
- frameCENickname->SetupPointers(&HomeNicknamesList,
- &HomeNicknamesListAltID,
- &HomeNicknamesListPID,
- &HomeNicknamesListType,
- &HomeNicknamesListLanguage,
- &HomeNicknamesListTokens,
- &HomeNicknamesListPref,
- lboHomeNicknames,
- (intValueSeek));
- frameCENickname->ShowModal();
- delete frameCENickname;
- frameCENickname = NULL;
-}
-
-void frmContactEditor::ModifyHomeNickname( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeNicknames,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
- frameCENickname->SetupPointers(&HomeNicknamesList,
- &HomeNicknamesListAltID,
- &HomeNicknamesListPID,
- &HomeNicknamesListType,
- &HomeNicknamesListLanguage,
- &HomeNicknamesListTokens,
- &HomeNicknamesListPref,
- lboHomeNicknames,
- intSelectedData);
- frameCENickname->SetEditorMode(TRUE, CE_HOME);
- frameCENickname->ShowModal();
- delete frameCENickname;
- frameCENickname = NULL;
-}
-
-void frmContactEditor::DeleteHomeNickname( wxCommandEvent& event )
-{
-
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeNicknames,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboHomeNicknames->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData,
- &HomeNicknamesList,
- &HomeNicknamesListLanguage,
- &HomeNicknamesListAltID,
- &HomeNicknamesListPID,
- &HomeNicknamesListTokens,
- &HomeNicknamesListType,
- &HomeNicknamesListPref);
-
-}
-
-void frmContactEditor::AddHomeAddress( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
- frameCEAddress->SetEditorMode(FALSE, CE_HOME);
- intResult = GetLastInt(&HomeAddressList);
- frameCEAddress->SetupPointers(&HomeAddressList,
- &HomeAddressListTown,
- &HomeAddressListCounty,
- &HomeAddressListPostCode,
- &HomeAddressListCountry,
- &HomeAddressListLabel,
- &HomeAddressListLang,
- &HomeAddressListAltID,
- &HomeAddressListPID,
- &HomeAddressListTokens,
- &HomeAddressListGeo,
- &HomeAddressListTimezone,
- &HomeAddressListType,
- &HomeAddressListMediatype,
- &HomeAddressListPref,
- lboHomeAddresses,
- (intValueSeek));
- frameCEAddress->ShowModal();
- delete frameCEAddress;
- frameCEAddress = NULL;
-}
-
-void frmContactEditor::ModifyHomeAddress( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeAddresses,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
- frameCEAddress->SetupPointers(&HomeAddressList,
- &HomeAddressListTown,
- &HomeAddressListCounty,
- &HomeAddressListPostCode,
- &HomeAddressListCountry,
- &HomeAddressListLabel,
- &HomeAddressListLang,
- &HomeAddressListAltID,
- &HomeAddressListPID,
- &HomeAddressListTokens,
- &HomeAddressListGeo,
- &HomeAddressListTimezone,
- &HomeAddressListType,
- &HomeAddressListMediatype,
- &HomeAddressListPref,
- lboHomeAddresses,
- intSelectedData);
- frameCEAddress->SetEditorMode(TRUE, CE_HOME);
- frameCEAddress->ShowModal();
- delete frameCEAddress;
- frameCEAddress = NULL;
-}
-
-void frmContactEditor::DeleteHomeAddress( wxCommandEvent& event )
-{
-
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeAddresses,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboHomeAddresses->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &HomeAddressList,
- &HomeAddressListTown, &HomeAddressListCounty,
- &HomeAddressListPostCode, &HomeAddressListCountry,
- &HomeAddressList, &HomeAddressListLabel,
- &HomeAddressListLang, &HomeAddressListAltID,
- &HomeAddressListPID, &HomeAddressListTokens,
- &HomeAddressListGeo, &HomeAddressListTimezone,
- &HomeAddressListType, &HomeAddressListMediatype,
- &HomeAddressListPref);
-
-}
-
-void frmContactEditor::AddHomeEmail( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
- frameCEEmail->SetEditorMode(FALSE, CE_HOME);
- intResult = GetLastInt(&HomeAddressList);
- frameCEEmail->SetupPointers(&HomeEmailList,
- &HomeEmailListAltID,
- &HomeEmailListPID,
- &HomeEmailListType,
- &HomeEmailListTokens,
- &HomeEmailListPref,
- lboHomeEmails,
- (intValueSeek));
- frameCEEmail->ShowModal();
- delete frameCEEmail;
- frameCEEmail = NULL;
-}
-
-void frmContactEditor::ModifyHomeEmail( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeEmails,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
- frameCEEmail->SetupPointers(&HomeEmailList,
- &HomeEmailListAltID,
- &HomeEmailListPID,
- &HomeEmailListType,
- &HomeEmailListTokens,
- &HomeEmailListPref,
- lboHomeEmails,
- intSelectedData);
- frameCEEmail->SetEditorMode(TRUE, CE_HOME);
- frameCEEmail->ShowModal();
- delete frameCEEmail;
- frameCEEmail = NULL;
-}
-
-
-void frmContactEditor::DeleteHomeEmail( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeEmails,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboHomeEmails->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &HomeEmailList,
- &HomeEmailListAltID, &HomeEmailListPID,
- &HomeEmailListType, &HomeEmailListTokens,
- &HomeEmailListPref);
-}
-
-
-void frmContactEditor::AddHomeIM( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
- frameCEIM->SetEditorMode(FALSE, CE_HOME);
- intResult = GetLastInt(&HomeIMList);
- frameCEIM->SetupPointers(&HomeIMList,
- &HomeIMListAltID,
- &HomeIMListPID,
- &HomeIMListType,
- &HomeIMListTokens,
- &HomeIMListMediatype,
- &HomeIMListPref,
- lboHomeIM,
- (intValueSeek));
- frameCEIM->ShowModal();
- delete frameCEIM;
- frameCEIM = NULL;
-}
-
-void frmContactEditor::ModifyHomeIM( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeIM,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
- frameCEIM->SetupPointers(&HomeIMList,
- &HomeIMListAltID,
- &HomeIMListPID,
- &HomeIMListType,
- &HomeIMListTokens,
- &HomeIMListMediatype,
- &HomeIMListPref,
- lboHomeIM,
- intSelectedData);
- frameCEIM->SetEditorMode(TRUE, CE_HOME);
- frameCEIM->ShowModal();
- delete frameCEIM;
- frameCEIM = NULL;
-}
-
-void frmContactEditor::DeleteHomeIM( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeIM,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboHomeIM->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &HomeIMList,
- &HomeIMListAltID, &HomeIMListPID,
- &HomeIMListType, &HomeIMListTokens,
- &HomeIMListMediatype, &HomeIMListPref);
-
-}
-
-void frmContactEditor::AddHomeTelephone( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
- frameCETel->SetEditorMode(FALSE, CE_HOME);
- intResult = GetLastInt(&HomeTelephoneList);
- frameCETel->SetupPointers(&HomeTelephoneList,
- &HomeTelephoneListAltID,
- &HomeTelephoneListPID,
- &HomeTelephoneListType,
- &HomeTelephoneListTokens,
- &HomeTelephoneListPref,
- lboHomeTelephone,
- (intValueSeek));
- frameCETel->ShowModal();
- delete frameCETel;
- frameCETel = NULL;
-}
-
-void frmContactEditor::ModifyHomeTelephone( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeTelephone,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
- frameCETel->SetupPointers(&HomeTelephoneList,
- &HomeTelephoneListAltID,
- &HomeTelephoneListPID,
- &HomeTelephoneListType,
- &HomeTelephoneListTokens,
- &HomeTelephoneListPref,
- lboHomeTelephone,
- intSelectedData);
- frameCETel->SetEditorMode(TRUE, CE_HOME);
- frameCETel->ShowModal();
- delete frameCETel;
- frameCETel = NULL;
-}
-
-void frmContactEditor::DeleteHomeTelephone( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeTelephone,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboHomeTelephone->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &HomeTelephoneList,
- &HomeTelephoneListAltID, &HomeTelephoneListPID,
- &HomeTelephoneListType, &HomeTelephoneListTokens,
- &HomeTelephoneListPref);
-
-}
-
-void frmContactEditor::AddHomeLanguage( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
- frameCELang->SetEditorMode(FALSE, CE_HOME);
- intResult = GetLastInt(&HomeLanguageList);
- frameCELang->SetupPointers(&HomeLanguageList,
- &HomeLanguageListAltID,
- &HomeLanguageListPID,
- &HomeLanguageListType,
- &HomeLanguageListTokens,
- &HomeLanguageListPref,
- lboHomeLanguages,
- (intValueSeek));
- frameCELang->ShowModal();
- delete frameCELang;
- frameCELang = NULL;
-}
-
-void frmContactEditor::ModifyHomeLanguage( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeLanguages,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
- frameCELang->SetupPointers(&HomeLanguageList,
- &HomeLanguageListAltID,
- &HomeLanguageListPID,
- &HomeLanguageListType,
- &HomeLanguageListTokens,
- &HomeLanguageListPref,
- lboHomeLanguages,
- intSelectedData);
- frameCELang->SetEditorMode(TRUE, CE_HOME);
- frameCELang->ShowModal();
- delete frameCELang;
- frameCELang = NULL;
-}
-
-void frmContactEditor::DeleteHomeLanguage( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeLanguages,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboHomeLanguages->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &HomeLanguageList,
- &HomeLanguageListAltID, &HomeLanguageListPID,
- &HomeLanguageListType, &HomeLanguageListTokens,
- &HomeLanguageListPref);
-
-}
-
-void frmContactEditor::AddHomeTimezone( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
- frameCETZ->SetEditorMode(FALSE, CE_HOME);
- intResult = GetLastInt(&HomeTZList);
- frameCETZ->SetupPointers(&HomeTZList,
- &HomeTZListAltID,
- &HomeTZListPID,
- &HomeTZListType,
- &HomeTZListTokens,
- &HomeTZListMediatype,
- &HomeTZListPref,
- lboHomeTimezones,
- (intValueSeek));
- frameCETZ->ShowModal();
- delete frameCETZ;
- frameCETZ = NULL;
-}
-
-void frmContactEditor::ModifyHomeTimezone( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeTimezones,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
- frameCETZ->SetupPointers(&HomeTZList,
- &HomeTZListAltID,
- &HomeTZListPID,
- &HomeTZListType,
- &HomeTZListTokens,
- &HomeTZListMediatype,
- &HomeTZListPref,
- lboHomeTimezones,
- intSelectedData);
- frameCETZ->SetEditorMode(TRUE, CE_HOME);
- frameCETZ->ShowModal();
- delete frameCETZ;
- frameCETZ = NULL;
-}
-
-void frmContactEditor::DeleteHomeTimezone( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeTimezones,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboHomeTimezones->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &HomeTZList,
- &HomeTZListAltID, &HomeTZListPID,
- &HomeTZListType, &HomeTZListTokens,
- &HomeTZListMediatype, &HomeTZListPref);
-
-}
-
-void frmContactEditor::AddHomeGeoposition( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
- frameCEGeo->SetEditorMode(FALSE, CE_HOME);
- intResult = GetLastInt(&HomeGeographyList);
- frameCEGeo->SetupPointers(&HomeGeographyList,
- &HomeGeographyListAltID,
- &HomeGeographyListPID,
- &HomeGeographyListType,
- &HomeGeographyListTokens,
- &HomeGeographyListMediatype,
- &HomeGeographyListPref,
- lboHomeGeoposition,
- (intValueSeek));
- frameCEGeo->ShowModal();
- delete frameCEGeo;
- frameCEGeo = NULL;
-}
-
-void frmContactEditor::ModifyHomeGeoposition( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeGeoposition,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
- frameCEGeo->SetupPointers(&HomeGeographyList,
- &HomeGeographyListAltID,
- &HomeGeographyListPID,
- &HomeGeographyListType,
- &HomeGeographyListTokens,
- &HomeGeographyListMediatype,
- &HomeGeographyListPref,
- lboHomeGeoposition,
- intSelectedData);
- frameCEGeo->SetEditorMode(TRUE, CE_HOME);
- frameCEGeo->ShowModal();
- delete frameCEGeo;
- frameCEGeo = NULL;
-}
-
-void frmContactEditor::DeleteHomeGeoposition( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeGeoposition,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboHomeGeoposition->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &HomeGeographyList,
- &HomeGeographyListAltID, &HomeGeographyListPID,
- &HomeGeographyListType, &HomeGeographyListTokens,
- &HomeGeographyListMediatype, &HomeGeographyListPref);
-
-}
-
-void frmContactEditor::AddHomeWebsite( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
- frameCEWeb->SetEditorMode(FALSE, CE_HOME);
- intResult = GetLastInt(&HomeWebsiteList);
- frameCEWeb->SetupPointers(&HomeWebsiteList,
- &HomeWebsiteListAltID,
- &HomeWebsiteListPID,
- &HomeWebsiteListType,
- &HomeWebsiteListTokens,
- &HomeWebsiteListMediatype,
- &HomeWebsiteListPref,
- lboHomeWebsites,
- (intValueSeek));
- frameCEWeb->ShowModal();
- delete frameCEWeb;
- frameCEWeb = NULL;
-}
-
-void frmContactEditor::ModifyHomeWebsite( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeWebsites,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
- frameCEWeb->SetupPointers(&HomeWebsiteList,
- &HomeWebsiteListAltID,
- &HomeWebsiteListPID,
- &HomeWebsiteListType,
- &HomeWebsiteListTokens,
- &HomeWebsiteListMediatype,
- &HomeWebsiteListPref,
- lboHomeWebsites,
- intSelectedData);
- frameCEWeb->SetEditorMode(TRUE, CE_HOME);
- frameCEWeb->ShowModal();
- delete frameCEWeb;
- frameCEWeb = NULL;
-}
-
-void frmContactEditor::DeleteHomeWebsite( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeWebsites,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboHomeWebsites->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &HomeWebsiteList,
- &HomeWebsiteListAltID, &HomeWebsiteListPID,
- &HomeWebsiteListType, &HomeWebsiteListTokens,
- &HomeWebsiteListMediatype, &HomeWebsiteListPref);
-
-}
-
-void frmContactEditor::AddHomeTitle( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
- frameCETitle->SetEditorMode(FALSE, CE_HOME);
- intResult = GetLastInt(&HomeTitleList);
- frameCETitle->SetupPointers(&HomeTitleList,
- &HomeTitleListLanguage,
- &HomeTitleListAltID,
- &HomeTitleListPID,
- &HomeTitleListType,
- &HomeTitleListTokens,
- &HomeTitleListPref,
- lboHomeTitles,
- (intValueSeek));
- frameCETitle->ShowModal();
- delete frameCETitle;
- frameCETitle = NULL;
-}
-
-void frmContactEditor::ModifyHomeTitle( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeTitles,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
- frameCETitle->SetupPointers(&HomeTitleList,
- &HomeTitleListLanguage,
- &HomeTitleListAltID,
- &HomeTitleListPID,
- &HomeTitleListType,
- &HomeTitleListTokens,
- &HomeTitleListPref,
- lboHomeTitles,
- intSelectedData);
- frameCETitle->SetEditorMode(TRUE, CE_HOME);
- frameCETitle->ShowModal();
- delete frameCETitle;
- frameCETitle = NULL;
-}
-
-void frmContactEditor::DeleteHomeTitle( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeTitles,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboHomeTitles->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &HomeTitleList,
- &HomeTitleListLanguage, &HomeTitleListAltID,
- &HomeTitleListPID, &HomeTitleListType,
- &HomeTitleListTokens, &HomeTitleListPref);
-
-}
-
-void frmContactEditor::AddHomeRole( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
- frameCERole->SetEditorMode(FALSE, CE_HOME);
- intResult = GetLastInt(&HomeRoleList);
- frameCERole->SetupPointers(&HomeRoleList,
- &HomeRoleListLanguage,
- &HomeRoleListAltID,
- &HomeRoleListPID,
- &HomeRoleListType,
- &HomeRoleListTokens,
- &HomeRoleListPref,
- lboHomeRoles,
- (intValueSeek));
- frameCERole->ShowModal();
- delete frameCERole;
- frameCERole = NULL;
-}
-
-void frmContactEditor::ModifyHomeRole( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeRoles,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
- frameCERole->SetupPointers(&HomeRoleList,
- &HomeRoleListLanguage,
- &HomeRoleListAltID,
- &HomeRoleListPID,
- &HomeRoleListType,
- &HomeRoleListTokens,
- &HomeRoleListPref,
- lboHomeRoles,
- intSelectedData);
- frameCERole->SetEditorMode(TRUE, CE_HOME);
- frameCERole->ShowModal();
- delete frameCERole;
- frameCERole = NULL;
-}
-
-void frmContactEditor::DeleteHomeRole( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeRoles,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboHomeRoles->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &HomeRoleList,
- &HomeRoleListLanguage, &HomeRoleListAltID,
- &HomeRoleListPID, &HomeRoleListType,
- &HomeRoleListTokens, &HomeRoleListPref);
-
-}
-
-void frmContactEditor::AddHomeOrganisation( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
- frameCEOrg->SetEditorMode(FALSE, CE_HOME);
- intResult = GetLastInt(&HomeOrganisationsList);
- frameCEOrg->SetupPointers(&HomeOrganisationsList,
- &HomeOrganisationsListLanguage,
- &HomeOrganisationsListSortAs,
- &HomeOrganisationsListAltID,
- &HomeOrganisationsListPID,
- &HomeOrganisationsListType,
- &HomeOrganisationsListTokens,
- &HomeOrganisationsListPref,
- lboHomeOrganisations,
- (intValueSeek));
- frameCEOrg->ShowModal();
- delete frameCEOrg;
- frameCEOrg = NULL;
-}
-
-void frmContactEditor::ModifyHomeOrganisation( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeOrganisations,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
- frameCEOrg->SetupPointers(&HomeOrganisationsList,
- &HomeOrganisationsListLanguage,
- &HomeOrganisationsListSortAs,
- &HomeOrganisationsListAltID,
- &HomeOrganisationsListPID,
- &HomeOrganisationsListType,
- &HomeOrganisationsListTokens,
- &HomeOrganisationsListPref,
- lboHomeOrganisations,
- intSelectedData);
- frameCEOrg->SetEditorMode(TRUE, CE_HOME);
- frameCEOrg->ShowModal();
- delete frameCEOrg;
- frameCEOrg = NULL;
-}
-
-void frmContactEditor::DeleteHomeOrganisation( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeOrganisations,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboHomeOrganisations->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &HomeOrganisationsList,
- &HomeOrganisationsListLanguage, &HomeOrganisationsListSortAs,
- &HomeOrganisationsListAltID, &HomeOrganisationsListPID,
- &HomeOrganisationsListType, &HomeOrganisationsListTokens,
- &HomeOrganisationsListPref);
-
-}
-
-void frmContactEditor::AddHomeNote( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
- frameCENote->SetEditorMode(FALSE, CE_HOME);
- intResult = GetLastInt(&HomeNoteList);
- frameCENote->SetupPointers(&HomeNoteList,
- &HomeNoteListLanguage,
- &HomeNoteListAltID,
- &HomeNoteListPID,
- &HomeNoteListType,
- &HomeNoteListTokens,
- &HomeNoteListPref,
- lboHomeNotes,
- (intValueSeek));
- frameCENote->ShowModal();
- delete frameCENote;
- frameCENote = NULL;
-}
-
-void frmContactEditor::ModifyHomeNote( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeNotes,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
- frameCENote->SetupPointers(&HomeNoteList,
- &HomeNoteListLanguage,
- &HomeNoteListAltID,
- &HomeNoteListPID,
- &HomeNoteListType,
- &HomeNoteListTokens,
- &HomeNoteListPref,
- lboHomeNotes,
- intSelectedData);
- frameCENote->SetEditorMode(TRUE, CE_HOME);
- frameCENote->ShowModal();
- delete frameCENote;
- frameCENote = NULL;
-}
-
-void frmContactEditor::DeleteHomeNote( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboHomeNotes,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboNotes->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &HomeNoteList,
- &HomeNoteListLanguage, &HomeNoteListAltID,
- &HomeNoteListPID, &HomeNoteListType,
- &HomeNoteListTokens, &HomeNoteListPref);
-
-}
-
-void frmContactEditor::AddBusinessNickname( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
- frameCENickname->SetEditorMode(FALSE, CE_WORK);
- intResult = GetLastInt(&BusinessNicknamesList);
- frameCENickname->SetupPointers(&BusinessNicknamesList,
- &BusinessNicknamesListAltID,
- &BusinessNicknamesListPID,
- &BusinessNicknamesListType,
- &BusinessNicknamesListLanguage,
- &BusinessNicknamesListTokens,
- &BusinessNicknamesListPref,
- lboBusinessNicknames,
- (intValueSeek));
- frameCENickname->ShowModal();
- delete frameCENickname;
- frameCENickname = NULL;
-}
-
-void frmContactEditor::ModifyBusinessNickname( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessNicknames,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
- frameCENickname->SetupPointers(&BusinessNicknamesList,
- &BusinessNicknamesListAltID,
- &BusinessNicknamesListPID,
- &BusinessNicknamesListType,
- &BusinessNicknamesListLanguage,
- &BusinessNicknamesListTokens,
- &BusinessNicknamesListPref,
- lboBusinessNicknames,
- intSelectedData);
- frameCENickname->SetEditorMode(TRUE, CE_WORK);
- frameCENickname->ShowModal();
- delete frameCENickname;
- frameCENickname = NULL;
-}
-
-void frmContactEditor::DeleteBusinessNickname( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessNicknames,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboBusinessNicknames->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData,
- &BusinessNicknamesList,
- &BusinessNicknamesListLanguage,
- &BusinessNicknamesListAltID,
- &BusinessNicknamesListPID,
- &BusinessNicknamesListTokens,
- &BusinessNicknamesListType,
- &BusinessNicknamesListPref);
-}
-
-void frmContactEditor::AddBusinessAddress( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
- frameCEAddress->SetEditorMode(FALSE, CE_WORK);
- intResult = GetLastInt(&BusinessAddressList);
- frameCEAddress->SetupPointers(&BusinessAddressList,
- &BusinessAddressListTown,
- &BusinessAddressListCounty,
- &BusinessAddressListPostCode,
- &BusinessAddressListCountry,
- &BusinessAddressListLabel,
- &BusinessAddressListLang,
- &BusinessAddressListAltID,
- &BusinessAddressListPID,
- &BusinessAddressListTokens,
- &BusinessAddressListGeo,
- &BusinessAddressListTimezone,
- &BusinessAddressListType,
- &BusinessAddressListMediatype,
- &BusinessAddressListPref,
- lboBusinessAddresses,
- (intValueSeek));
- frameCEAddress->ShowModal();
- delete frameCEAddress;
- frameCEAddress = NULL;
-}
-
-void frmContactEditor::ModifyBusinessAddress( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessAddresses,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
- frameCEAddress->SetupPointers(&BusinessAddressList,
- &BusinessAddressListTown,
- &BusinessAddressListCounty,
- &BusinessAddressListPostCode,
- &BusinessAddressListCountry,
- &BusinessAddressListLabel,
- &BusinessAddressListLang,
- &BusinessAddressListAltID,
- &BusinessAddressListPID,
- &BusinessAddressListTokens,
- &BusinessAddressListGeo,
- &BusinessAddressListTimezone,
- &BusinessAddressListType,
- &BusinessAddressListMediatype,
- &BusinessAddressListPref,
- lboBusinessAddresses,
- intSelectedData);
- frameCEAddress->SetEditorMode(TRUE, CE_WORK);
- frameCEAddress->ShowModal();
- delete frameCEAddress;
- frameCEAddress = NULL;
-}
-
-void frmContactEditor::DeleteBusinessAddress( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessAddresses,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboBusinessAddresses->DeleteItem(longSelected);
- DeleteMapData(intSelectedData, &BusinessAddressList,
- &BusinessAddressListTown, &BusinessAddressListCounty,
- &BusinessAddressListPostCode, &BusinessAddressListCountry,
- &BusinessAddressList, &BusinessAddressListLabel,
- &BusinessAddressListLang, &BusinessAddressListAltID,
- &BusinessAddressListPID, &BusinessAddressListTokens,
- &BusinessAddressListGeo, &BusinessAddressListTimezone,
- &BusinessAddressListType, &BusinessAddressListMediatype,
- &BusinessAddressListPref);
-
-}
-
-void frmContactEditor::AddBusinessEmail( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
- frameCEEmail->SetEditorMode(FALSE, CE_WORK);
- intResult = GetLastInt(&BusinessAddressList);
- frameCEEmail->SetupPointers(&BusinessEmailList,
- &BusinessEmailListAltID,
- &BusinessEmailListPID,
- &BusinessEmailListType,
- &BusinessEmailListTokens,
- &BusinessEmailListPref,
- lboBusinessEmail,
- (intValueSeek));
- frameCEEmail->ShowModal();
- delete frameCEEmail;
- frameCEEmail = NULL;
-}
-
-void frmContactEditor::ModifyBusinessEmail( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessEmail,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
- frameCEEmail->SetupPointers(&BusinessEmailList,
- &BusinessEmailListAltID,
- &BusinessEmailListPID,
- &BusinessEmailListType,
- &BusinessEmailListTokens,
- &BusinessEmailListPref,
- lboBusinessEmail,
- intSelectedData);
- frameCEEmail->SetEditorMode(TRUE, CE_WORK);
- frameCEEmail->ShowModal();
- delete frameCEEmail;
- frameCEEmail = NULL;
-}
-
-void frmContactEditor::DeleteBusinessEmail( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessEmail,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboBusinessEmail->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &BusinessEmailList,
- &BusinessEmailListAltID, &BusinessEmailListPID,
- &BusinessEmailListType, &BusinessEmailListTokens,
- &BusinessEmailListPref);
-
-}
-
-void frmContactEditor::AddBusinessIM( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
- frameCEIM->SetEditorMode(FALSE, CE_WORK);
- intResult = GetLastInt(&BusinessIMList);
- frameCEIM->SetupPointers(&BusinessIMList,
- &BusinessIMListAltID,
- &BusinessIMListPID,
- &BusinessIMListType,
- &BusinessIMListTokens,
- &BusinessIMListMediatype,
- &BusinessIMListPref,
- lboBusinessIM,
- (intValueSeek));
- frameCEIM->ShowModal();
- delete frameCEIM;
- frameCEIM = NULL;
-}
-
-void frmContactEditor::ModifyBusinessIM( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessIM,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
- frameCEIM->SetupPointers(&BusinessIMList,
- &BusinessIMListAltID,
- &BusinessIMListPID,
- &BusinessIMListType,
- &BusinessIMListTokens,
- &BusinessIMListMediatype,
- &BusinessIMListPref,
- lboBusinessIM,
- intSelectedData);
- frameCEIM->SetEditorMode(TRUE, CE_WORK);
- frameCEIM->ShowModal();
- delete frameCEIM;
- frameCEIM = NULL;
-}
-
-void frmContactEditor::DeleteBusinessIM( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessIM,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboBusinessIM->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &BusinessIMList,
- &BusinessIMListAltID, &BusinessIMListPID,
- &BusinessIMListType, &BusinessIMListTokens,
- &BusinessIMListMediatype, &BusinessIMListPref);
-
-}
-
-void frmContactEditor::AddBusinessTelephone( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
- frameCETel->SetEditorMode(FALSE, CE_WORK);
- intResult = GetLastInt(&BusinessTelephoneList);
- frameCETel->SetupPointers(&BusinessTelephoneList,
- &BusinessTelephoneListAltID,
- &BusinessTelephoneListPID,
- &BusinessTelephoneListType,
- &BusinessTelephoneListTokens,
- &BusinessTelephoneListPref,
- lboBusinessTelephone,
- (intValueSeek));
- frameCETel->ShowModal();
- delete frameCETel;
- frameCETel = NULL;
-}
-
-void frmContactEditor::ModifyBusinessTelephone( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessTelephone,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
- frameCETel->SetupPointers(&BusinessTelephoneList,
- &BusinessTelephoneListAltID,
- &BusinessTelephoneListPID,
- &BusinessTelephoneListType,
- &BusinessTelephoneListTokens,
- &BusinessTelephoneListPref,
- lboBusinessTelephone,
- intSelectedData);
- frameCETel->SetEditorMode(TRUE, CE_WORK);
- frameCETel->ShowModal();
- delete frameCETel;
- frameCETel = NULL;
-}
-
-void frmContactEditor::DeleteBusinessTelephone( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessTelephone,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboBusinessTelephone->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &BusinessTelephoneList,
- &BusinessTelephoneListAltID, &BusinessTelephoneListPID,
- &BusinessTelephoneListType, &BusinessTelephoneListTokens,
- &BusinessTelephoneListPref);
-
-}
-
-void frmContactEditor::AddBusinessLanguage( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
- frameCELang->SetEditorMode(FALSE, CE_WORK);
- intResult = GetLastInt(&BusinessLanguageList);
- frameCELang->SetupPointers(&BusinessLanguageList,
- &BusinessLanguageListAltID,
- &BusinessLanguageListPID,
- &BusinessLanguageListType,
- &BusinessLanguageListTokens,
- &BusinessLanguageListPref,
- lboBusinessLanguages,
- (intValueSeek));
- frameCELang->ShowModal();
- delete frameCELang;
- frameCELang = NULL;
-}
-
-void frmContactEditor::ModifyBusinessLanguage( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessLanguages,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
- frameCELang->SetupPointers(&BusinessLanguageList,
- &BusinessLanguageListAltID,
- &BusinessLanguageListPID,
- &BusinessLanguageListType,
- &BusinessLanguageListTokens,
- &BusinessLanguageListPref,
- lboBusinessLanguages,
- intSelectedData);
- frameCELang->SetEditorMode(TRUE, CE_WORK);
- frameCELang->ShowModal();
- delete frameCELang;
- frameCELang = NULL;
-}
-
-void frmContactEditor::DeleteBusinessLanguage( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessLanguages,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboBusinessLanguages->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &BusinessLanguageList,
- &BusinessLanguageListAltID, &BusinessLanguageListPID,
- &BusinessLanguageListType, &BusinessLanguageListTokens,
- &BusinessLanguageListPref);
-
-}
-
-void frmContactEditor::AddBusinessTimezone( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
- frameCETZ->SetEditorMode(FALSE, CE_WORK);
- intResult = GetLastInt(&BusinessTZList);
- frameCETZ->SetupPointers(&BusinessTZList,
- &BusinessTZListAltID,
- &BusinessTZListPID,
- &BusinessTZListType,
- &BusinessTZListTokens,
- &BusinessTZListMediatype,
- &BusinessTZListPref,
- lboBusinessTimezones,
- (intValueSeek));
- frameCETZ->ShowModal();
- delete frameCETZ;
- frameCETZ = NULL;
-}
-
-void frmContactEditor::ModifyBusinessTimezone( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessTimezones,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
- frameCETZ->SetupPointers(&BusinessTZList,
- &BusinessTZListAltID,
- &BusinessTZListPID,
- &BusinessTZListType,
- &BusinessTZListTokens,
- &BusinessTZListMediatype,
- &BusinessTZListPref,
- lboBusinessTimezones,
- intSelectedData);
- frameCETZ->SetEditorMode(TRUE, CE_WORK);
- frameCETZ->ShowModal();
- delete frameCETZ;
- frameCETZ = NULL;
-}
-
-void frmContactEditor::DeleteBusinessTimezone( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessTimezones,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboBusinessTimezones->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &BusinessTZList,
- &BusinessTZListAltID, &BusinessTZListPID,
- &BusinessTZListType, &BusinessTZListTokens,
- &BusinessTZListMediatype, &BusinessTZListPref);
-
-}
-
-void frmContactEditor::AddBusinessGeoposition( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
- frameCEGeo->SetEditorMode(FALSE, CE_WORK);
- intResult = GetLastInt(&BusinessGeographyList);
- frameCEGeo->SetupPointers(&BusinessGeographyList,
- &BusinessGeographyListAltID,
- &BusinessGeographyListPID,
- &BusinessGeographyListType,
- &BusinessGeographyListTokens,
- &BusinessGeographyListMediatype,
- &BusinessGeographyListPref,
- lboBusinessGeoposition,
- (intValueSeek));
- frameCEGeo->ShowModal();
- delete frameCEGeo;
- frameCEGeo = NULL;
-}
-
-void frmContactEditor::ModifyBusinessGeoposition( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessGeoposition,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
- frameCEGeo->SetupPointers(&BusinessGeographyList,
- &BusinessGeographyListAltID,
- &BusinessGeographyListPID,
- &BusinessGeographyListType,
- &BusinessGeographyListTokens,
- &BusinessGeographyListMediatype,
- &BusinessGeographyListPref,
- lboBusinessGeoposition,
- intSelectedData);
- frameCEGeo->SetEditorMode(TRUE, CE_WORK);
- frameCEGeo->ShowModal();
- delete frameCEGeo;
- frameCEGeo = NULL;
-}
-
-void frmContactEditor::DeleteBusinessGeoposition( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessGeoposition,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboBusinessGeoposition->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &BusinessGeographyList,
- &BusinessGeographyListAltID, &BusinessGeographyListPID,
- &BusinessGeographyListType, &BusinessGeographyListTokens,
- &BusinessGeographyListMediatype, &BusinessGeographyListPref);
-
-}
-
-void frmContactEditor::AddBusinessWebsite( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
- frameCEWeb->SetEditorMode(FALSE, CE_WORK);
- intResult = GetLastInt(&BusinessWebsiteList);
- frameCEWeb->SetupPointers(&BusinessWebsiteList,
- &BusinessWebsiteListAltID,
- &BusinessWebsiteListPID,
- &BusinessWebsiteListType,
- &BusinessWebsiteListTokens,
- &BusinessWebsiteListMediatype,
- &BusinessWebsiteListPref,
- lboBusinessWebsites,
- (intValueSeek));
- frameCEWeb->ShowModal();
- delete frameCEWeb;
- frameCEWeb = NULL;
-}
-
-void frmContactEditor::ModifyBusinessWebsite( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessWebsites,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
- frameCEWeb->SetupPointers(&BusinessWebsiteList,
- &BusinessWebsiteListAltID,
- &BusinessWebsiteListPID,
- &BusinessWebsiteListType,
- &BusinessWebsiteListTokens,
- &BusinessWebsiteListMediatype,
- &BusinessWebsiteListPref,
- lboBusinessWebsites,
- intSelectedData);
- frameCEWeb->SetEditorMode(TRUE, CE_WORK);
- frameCEWeb->ShowModal();
- delete frameCEWeb;
- frameCEWeb = NULL;
-}
-
-void frmContactEditor::DeleteBusinessWebsite( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessWebsites,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboBusinessWebsites->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &BusinessWebsiteList,
- &BusinessWebsiteListAltID, &BusinessWebsiteListPID,
- &BusinessWebsiteListType, &BusinessWebsiteListTokens,
- &BusinessWebsiteListMediatype, &BusinessWebsiteListPref);
-
-}
-
-void frmContactEditor::AddBusinessTitle( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
- frameCETitle->SetEditorMode(FALSE, CE_WORK);
- intResult = GetLastInt(&BusinessTitleList);
- frameCETitle->SetupPointers(&BusinessTitleList,
- &BusinessTitleListLanguage,
- &BusinessTitleListAltID,
- &BusinessTitleListPID,
- &BusinessTitleListType,
- &BusinessTitleListTokens,
- &BusinessTitleListPref,
- lboBusinessTitles,
- (intValueSeek));
- frameCETitle->ShowModal();
- delete frameCETitle;
- frameCETitle = NULL;
-}
-
-void frmContactEditor::ModifyBusinessTitle( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessTitles,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
- frameCETitle->SetupPointers(&BusinessTitleList,
- &BusinessTitleListLanguage,
- &BusinessTitleListAltID,
- &BusinessTitleListPID,
- &BusinessTitleListType,
- &BusinessTitleListTokens,
- &BusinessTitleListPref,
- lboBusinessTitles,
- intSelectedData);
- frameCETitle->SetEditorMode(TRUE, CE_WORK);
- frameCETitle->ShowModal();
- delete frameCETitle;
- frameCETitle = NULL;
-}
-
-void frmContactEditor::DeleteBusinessTitle( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessTitles,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboTitles->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &BusinessTitleList,
- &BusinessTitleListLanguage, &BusinessTitleListAltID,
- &BusinessTitleListPID, &BusinessTitleListType,
- &BusinessTitleListTokens, &BusinessTitleListPref);
-
-}
-
-void frmContactEditor::AddBusinessRole( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
- frameCERole->SetEditorMode(FALSE, CE_WORK);
- intResult = GetLastInt(&BusinessRoleList);
- frameCERole->SetupPointers(&BusinessRoleList,
- &BusinessRoleListLanguage,
- &BusinessRoleListAltID,
- &BusinessRoleListPID,
- &BusinessRoleListType,
- &BusinessRoleListTokens,
- &BusinessRoleListPref,
- lboBusinessRoles,
- (intValueSeek));
- frameCERole->ShowModal();
- delete frameCERole;
- frameCERole = NULL;
-}
-
-void frmContactEditor::ModifyBusinessRole( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessRoles,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
- frameCERole->SetupPointers(&BusinessRoleList,
- &BusinessRoleListLanguage,
- &BusinessRoleListAltID,
- &BusinessRoleListPID,
- &BusinessRoleListType,
- &BusinessRoleListTokens,
- &BusinessRoleListPref,
- lboBusinessRoles,
- intSelectedData);
- frameCERole->SetEditorMode(TRUE, CE_WORK);
- frameCERole->ShowModal();
- delete frameCERole;
- frameCERole = NULL;
-}
-
-void frmContactEditor::DeleteBusinessRole( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessRoles,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboBusinessRoles->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &BusinessRoleList,
- &BusinessRoleListLanguage, &BusinessRoleListAltID,
- &BusinessRoleListPID, &BusinessRoleListType,
- &BusinessRoleListTokens, &BusinessRoleListPref);
-
-}
-
-void frmContactEditor::AddBusinessOrganisation( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
- frameCEOrg->SetEditorMode(FALSE, CE_WORK);
- intResult = GetLastInt(&GeneralOrganisationsList);
- frameCEOrg->SetupPointers(&GeneralOrganisationsList,
- &BusinessOrganisationsListLanguage,
- &BusinessOrganisationsListSortAs,
- &BusinessOrganisationsListAltID,
- &BusinessOrganisationsListPID,
- &BusinessOrganisationsListType,
- &BusinessOrganisationsListTokens,
- &BusinessOrganisationsListPref,
- lboBusinessOrganisations,
- (intValueSeek));
- frameCEOrg->ShowModal();
- delete frameCEOrg;
- frameCEOrg = NULL;
-}
-
-void frmContactEditor::ModifyBusinessOrganisation( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessOrganisations,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
- frameCEOrg->SetupPointers(&BusinessOrganisationsList,
- &BusinessOrganisationsListLanguage,
- &BusinessOrganisationsListSortAs,
- &BusinessOrganisationsListAltID,
- &BusinessOrganisationsListPID,
- &BusinessOrganisationsListType,
- &BusinessOrganisationsListTokens,
- &BusinessOrganisationsListPref,
- lboBusinessOrganisations,
- intSelectedData);
- frameCEOrg->SetEditorMode(TRUE, CE_WORK);
- frameCEOrg->ShowModal();
- delete frameCEOrg;
- frameCEOrg = NULL;
-}
-
-void frmContactEditor::DeleteBusinessOrganisation( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessOrganisations,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboBusinessOrganisations->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &BusinessOrganisationsList,
- &BusinessOrganisationsListLanguage, &BusinessOrganisationsListSortAs,
- &BusinessOrganisationsListAltID, &BusinessOrganisationsListPID,
- &BusinessOrganisationsListType, &BusinessOrganisationsListTokens,
- &BusinessOrganisationsListPref);
-
-}
-
-void frmContactEditor::AddBusinessNote( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
- frameCENote->SetEditorMode(FALSE, CE_WORK);
- intResult = GetLastInt(&BusinessNoteList);
- frameCENote->SetupPointers(&BusinessNoteList,
- &BusinessNoteListLanguage,
- &BusinessNoteListAltID,
- &BusinessNoteListPID,
- &BusinessNoteListType,
- &BusinessNoteListTokens,
- &BusinessNoteListPref,
- lboBusinessNotes,
- (intValueSeek));
- frameCENote->ShowModal();
- delete frameCENote;
- frameCENote = NULL;
-}
-
-void frmContactEditor::ModifyBusinessNote( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessNotes,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
- frameCENote->SetupPointers(&BusinessNoteList,
- &BusinessNoteListLanguage,
- &BusinessNoteListAltID,
- &BusinessNoteListPID,
- &BusinessNoteListType,
- &BusinessNoteListTokens,
- &BusinessNoteListPref,
- lboBusinessNotes,
- intSelectedData);
- frameCENote->SetEditorMode(TRUE, CE_WORK);
- frameCENote->ShowModal();
- delete frameCENote;
- frameCENote = NULL;
-}
-
-void frmContactEditor::DeleteBusinessNote( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboBusinessNotes,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboBusinessNotes->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &BusinessNoteList,
- &BusinessNoteListLanguage, &BusinessNoteListAltID,
- &BusinessNoteListPID, &BusinessNoteListType,
- &BusinessNoteListTokens, &BusinessNoteListPref);
-
-}
-
-void frmContactEditor::AddCategory( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorCategory *frameCECategory = new frmContactEditorCategory ( this );
- frameCECategory->SetEditorMode(FALSE);
- intResult = GetLastInt(&CategoriesList);
- frameCECategory->SetupPointers(&CategoriesList,
- &CategoriesListAltID,
- &CategoriesListPID,
- &CategoriesListType,
- &CategoriesListTokens,
- &CategoriesListPref,
- lboCategories,
- (intValueSeek));
- frameCECategory->ShowModal();
- delete frameCECategory;
- frameCECategory = NULL;
-}
-
-void frmContactEditor::ModifyCategory( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboCategories,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorCategory *frameCECategory = new frmContactEditorCategory ( this );
- frameCECategory->SetupPointers(&CategoriesList,
- &CategoriesListAltID,
- &CategoriesListPID,
- &CategoriesListType,
- &CategoriesListTokens,
- &CategoriesListPref,
- lboCategories,
- intSelectedData);
- frameCECategory->SetEditorMode(TRUE);
- frameCECategory->ShowModal();
- delete frameCECategory;
- frameCECategory = NULL;
-}
-
-void frmContactEditor::DeleteCategory( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboCategories,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboCategories->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &CategoriesList,
- &CategoriesListAltID, &CategoriesListPID,
- &CategoriesListType, &CategoriesListTokens,
- &CategoriesListPref);
-
-}
-
-void frmContactEditor::AddGroup( wxCommandEvent& event )
-{
-
- int intResult = 0;
-
- XABViewMode XVMData = MainPtr->GetViewMode();
-
- frmContactEditorGroup *frameCEGroup = new frmContactEditorGroup ( this );
- frameCEGroup->SetEditorMode(FALSE, XVMData);
- intResult = GetLastInt(&GroupsList);
- frameCEGroup->SetupPointers(&GroupsList,
- lboGroups,
- wxSContactAccount,
- intValueSeek);
- frameCEGroup->ShowModal();
- delete frameCEGroup;
- frameCEGroup = NULL;
-
-}
-
-void frmContactEditor::ModifyGroup( wxCommandEvent& event )
-{
-
- return;
-
-}
-
-void frmContactEditor::DeleteGroup( wxCommandEvent& event )
-{
-
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboGroups,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboGroups->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &GroupsList);
-
-}
-
-void frmContactEditor::AddPicture( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorPicture *frameCEPicture = new frmContactEditorPicture ( this );
- frameCEPicture->SetEditorMode(FALSE);
- intResult = GetLastInt(&PicturesList);
- frameCEPicture->SetupPointers(&PicturesList,
- &PicturesListAltID,
- &PicturesListPID,
- &PicturesListType,
- &PicturesListPicEncType,
- &PicturesListPictureType,
- &PicturesListTokens,
- &PicturesListMediatype,
- &PicturesListPref,
- lboPictures,
- (intValueSeek));
- frameCEPicture->ShowModal();
- delete frameCEPicture;
- frameCEPicture = NULL;
-}
-
-void frmContactEditor::ModifyPicture( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboPictures,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorPicture *frameCEPicture = new frmContactEditorPicture ( this );
- frameCEPicture->SetupPointers(&PicturesList,
- &PicturesListAltID,
- &PicturesListPID,
- &PicturesListType,
- &PicturesListPicEncType,
- &PicturesListPictureType,
- &PicturesListTokens,
- &PicturesListMediatype,
- &PicturesListPref,
- lboPictures,
- intSelectedData);
- frameCEPicture->SetEditorMode(TRUE);
- frameCEPicture->ShowModal();
- delete frameCEPicture;
- frameCEPicture = NULL;
-
-}
-
-void frmContactEditor::DeletePicture( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboPictures,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboPictures->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData,
- &PicturesList, &PicturesListAltID, &PicturesListPID, &PicturesListType,
- &PicturesListPicEncType, &PicturesListPictureType, &PicturesListTokens,
- &PicturesListMediatype, &PicturesListPref);
-
- wxMemoryInputStream istream(misc_emptyimage_png, sizeof(misc_emptyimage_png));
- wxImage misc_emptyimage_png(istream, wxBITMAP_TYPE_PNG);
- PictureImage = (wxBitmap)misc_emptyimage_png;
-
- imgPicture->SetBitmap(PictureImage);
-}
-
-void frmContactEditor::LoadPicture( wxListEvent& event )
-{
-
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboPictures,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- std::string base64dec;
-
- std::map<int,std::string>::iterator initier;
- std::map<int,wxString>::iterator pictypeiter;
-
- initier = PicturesList.find(intSelectedData);
- pictypeiter = PicturesListPictureType.find(intSelectedData);
-
- base64dec = base64_decode(initier->second);
-
- wxMemoryInputStream istream(base64dec.c_str(), (size_t)base64dec.size());
- wxImage photo;
- //wxMemoryInputStream istream(base64dec, (size_t)base64dec.size());
-
- wxPuts(wxT("PicType:") + pictypeiter->second);
-
- if (pictypeiter->second == wxT("image/jpeg")){
-
- if (!photo.LoadFile(istream, wxBITMAP_TYPE_JPEG)){
-
- return;
-
- }
-
- } else if (pictypeiter->second == wxT("image/png")){
-
- if (!photo.LoadFile(istream, wxBITMAP_TYPE_PNG)){
-
- return;
-
- }
-
- } else {
-
- return;
-
- }
-
- PictureImage = (wxBitmap)photo;
- imgPicture->SetBitmap(PictureImage);
-
-}
-
-void frmContactEditor::LoadLogo( wxListEvent& event )
-{
-
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboLogos,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- std::string base64dec;
-
- std::map<int,std::string>::iterator initier;
-
- initier = LogosList.find(intSelectedData);
-
- base64dec = base64_decode(initier->second);
-
-
- wxMemoryInputStream istream(base64dec.c_str(), (size_t)base64dec.size());
- wxImage photo;
- //wxMemoryInputStream istream(base64dec, (size_t)base64dec.size());
-
- if (!photo.LoadFile(istream, wxBITMAP_TYPE_ANY)){
-
- return;
-
- }
-
-
- LogoImage = (wxBitmap)photo;
- imgLogo->SetBitmap(LogoImage);
-
-}
-
-void frmContactEditor::AddLogo( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorPicture *frameCELogo = new frmContactEditorPicture ( this );
- frameCELogo->SetEditorMode(FALSE);
- intResult = GetLastInt(&LogosList);
- frameCELogo->SetupPointers(&LogosList,
- &LogosListAltID,
- &LogosListPID,
- &LogosListType,
- &LogosListPicEncType,
- &LogosListPictureType,
- &LogosListTokens,
- &LogosListMediatype,
- &LogosListPref,
- lboLogos,
- (intValueSeek));
- frameCELogo->ShowModal();
- delete frameCELogo;
- frameCELogo = NULL;
-}
-
-void frmContactEditor::ModifyLogo( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboLogos,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorPicture *frameCELogo = new frmContactEditorPicture ( this );
- frameCELogo->SetupPointers(&LogosList,
- &LogosListAltID,
- &LogosListPID,
- &LogosListType,
- &LogosListPicEncType,
- &LogosListPictureType,
- &LogosListTokens,
- &LogosListMediatype,
- &LogosListPref,
- lboLogos,
- intSelectedData);
- frameCELogo->SetEditorMode(TRUE);
- frameCELogo->ShowModal();
- delete frameCELogo;
- frameCELogo = NULL;
-}
-
-void frmContactEditor::DeleteLogo( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboLogos,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboLogos->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData,
- &LogosList, &LogosListAltID, &LogosListPID, &LogosListType,
- &LogosListPicEncType, &LogosListPictureType, &LogosListTokens,
- &LogosListMediatype, &LogosListPref);
-
- wxMemoryInputStream istream(misc_emptyimage_png, sizeof(misc_emptyimage_png));
- wxImage misc_emptyimage_png(istream, wxBITMAP_TYPE_PNG);
- LogoImage = (wxBitmap)misc_emptyimage_png;
-
- imgLogo->SetBitmap(LogoImage);
-}
-
-void frmContactEditor::AddSound( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorSound *frameCESound = new frmContactEditorSound ( this );
- frameCESound->SetEditorMode(FALSE);
- intResult = GetLastInt(&SoundsList);
- frameCESound->SetupPointers(&SoundsList,
- &SoundsListAltID,
- &SoundsListPID,
- &SoundsListType,
- &SoundsListAudioType,
- &SoundsListAudioEncType,
- &SoundsListTokens,
- &SoundsListMediatype,
- &SoundsListPref,
- lboSounds,
- (intValueSeek));
- frameCESound->ShowModal();
- delete frameCESound;
- frameCESound = NULL;
-}
-
-void frmContactEditor::ModifySound( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboSounds,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorSound *frameCESound = new frmContactEditorSound ( this );
- frameCESound->SetupPointers(&SoundsList,
- &SoundsListAltID,
- &SoundsListPID,
- &SoundsListType,
- &SoundsListAudioType,
- &SoundsListAudioEncType,
- &SoundsListTokens,
- &SoundsListMediatype,
- &SoundsListPref,
- lboSounds,
- intSelectedData);
- frameCESound->SetEditorMode(TRUE);
- frameCESound->ShowModal();
- delete frameCESound;
- frameCESound = NULL;
-}
-
-void frmContactEditor::DeleteSound( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboSounds,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboSounds->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &SoundsList, &SoundsListAltID,
- &SoundsListPID, &SoundsListType, &SoundsListAudioType,
- &SoundsListAudioEncType, &SoundsListTokens, &SoundsListMediatype,
- &SoundsListPref);
-
-}
-
-void frmContactEditor::PlaySoundDetach()
-{
-
- if (!AudioStreamPlayback.openFromMemory(base64dec.c_str(), base64declen)){
-
- // Can't load file. We must flee...
- // Also show an error message too.
-
- wxMessageBox(_("This file is in an audio format that is unsupported or is not an audio file."), _("Error opening audio file"), wxICON_ERROR);
-
- return;
-
- }
-
- btnStop->Enable();
-
- //AudioStreamPlayback.setbuffer(AudioBuffer);
- AudioStreamPlayback.play();
-
- /*timespec n1, n2;
-
- n1.tv_sec = 0;
- n1.tv_nsec = 100000000L;*/
-
- //while (TimeA != TimeB){
- while (AudioStreamPlayback.getStatus() == sf::SoundSource::Playing){
-
- // We poll this every 100ms in order to conserve CPU usage.
-
- SleepFor(100000000);
-
- }
-
- btnStop->Disable();
-
-}
-
-void frmContactEditor::PlaySound( wxCommandEvent& event )
-{
-
- //sf::Music *AudioPlayback = new sf::Music;
- //AudioStream *AudioStreamPlayback = new AudioStream;
- //sf::SoundBuffer *AudioBuffer = new sf::SoundBuffer;
-
- //sf::Sound *AudioPlayback = new sf::Sound;
-
- //delete(AudioPlayback);
-
- //delete(AudioPlayback);
- //delete(AudioStreamPlayback);
- //delete(AudioBuffer);
-
- //AudioPlayback = NULL;
- //AudioStreamPlayback = NULL;
- //AudioBuffer = NULL;
-
- //return;
-
- long longSelected = -1;
- int intSelectedData = 0;
-
- // Check if sound is still being played and if it is, stop it.
-
- if (AudioStreamPlayback.getStatus() == sf::SoundSource::Playing){
-
- AudioStreamPlayback.stop();
-
- }
-
- if (!GetSelectedItem(lboSounds,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- std::map<int, std::string>::iterator initier;
-
- initier = SoundsList.find(intSelectedData);
-
- base64dec = base64_decode(initier->second);
- base64declen = base64dec.size();
-
- std::thread AudioPlaybackThread(&frmContactEditor::PlaySoundDetach, this);
- AudioPlaybackThread.detach();
-
- return;
-
-}
-
-void frmContactEditor::StopSound( wxCommandEvent& event )
-{
-
- if (AudioStreamPlayback.getStatus() == sf::SoundSource::Playing){
-
- AudioStreamPlayback.stop();
-
- }
-
- btnStop->Disable();
-
- return;
-
-}
-
-void frmContactEditor::AddCalendarAddress( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
- frameCECalAdr->SetEditorMode(FALSE);
- intResult = GetLastInt(&CalendarList);
- frameCECalAdr->SetupPointers(&CalendarList,
- &CalendarListAltID,
- &CalendarListPID,
- &CalendarListType,
- &CalendarListTokens,
- &CalendarListPref,
- lboCalendarAddresses,
- (intValueSeek));
- frameCECalAdr->ShowModal();
- delete frameCECalAdr;
- frameCECalAdr = NULL;
-}
-
-void frmContactEditor::ModifyCalendarAddress( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboCalendarAddresses,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
- frameCECalAdr->SetupPointers(&CalendarList,
- &CalendarListAltID,
- &CalendarListPID,
- &CalendarListType,
- &CalendarListTokens,
- &CalendarListPref,
- lboCalendarAddresses,
- intSelectedData);
- frameCECalAdr->SetEditorMode(TRUE);
- frameCECalAdr->ShowModal();
- delete frameCECalAdr;
- frameCECalAdr = NULL;
-}
-
-void frmContactEditor::DeleteCalendarAddress( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboCalendarAddresses,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboCalendarAddresses->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &CalendarList, &CalendarListAltID,
- &CalendarListPID, &CalendarListType, &CalendarListTokens,
- &CalendarListPref);
-
-}
-
-void frmContactEditor::AddCalendarRequest( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
- frameCECalAdr->SetEditorMode(FALSE);
- intResult = GetLastInt(&CalendarRequestList);
- frameCECalAdr->SetupPointers(&CalendarRequestList,
- &CalendarRequestListAltID,
- &CalendarRequestListPID,
- &CalendarRequestListType,
- &CalendarRequestListTokens,
- &CalendarRequestListPref,
- lboCalendarRequestAddress,
- (intValueSeek));
- frameCECalAdr->ShowModal();
- delete frameCECalAdr;
- frameCECalAdr = NULL;
-}
-
-void frmContactEditor::ModifyCalendarRequest( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboCalendarRequestAddress,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
- frameCECalAdr->SetupPointers(&CalendarList,
- &CalendarRequestListAltID,
- &CalendarRequestListPID,
- &CalendarRequestListType,
- &CalendarRequestListTokens,
- &CalendarRequestListPref,
- lboCalendarRequestAddress,
- intSelectedData);
- frameCECalAdr->SetEditorMode(TRUE);
- frameCECalAdr->ShowModal();
- delete frameCECalAdr;
- frameCECalAdr = NULL;
-}
-
-void frmContactEditor::DeleteCalendarRequest( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboCalendarRequestAddress,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboCalendarRequestAddress->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &CalendarRequestList,
- &CalendarRequestListAltID, &CalendarRequestListPID,
- &CalendarRequestListType, &CalendarRequestListTokens,
- &CalendarRequestListPref);
-}
-
-void frmContactEditor::AddFreeBusy( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
- frameCECalAdr->SetEditorMode(FALSE);
- intResult = GetLastInt(&FreeBusyList);
- frameCECalAdr->SetupPointers(&FreeBusyList,
- &FreeBusyListAltID,
- &FreeBusyListPID,
- &FreeBusyListType,
- &FreeBusyListTokens,
- &FreeBusyListPref,
- lboFreeBusyAddresses,
- (intValueSeek));
- frameCECalAdr->ShowModal();
- delete frameCECalAdr;
- frameCECalAdr = NULL;
-}
-
-void frmContactEditor::ModifyFreeBusy( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboFreeBusyAddresses,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
- frameCECalAdr->SetupPointers(&FreeBusyList,
- &FreeBusyListAltID,
- &FreeBusyListPID,
- &FreeBusyListType,
- &FreeBusyListTokens,
- &FreeBusyListPref,
- lboFreeBusyAddresses,
- intSelectedData);
- frameCECalAdr->SetEditorMode(TRUE);
- frameCECalAdr->ShowModal();
- delete frameCECalAdr;
- frameCECalAdr = NULL;
-}
-
-void frmContactEditor::DeleteFreeBusy( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboFreeBusyAddresses,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboFreeBusyAddresses->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &FreeBusyList, &FreeBusyListAltID,
- &FreeBusyListPID, &FreeBusyListType, &FreeBusyListTokens,
- &FreeBusyListPref);
-
-}
-
-void frmContactEditor::AddKey( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorKey *frameCEKey = new frmContactEditorKey ( this );
- frameCEKey->SetEditorMode(FALSE);
- intResult = GetLastInt(&KeyList);
- frameCEKey->SetupPointers(&KeyList,
- &KeyListAltID,
- &KeyListPID,
- &KeyListKeyType,
- &KeyListDataType,
- &KeyListType,
- &KeyListTokens,
- &KeyListPref,
- lboKeys,
- (intValueSeek));
- frameCEKey->ShowModal();
- delete frameCEKey;
- frameCEKey = NULL;
-}
-
-void frmContactEditor::ModifyKey( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboKeys,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorKey *frameCEKey = new frmContactEditorKey ( this );
- frameCEKey->SetupPointers(&KeyList,
- &KeyListAltID,
- &KeyListPID,
- &KeyListKeyType,
- &KeyListDataType,
- &KeyListType,
- &KeyListTokens,
- &KeyListPref,
- lboKeys,
- intSelectedData);
- frameCEKey->SetEditorMode(TRUE);
- frameCEKey->ShowModal();
- delete frameCEKey;
- frameCEKey = NULL;
-}
-
-void frmContactEditor::DeleteKey( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboKeys,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboKeys->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &KeyList, &KeyListAltID,
- &KeyListPID, &KeyListKeyType, &KeyListDataType, &KeyListType,
- &KeyListTokens, &KeyListPref);
-
-}
-
-void frmContactEditor::AddVendorNamespace( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorVendor *frameCEVen = new frmContactEditorVendor ( this );
- frameCEVen->SetEditorMode(FALSE);
- intResult = GetLastInt(&VendorList);
- frameCEVen->SetupPointers(&VendorList,
- &VendorListPEN,
- &VendorListElement,
- lboVendorNamespace,
- (intValueSeek));
- frameCEVen->ShowModal();
- delete frameCEVen;
- frameCEVen = NULL;
-}
-
-void frmContactEditor::ModifyVendorNamespace( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboVendorNamespace,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorVendor *frameCEVen = new frmContactEditorVendor ( this );
- frameCEVen->SetupPointers(&VendorList,
- &VendorListPEN,
- &VendorListElement,
- lboVendorNamespace,
- intSelectedData);
- frameCEVen->SetEditorMode(TRUE);
- frameCEVen->ShowModal();
- delete frameCEVen;
- frameCEVen = NULL;
-}
-
-void frmContactEditor::DeleteVendorNamespace( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboVendorNamespace,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboVendorNamespace->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &VendorList, &VendorListPEN,
- &VendorListElement);
-
-}
-
-void frmContactEditor::AddXToken( wxCommandEvent& event )
-{
- int intResult = 0;
-
- frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
- frameCEXT->SetEditorMode(FALSE);
- intResult = GetLastInt(&XTokenList);
- frameCEXT->SetupPointers(&XTokenList,
- &XTokenListTokens,
- lboXToken,
- (intValueSeek));
- frameCEXT->ShowModal();
- delete frameCEXT;
- frameCEXT = NULL;
-}
-
-void frmContactEditor::ModifyXToken( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboXToken,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
- frameCEXT->SetupPointers(&XTokenList,
- &XTokenListTokens,
- lboXToken,
- intSelectedData);
- frameCEXT->SetEditorMode(TRUE);
- frameCEXT->ShowModal();
- delete frameCEXT;
- frameCEXT = NULL;
-}
-
-void frmContactEditor::DeleteXToken( wxCommandEvent& event )
-{
- long longSelected = -1;
- int intSelectedData = 0;
-
- if (!GetSelectedItem(lboXToken,
- &longSelected,
- &intSelectedData)){
- return;
- }
-
- lboXToken->DeleteItem(longSelected);
-
- DeleteMapData(intSelectedData, &XTokenList, &XTokenListTokens);
-
-}
-
-void frmContactEditor::SaveContact( wxCommandEvent& event )
-{
-
- // Check if Display As combo box has a value in it.
- // Do not go any further if there is no value.
-
- wxString cmbDisplayAsValue = cmbDisplayAs->GetValue();
-
- if (cmbDisplayAsValue.IsEmpty()){
-
- wxMessageBox(_("Display As value cannot be left blank."), _("Display As value empty"), wxICON_ERROR);
- return;
-
- }
-
- // Save the updated contact data.
-
- vCard ContactData;
- wxString FilenameFinal;
- bool ReplaceContact = FALSE;
-
- if (cmbType->GetCurrentSelection() == 1 ||
- cmbType->GetCurrentSelection() == 3 ||
- cmbType->GetCurrentSelection() == 4){
-
- if (IsGroup == TRUE){
-
- // Mark contact for replacing.
-
- ReplaceContact = TRUE;
-
- }
-
- } else if (cmbType->GetCurrentSelection() == 2){
-
- if (IsGroup == TRUE){
-
- // Mark contact for replacing.
-
- ReplaceContact = TRUE;
-
- }
-
- }
-
- if (ReplaceContact == TRUE){
-
- wxString wxDelSplitFilename;
- wxString wxDelFinalFilename;
- wxString wxSDelDataURL;
- wxStringTokenizer wSTDelFilename(wxSContactFilename, wxT("/"));
- while(wSTDelFilename.HasMoreTokens()){
-
- wxDelSplitFilename = wSTDelFilename.GetNextToken();
-
- }
-
- wxSDelDataURL = wxDelSplitFilename;
-
- // Delete the contact from the server as it will be useless in certain
- // address book clients.
-
- ActMgrPtr->AddTask(2, cmbDisplayAs->GetValue(), wxSContactAccount, wxSDelDataURL, wxDelSplitFilename, wxSContactFilename, wxT(""));
-
- // Clear the filename so the trigger to recreate the UID is done.
-
- wxSContactFilename.Clear();
- EditMode = FALSE;
-
- }
-
- if (wxSContactFilename.IsEmpty()){
-
- // Generate a random UUID.
-
- UIDToken = GenerateUUID();
- UIDToken = UIDToken.MakeUpper();
-
- // Setup the filename.
-
- FilenameFinal = GetAccountDir(wxSContactAccount, FALSE);
-
-#if defined(__HAIKU__)
-
- //preffilename = wxT("noo");
-
-#elif defined(__WIN32__)
-
- FilenameFinal = GetAccountDir(wxSContactAccount, FALSE);
- FilenameFinal.Append(UIDToken);
- FilenameFinal.Append(wxT(".vcf"));
- wxSContactFilename = FilenameFinal;
-
-#else
-
- FilenameFinal = GetAccountDir(wxSContactAccount, FALSE);
- FilenameFinal.Append(UIDToken);
- FilenameFinal.Append(wxT(".vcf"));
- wxSContactFilename = FilenameFinal;
-
-#endif
-
- } else {
-
- if (UIDToken.IsEmpty()){
-
- // UID Token is empty. (Shouldn't be).
- // Generate a new UID Token.
-
- /*boost::uuids::uuid ContactUUID = boost::uuids::random_generator()();
- std::string sstContactUUID = boost::uuids::to_string(ContactUUID);
- wxString strContactUUID(sstContactUUID.c_str(), wxConvUTF8);
- UIDToken = strContactUUID;*/
- UIDToken = GenerateUUID();
- UIDToken = UIDToken.MakeUpper();
-
- }
- FilenameFinal = wxSContactFilename;
-
- }
-
- // Setup the data and write it into the account folder.
-
- // Begin preperations to write the contact to a file.
-
- bool boolValue = FALSE;
- bool boolValue2 = FALSE;
- bool FNFirst = TRUE;
- bool NNGeneralFirst = TRUE;
- bool NNHomeFirst = TRUE;
- bool NNWorkFirst = TRUE;
- int intFNCount = 0;
- std::map<int,int>::iterator intiter;
- std::map<int,wxString>::iterator striter;
-
- ContactData.Add(wxT("BEGIN"), wxT("VCARD"), FALSE);
- ContactData.Add(wxT("VERSION"), wxT("4.0"), FALSE);
-
- // Setup the version string.
-
- strValue.Append(wxT("-//Xestia//Address Book Version "));
- strValue.Append(wxT(XSDAB_VERSION));
- strValue.Append(wxT("//KW"));
-
- ContactData.Add(wxT("PRODID"), strValue, FALSE);
-
- // Setup the name.
-
- strValue.Clear();
-
- // Setup the name field.
-
- strValue = txtSurname->GetValue() + wxT(";") +
- txtForename->GetValue() + wxT(";") +
- txtOtherNames->GetValue() + wxT(";") +
- txtTitle->GetValue() + wxT(";") +
- txtSuffix->GetValue();
-
- strValue2 = ContactData.Convert(cmbDisplayAs->GetValue(), FALSE);
- strValue2.Trim();
-
- if (NameTokens.IsEmpty()){
- ContactData.Add(wxT("N;SORT-AS=\"") + strValue2 + wxT("\""), strValue, FALSE);
- } else {
- ContactData.Add(wxT("N;SORT-AS=\"") + strValue2 + wxT("\";") + NameTokens, strValue, FALSE);
- }
-
- if (cmbType->GetCurrentSelection() == 1){
-
- ContactData.AddRaw(wxT("KIND"), wxT("individual"));
-
- } else if (cmbType->GetCurrentSelection() == 2){
-
- ContactData.AddRaw(wxT("KIND"), wxT("group"));
-
- // Go through each of the members and write them out.
-
- for (std::map<int, wxString>::iterator itemiter = GroupsList.begin();
- itemiter != GroupsList.end(); ++itemiter){
-
- ContactData.Add(wxT("MEMBER:urn:uuid"), itemiter->second, FALSE);
-
- }
-
- } else if (cmbType->GetCurrentSelection() == 3){
-
- ContactData.AddRaw(wxT("KIND"), wxT("org"));
-
- } else if (cmbType->GetCurrentSelection() == 4){
-
- ContactData.AddRaw(wxT("KIND"), wxT("location"));
-
- }
-
-
- // Setup the nicknames (General, Home & Business).
-
- strValue.Clear();
- strValue2.Clear();
- strValue3.Clear();
-
- boolValue = FALSE;
- boolValue2 = FALSE;
- intValue2 = 0;
- intValue = 0;
-
- // Setup the gender.
-
- if (cmbGender->GetCurrentSelection() != 0){
-
- switch(cmbGender->GetCurrentSelection()){
-
- case 1:
-
- strValue = wxT("M");
- break;
-
- case 2:
-
- strValue = wxT("F");
- break;
-
- case 3:
-
- strValue = wxT("O");
- break;
-
- case 4:
-
- strValue = wxT("N");
- break;
-
- case 5:
-
- strValue = wxT("U");
- break;
-
- }
-
- }
-
- if (!txtGenderDescription->IsEmpty()){
-
- strValue2 = txtGenderDescription->GetValue();
-
- }
-
- if (!strValue.IsEmpty() || !strValue2.IsEmpty()){
-
- EscapeString(&strValue2, FALSE);
-
- if (!GenderTokens.IsEmpty()){
-
- if (!strValue2.IsEmpty()){
-
- ContactData.AddRaw(wxT("GENDER;") + GenderTokens, strValue + wxT(";") + strValue2);
-
- } else {
-
- ContactData.AddRaw(wxT("GENDER;") + GenderTokens, strValue);
-
- }
-
- } else {
-
- if (!strValue2.IsEmpty()){
-
- ContactData.AddRaw(wxT("GENDER"), strValue + wxT(";") + strValue2);
-
- } else {
-
- ContactData.AddRaw(wxT("GENDER"), strValue);
-
- }
-
- }
-
- }
-
- strValue.Clear();
- strValue2.Clear();
- strValue3.Clear();
-
- boolValue = FALSE;
- boolValue2 = FALSE;
- intValue2 = 0;
- intValue = 0;
-
- // Process Label.
-
- strValue3 = BirthdayAltID;
-
- if (!strValue3.IsEmpty()){
-
- strValue3.Trim();
- strValue3.Trim();
- boolValue2 = TRUE;
- strValue2.Append(wxT("ALTID=\"") + strValue3 + wxT("\""));
-
- boolValue = TRUE;
-
- }
-
- //strValue3 = ContactData.Convert(GeneralAddressList, FALSE);
- //strValue2 =
-
- // Process Language.
-
- strValue3 = BirthdayCalScale;
-
- if (!strValue3.IsEmpty()){
-
- strValue3.Trim();
- strValue3.Trim();
-
- if (boolValue2 == TRUE){
-
- strValue2.Append(wxT(";"));
-
- } else {
-
- boolValue2 = TRUE;
-
- }
-
- strValue2.Append(wxT("CALSCALE=") + strValue3);
-
- boolValue = TRUE;
-
- }
-
- // Process Tokens.
-
- strValue2 = BirthdayTokens;
-
- // Get the birthday and write it.
-
- ResetSaveProcessData();
-
- if (!txtBirthday->IsEmpty()){
-
- strValue = txtBirthday->GetValue();
-
- if (!strValue.IsEmpty() || !strValue2.IsEmpty()){
-
- if (!strValue2.IsEmpty()){
-
- EscapeString(&strValue2, FALSE);
- EscapeString(&strValue, FALSE);
-
- ContactData.AddRaw(wxT("BDAY;VALUE=text;") + strValue2 + wxT(";"), strValue);
-
- } else {
-
- EscapeString(&strValue, FALSE);
-
- ContactData.AddRaw(wxT("BDAY;VALUE=text"), strValue);
-
- }
-
- }
-
- } else {
-
- // Deal with date.
-
- // Get Day, Month & Year.
-
- wxDateTime BirthdayDate;
- wxDateTime::Month BirthdayMonth;
- int BirthdayDay;
- int BirthdayYear;
- wxString DataBeforeT;
- wxString DataAfterT;
- wxString FinalBirthdayString;
- bool ProcessDataAfterT = FALSE;
-
- BirthdayDate = dapBirthday->GetValue();
-
- if (BirthdayDate.IsValid()){
-
- BirthdayDay = BirthdayDate.GetDay();
- BirthdayMonth = BirthdayDate.GetMonth();
- BirthdayYear = BirthdayDate.GetYear();
-
- // Look for T and replace data before this.
-
- wxStringTokenizer wSTDate(Birthday, wxT("T"));
-
- while (wSTDate.HasMoreTokens()){
-
- if (ProcessDataAfterT == FALSE){
-
- DataBeforeT = wSTDate.GetNextToken();
- ProcessDataAfterT = TRUE;
-
- } else {
-
- DataAfterT = wSTDate.GetNextToken();
- break;
-
- }
-
- }
-
- // If there is not T then replace altogether.
-
- wxString FinalBirthdayDay;
- wxString FinalBirthdayMonth;
- wxString FinalBirthdayYear;
-
- if (BirthdayDay < 10){
-
- FinalBirthdayDay = wxT("0") + wxString::Format(wxT("%i"), BirthdayDay);
-
- } else {
-
- FinalBirthdayDay = wxString::Format(wxT("%i"), BirthdayDay);
-
- }
-
- if (((int)BirthdayMonth + 1) < 10){
-
- FinalBirthdayMonth = wxT("0") + wxString::Format(wxT("%i"), ((int)BirthdayMonth + 1));
-
- } else {
-
- FinalBirthdayMonth = wxString::Format(wxT("%i"), ((int)BirthdayMonth + 1));
-
- }
-
- if (BirthdayYear == 0){
-
- FinalBirthdayYear = wxT("--");
-
- } else {
-
- FinalBirthdayYear = wxString::Format(wxT("%i"), BirthdayYear);
-
- }
-
- if (!DataAfterT.IsEmpty()){
-
- FinalBirthdayString = FinalBirthdayYear + FinalBirthdayMonth + FinalBirthdayDay + wxT("T") + DataAfterT;
-
- } else {
-
- FinalBirthdayString = FinalBirthdayYear + FinalBirthdayMonth + FinalBirthdayDay;
-
- }
-
- if (!FinalBirthdayString.IsEmpty() || !strValue2.IsEmpty()){
-
- if (!strValue2.IsEmpty()){
-
- EscapeString(&strValue2, FALSE);
- EscapeString(&strValue, FALSE);
-
- ContactData.AddRaw(wxT("BDAY") + strValue2 + wxT(";"), FinalBirthdayString);
-
- } else {
-
- EscapeString(&strValue, FALSE);
-
- ContactData.AddRaw(wxT("BDAY"), FinalBirthdayString);
-
- }
-
- }
-
- }
-
- }
-
- ResetSaveProcessData();
-
- // Process Label.
-
- strValue3 = AnniversaryAltID;
-
- if (!strValue3.IsEmpty()){
-
- strValue3.Trim();
- strValue3.Trim();
- boolValue2 = TRUE;
- strValue2.Append(wxT("ALTID=\"") + strValue3 + wxT("\""));
-
- boolValue = TRUE;
-
- }
-
- //strValue3 = ContactData.Convert(GeneralAddressList, FALSE);
- //strValue2 =
-
- // Process Language.
-
- strValue3 = AnniversaryCalScale;
-
- if (!strValue3.IsEmpty()){
-
- strValue3.Trim();
- strValue3.Trim();
-
- if (boolValue2 == TRUE){
-
- strValue2.Append(wxT(";"));
-
- } else {
-
- boolValue2 = TRUE;
-
- }
-
- strValue2.Append(wxT("CALSCALE=") + strValue3);
-
- boolValue = TRUE;
-
- }
-
- // Process Tokens.
-
- strValue2 = AnniversaryTokens;
-
- // Deal with ANNIVERSARY.
-
- if (!txtAnniversary->IsEmpty()){
-
- strValue = txtAnniversary->GetValue();
-
- if (!strValue.IsEmpty() || !strValue2.IsEmpty()){
-
- if (!strValue2.IsEmpty()){
-
- EscapeString(&strValue2, FALSE);
- EscapeString(&strValue, FALSE);
-
- ContactData.AddRaw(wxT("ANNIVERSARY;VALUE=text;") + strValue2 + wxT(";"), strValue);
-
- } else {
-
- EscapeString(&strValue, FALSE);
-
- ContactData.AddRaw(wxT("ANNIVERSARY;VALUE=text"), strValue);
-
- }
-
- }
-
- } else {
-
- // Look for T and replace data before this.
-
- // Get Day, Month & Year.
-
- wxDateTime AnniversaryDate;
- wxDateTime::Month AnniversaryMonth;
- int AnniversaryDay;
- int AnniversaryYear;
- wxString DataBeforeT;
- wxString DataAfterT;
- wxString FinalAnniversaryString;
- bool ProcessDataAfterT = FALSE;
-
- AnniversaryDate = dapAnniversary->GetValue();
-
- if (AnniversaryDate.IsValid()){
-
- AnniversaryDay = AnniversaryDate.GetDay();
- AnniversaryMonth = AnniversaryDate.GetMonth();
- AnniversaryYear = AnniversaryDate.GetYear();
-
- // Look for T and replace data before this.
-
- wxStringTokenizer wSTDate(Anniversary, wxT("T"));
-
- while (wSTDate.HasMoreTokens()){
-
- if (ProcessDataAfterT == FALSE){
-
- DataBeforeT = wSTDate.GetNextToken();
- ProcessDataAfterT = TRUE;
-
- } else {
-
- DataAfterT = wSTDate.GetNextToken();
- break;
-
- }
-
- }
-
- // If there is not T then replace altogether.
-
- wxString FinalAnniversaryDay;
- wxString FinalAnniversaryMonth;
- wxString FinalAnniversaryYear;
-
- if (AnniversaryDay < 10){
-
- FinalAnniversaryDay = wxT("0") + wxString::Format(wxT("%i"), AnniversaryDay);
-
- } else {
-
- FinalAnniversaryDay = wxString::Format(wxT("%i"), AnniversaryDay);
-
- }
-
- if (((int)AnniversaryMonth + 1) < 10){
-
- FinalAnniversaryMonth = wxT("0") + wxString::Format(wxT("%i"), ((int)AnniversaryMonth + 1));
-
- } else {
-
- FinalAnniversaryMonth = wxString::Format(wxT("%i"), ((int)AnniversaryMonth + 1));
-
- }
-
- if (AnniversaryYear == 0){
-
- FinalAnniversaryYear = wxT("--");
-
- } else {
-
- FinalAnniversaryYear = wxString::Format(wxT("%i"), AnniversaryYear);
-
- }
-
- if (!DataAfterT.IsEmpty()){
-
- FinalAnniversaryString = FinalAnniversaryYear + FinalAnniversaryMonth + FinalAnniversaryDay + wxT("T") + DataAfterT;
-
- } else {
-
- FinalAnniversaryString = FinalAnniversaryYear + FinalAnniversaryMonth + FinalAnniversaryDay;
-
- }
-
- if (!FinalAnniversaryString.IsEmpty() || !strValue2.IsEmpty()){
-
- if (!strValue2.IsEmpty()){
-
- EscapeString(&strValue2, FALSE);
- EscapeString(&strValue, FALSE);
-
- ContactData.AddRaw(wxT("ANNIVERSARY") + strValue2 + wxT(";"), FinalAnniversaryString);
-
- } else {
-
- EscapeString(&strValue, FALSE);
-
- ContactData.AddRaw(wxT("ANNIVERSARY"), FinalAnniversaryString);
-
- }
-
- }
-
- }
-
- }
-
- // Setup the addresses (General, Home, Business).
-
- //intValue = GeneralAddressList.size();
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = GeneralAddressList.begin();
- iter != GeneralAddressList.end(); ++iter){
-
- int intSeekValue = iter->first;
-
- wxString strAddressString;
- wxString strAddressFinalValue;
- std::map<int, wxString>::iterator iterValue;
-
- strAddressString.Append(wxT(";;"));
-
- // Get Address
-
- iterValue = GeneralAddressList.find(intSeekValue);
- strAddressFinalValue = iterValue->second;
- ProcessCaptureStrings(&strAddressFinalValue);
- strAddressString.Append(strAddressFinalValue + wxT(";"));
- strAddressFinalValue.Clear();
-
- // Get Town
-
- iterValue = GeneralAddressListTown.find(intSeekValue);
- strAddressFinalValue = iterValue->second;
- ProcessCaptureStrings(&strAddressFinalValue);
- strAddressString.Append(strAddressFinalValue + wxT(";"));
- strAddressFinalValue.Clear();
-
- // Get County
-
- iterValue = GeneralAddressListCounty.find(intSeekValue);
- strAddressFinalValue = iterValue->second;
- ProcessCaptureStrings(&strAddressFinalValue);
- strAddressString.Append(strAddressFinalValue + wxT(";"));
- strAddressFinalValue.Clear();
-
- // Get Post Code
-
- iterValue = GeneralAddressListPostCode.find(intSeekValue);
- strAddressFinalValue = iterValue->second;
- ProcessCaptureStrings(&strAddressFinalValue);
- strAddressString.Append(strAddressFinalValue + wxT(";"));
- strAddressFinalValue.Clear();
-
- // Get Country
-
- iterValue = GeneralAddressListCountry.find(intSeekValue);
- strAddressFinalValue = iterValue->second;
- ProcessCaptureStrings(&strAddressFinalValue);
- strAddressString.Append(strAddressFinalValue);
- strAddressFinalValue.Clear();
-
- ProcessSaveData(wxT("ADR"), &strValue2, &boolValue2, &boolValue,
- &iter, &strAddressString, &ContactData,
- wxT("LABEL"), &GeneralAddressListLabel,
- wxT("LANGUAGE"), &GeneralAddressListLang,
- wxT("ALTID"), &GeneralAddressListAltID,
- wxT("PID"), &GeneralAddressListPID,
- wxT("GEO"), &GeneralAddressListGeo,
- wxT("TZ"), &GeneralAddressListTimezone,
- wxT("MEDIATYPE"), &GeneralAddressListMediatype,
- wxT("PREF"), &GeneralAddressListPref,
- wxT(""), &GeneralAddressListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = HomeAddressList.begin();
- iter != HomeAddressList.end(); ++iter){
-
- int intSeekValue = iter->first;
-
- wxString strAddressString;
- wxString strAddressFinalValue;
- std::map<int, wxString>::iterator iterValue;
-
- strAddressString.Append(wxT(";;"));
-
- // Get Address
-
- iterValue = HomeAddressList.find(intSeekValue);
- strAddressFinalValue = iterValue->second;
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressString.Append(strAddressFinalValue + wxT(";"));
-
- // Get Town
-
- iterValue = HomeAddressListTown.find(intSeekValue);
- strAddressFinalValue = iterValue->second;
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressString.Append(strAddressFinalValue + wxT(";"));
-
- // Get County
-
- iterValue = HomeAddressListCounty.find(intSeekValue);
- strAddressFinalValue = iterValue->second;
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressString.Append(strAddressFinalValue + wxT(";"));
-
- // Get Post Code
-
- iterValue = HomeAddressListPostCode.find(intSeekValue);
- strAddressFinalValue = iterValue->second;
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressString.Append(strAddressFinalValue + wxT(";"));
-
- // Get Country
-
- iterValue = HomeAddressListCountry.find(intSeekValue);
- strAddressFinalValue = iterValue->second;
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressString.Append(strAddressFinalValue);
-
- ProcessSaveData(wxT("ADR;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &strAddressString, &ContactData,
- wxT("LABEL"), &HomeAddressListLabel,
- wxT("LANGUAGE"), &HomeAddressListLang,
- wxT("ALTID"), &HomeAddressListAltID,
- wxT("PID"), &HomeAddressListPID,
- wxT("GEO"), &HomeAddressListGeo,
- wxT("TZ"), &HomeAddressListTimezone,
- wxT("MEDIATYPE"), &HomeAddressListMediatype,
- wxT("PREF"), &HomeAddressListPref,
- wxT(""), &HomeAddressListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = BusinessAddressList.begin();
- iter != BusinessAddressList.end(); ++iter){
-
- int intSeekValue = iter->first;
-
- wxString strAddressString;
- wxString strAddressFinalValue;
- std::map<int, wxString>::iterator iterValue;
-
- strAddressString.Append(wxT(";;"));
-
- // Get Address
-
- iterValue = BusinessAddressList.find(intSeekValue);
- strAddressFinalValue = iterValue->second;
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressString.Append(strAddressFinalValue + wxT(";"));
-
- // Get Town
-
- iterValue = BusinessAddressListTown.find(intSeekValue);
- strAddressFinalValue = iterValue->second;
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressString.Append(strAddressFinalValue + wxT(";"));
-
- // Get County
-
- iterValue = BusinessAddressListCounty.find(intSeekValue);
- strAddressFinalValue = iterValue->second;
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressString.Append(strAddressFinalValue + wxT(";"));
-
- // Get Post Code
-
- iterValue = BusinessAddressListPostCode.find(intSeekValue);
- strAddressFinalValue = iterValue->second;
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressString.Append(strAddressFinalValue + wxT(";"));
-
- // Get Country
-
- iterValue = BusinessAddressListCountry.find(intSeekValue);
- strAddressFinalValue = iterValue->second;
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressString.Append(strAddressFinalValue);
-
- ProcessSaveData(wxT("ADR;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &strAddressString, &ContactData,
- wxT("LABEL"), &BusinessAddressListLabel,
- wxT("LANGUAGE"), &BusinessAddressListLang,
- wxT("ALTID"), &BusinessAddressListAltID,
- wxT("PID"), &BusinessAddressListPID,
- wxT("GEO"), &BusinessAddressListGeo,
- wxT("TZ"), &BusinessAddressListTimezone,
- wxT("MEDIATYPE"), &BusinessAddressListMediatype,
- wxT("PREF"), &BusinessAddressListPref,
- wxT(""), &BusinessAddressListTokens );
-
- ResetSaveProcessData();
-
- }
-
- // Sort out nicknames (if any).
-
- for (std::map<int,wxString>::iterator iter = GeneralNicknamesList.begin();
- iter != GeneralNicknamesList.end(); ++iter){
-
- intValue2 = iter->first;
-
- // Process Alternative ID.
-
- ProcessSaveData(wxT("NICKNAME"), &strValue2, &boolValue2, &boolValue,
- &iter, &GeneralNicknamesList, &ContactData,
- wxT("LANGUAGE"), &GeneralNicknamesListLanguage,
- wxT("ALTID"), &GeneralNicknamesListAltID,
- wxT("PID"), &GeneralNicknamesListPID,
- wxT("PREF"), &GeneralNicknamesListPref,
- wxT(""), &GeneralNicknamesListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = HomeNicknamesList.begin();
- iter != HomeNicknamesList.end(); ++iter){
-
- ProcessSaveData(wxT("NICKNAME;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &HomeNicknamesList, &ContactData,
- wxT("LANGUAGE"), &HomeNicknamesListLanguage,
- wxT("ALTID"), &HomeNicknamesListAltID,
- wxT("PID"), &HomeNicknamesListPID,
- wxT("PREF"), &HomeNicknamesListPref,
- wxT(""), &HomeNicknamesListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = BusinessNicknamesList.begin();
- iter != BusinessNicknamesList.end(); ++iter){
-
- ProcessSaveData(wxT("NICKNAME;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &BusinessNicknamesList, &ContactData,
- wxT("LANGUAGE"), &BusinessNicknamesListLanguage,
- wxT("ALTID"), &BusinessNicknamesListAltID,
- wxT("PID"), &BusinessNicknamesListPID,
- wxT("PREF"), &BusinessNicknamesListPref,
- wxT(""), &BusinessNicknamesListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- // Sort out email (general, home and business).
-
- for (std::map<int,wxString>::iterator iter = GeneralEmailList.begin();
- iter != GeneralEmailList.end(); ++iter){
-
- //strValue3 = ContactData.Convert(GeneralAddressList, FALSE);
- //strValue2 =
-
- wxString strAddressFinalValue;
- std::map<int, wxString>::iterator iterValue;
-
- ProcessSaveData(wxT("EMAIL"), &strValue2, &boolValue2, &boolValue,
- &iter, &GeneralEmailList, &ContactData,
- wxT("ALTID"), &GeneralEmailListAltID,
- wxT("PID"), &GeneralEmailListPID,
- wxT("PREF"), &GeneralEmailListPref,
- wxT(""), &GeneralEmailListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = HomeEmailList.begin();
- iter != HomeEmailList.end(); ++iter){
-
- //strValue3 = ContactData.Convert(GeneralAddressList, FALSE);
- //strValue2 =
-
- ProcessSaveData(wxT("EMAIL;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &HomeEmailList, &ContactData,
- wxT("ALTID"), &HomeEmailListAltID,
- wxT("PID"), &HomeEmailListPID,
- wxT("PREF"), &HomeEmailListPref,
- wxT(""), &HomeEmailListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = BusinessEmailList.begin();
- iter != BusinessEmailList.end(); ++iter){
-
- //strValue3 = ContactData.Convert(GeneralAddressList, FALSE);
- //strValue2 =
-
- ProcessSaveData(wxT("EMAIL;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &BusinessEmailList, &ContactData,
- wxT("ALTID"), &BusinessEmailListAltID,
- wxT("PID"), &BusinessEmailListPID,
- wxT("PREF"), &BusinessEmailListPref,
- wxT(""), &BusinessEmailListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = GeneralIMList.begin();
- iter != GeneralIMList.end(); ++iter){
-
- intValue2 = iter->first;
-
- // Process Alternative ID.
-
- ProcessSaveData(wxT("IMPP"), &strValue2, &boolValue2, &boolValue,
- &iter, &GeneralIMList, &ContactData,
- wxT("ALTID"), &GeneralIMListAltID,
- wxT("PID"), &GeneralIMListPID,
- wxT("MEDIATYPE"), &GeneralIMListMediatype,
- wxT("PREF"), &GeneralIMListPref,
- wxT(""), &GeneralIMListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = HomeIMList.begin();
- iter != HomeIMList.end(); ++iter){
-
- ProcessSaveData(wxT("IMPP;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &HomeIMList, &ContactData,
- wxT("ALTID"), &HomeIMListAltID,
- wxT("PID"), &HomeIMListPID,
- wxT("MEDIATYPE"), &HomeIMListMediatype,
- wxT("PREF"), &HomeIMListPref,
- wxT(""), &HomeIMListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = BusinessIMList.begin();
- iter != BusinessIMList.end(); ++iter){
-
- ProcessSaveData(wxT("IMPP;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &BusinessIMList, &ContactData,
- wxT("ALTID"), &BusinessIMListAltID,
- wxT("PID"), &BusinessIMListPID,
- wxT("MEDIATYPE"), &BusinessIMListMediatype,
- wxT("PREF"), &BusinessIMListPref,
- wxT(""), &BusinessIMListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = GeneralTelephoneList.begin();
- iter != GeneralTelephoneList.end(); ++iter){
-
- wxString strAddressFinalValue = iter->second;
-
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressFinalValue.insert(0, wxT("tel:"));
-
- ProcessSaveData(wxT("TEL"), &strValue2, &boolValue2, &boolValue,
- &iter, &strAddressFinalValue, &ContactData,
- wxT("ALTID"), &GeneralTelephoneListAltID,
- wxT("PID"), &GeneralTelephoneListPID,
- wxT("TYPE"), &GeneralTelephoneListType,
- wxT("PREF"), &GeneralTelephoneListPref,
- wxT(""), &GeneralTelephoneListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = HomeTelephoneList.begin();
- iter != HomeTelephoneList.end(); ++iter){
-
- wxString strAddressFinalValue = iter->second;
-
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressFinalValue.insert(0, wxT("tel:"));
-
- ProcessSaveData(wxT("TEL"), &strValue2, &boolValue2, &boolValue,
- &iter, &strAddressFinalValue, &ContactData,
- wxT("ALTID"), &HomeTelephoneListAltID,
- wxT("PID"), &HomeTelephoneListPID,
- wxT("TYPE"), &HomeTelephoneListType,
- wxT("PREF"), &HomeTelephoneListPref,
- wxT(""), &HomeTelephoneListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = BusinessTelephoneList.begin();
- iter != BusinessTelephoneList.end(); ++iter){
-
- wxString strAddressFinalValue = iter->second;
-
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressFinalValue.insert(0, wxT("tel:"));
-
- ProcessSaveData(wxT("TEL"), &strValue2, &boolValue2, &boolValue,
- &iter, &strAddressFinalValue, &ContactData,
- wxT("ALTID"), &BusinessTelephoneListAltID,
- wxT("PID"), &BusinessTelephoneListPID,
- wxT("TYPE"), &BusinessTelephoneListType,
- wxT("PREF"), &BusinessTelephoneListPref,
- wxT(""), &BusinessTelephoneListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = GeneralLanguageList.begin();
- iter != GeneralLanguageList.end(); ++iter){
-
- intValue2 = iter->first;
-
- ProcessSaveData(wxT("LANG"), &strValue2, &boolValue2, &boolValue,
- &iter, &GeneralLanguageList, &ContactData,
- wxT("ALTID"), &GeneralLanguageListAltID,
- wxT("PID"), &GeneralLanguageListPID,
- wxT("PREF"), &GeneralLanguageListPref,
- wxT(""), &GeneralLanguageListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = HomeLanguageList.begin();
- iter != HomeLanguageList.end(); ++iter){
-
- ProcessSaveData(wxT("LANG;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &HomeLanguageList, &ContactData,
- wxT("ALTID"), &HomeLanguageListAltID,
- wxT("PID"), &HomeLanguageListPID,
- wxT("PREF"), &HomeLanguageListPref,
- wxT(""), &HomeLanguageListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = BusinessLanguageList.begin();
- iter != BusinessLanguageList.end(); ++iter){
-
- ProcessSaveData(wxT("LANG;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &BusinessLanguageList, &ContactData,
- wxT("ALTID"), &BusinessLanguageListAltID,
- wxT("PID"), &BusinessLanguageListPID,
- wxT("PREF"), &BusinessLanguageListPref,
- wxT(""), &BusinessLanguageListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = GeneralTZList.begin();
- iter != GeneralTZList.end(); ++iter){
-
- ProcessSaveData(wxT("TZ"), &strValue2, &boolValue2, &boolValue,
- &iter, &GeneralTZList, &ContactData,
- wxT("ALTID"), &GeneralTZListAltID,
- wxT("PID"), &GeneralTZListPID,
- wxT("MEDIATYPE"), &GeneralTZListMediatype,
- wxT("PREF"), &GeneralTZListPref,
- wxT(""), &GeneralTZListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = HomeTZList.begin();
- iter != HomeTZList.end(); ++iter){
-
- ProcessSaveData(wxT("TZ;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &HomeTZList, &ContactData,
- wxT("ALTID"), &HomeTZListAltID,
- wxT("PID"), &HomeTZListPID,
- wxT("MEDIATYPE"), &HomeTZListMediatype,
- wxT("PREF"), &HomeTZListPref,
- wxT(""), &HomeTZListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = BusinessTZList.begin();
- iter != BusinessTZList.end(); ++iter){
-
- ProcessSaveData(wxT("TZ;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &BusinessTZList, &ContactData,
- wxT("ALTID"), &BusinessTZListAltID,
- wxT("PID"), &BusinessTZListPID,
- wxT("MEDIATYPE"), &BusinessTZListMediatype,
- wxT("PREF"), &BusinessTZListPref,
- wxT(""), &BusinessTZListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = GeneralGeographyList.begin();
- iter != GeneralGeographyList.end(); ++iter){
-
- wxString strAddressFinalValue = iter->second;
-
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressFinalValue.insert(0, wxT("geo:"));
-
- ProcessSaveData(wxT("GEO"), &strValue2, &boolValue2, &boolValue,
- &iter, &strAddressFinalValue, &ContactData,
- wxT("ALTID"), &GeneralGeographyListAltID,
- wxT("PID"), &GeneralGeographyListPID,
- wxT("MEDIATYPE"), &GeneralGeographyListMediatype,
- wxT("PREF"), &GeneralGeographyListPref,
- wxT(""), &GeneralGeographyListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = HomeGeographyList.begin();
- iter != HomeGeographyList.end(); ++iter){
-
- wxString strAddressFinalValue = iter->second;
-
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressFinalValue.insert(0, wxT("geo:"));
-
- ProcessSaveData(wxT("GEO;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &HomeGeographyList, &ContactData,
- wxT("ALTID"), &HomeGeographyListAltID,
- wxT("PID"), &HomeGeographyListPID,
- wxT("MEDIATYPE"), &HomeGeographyListMediatype,
- wxT("PREF"), &HomeGeographyListPref,
- wxT(""), &HomeGeographyListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = BusinessGeographyList.begin();
- iter != BusinessGeographyList.end(); ++iter){
-
- wxString strAddressFinalValue = iter->second;
-
- ProcessCaptureStrings(&strAddressFinalValue);
-
- strAddressFinalValue.insert(0, wxT("geo:"));
-
- ProcessSaveData(wxT("GEO;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &BusinessGeographyList, &ContactData,
- wxT("ALTID"), &BusinessGeographyListAltID,
- wxT("PID"), &BusinessGeographyListPID,
- wxT("MEDIATYPE"), &BusinessGeographyListMediatype,
- wxT("PREF"), &BusinessGeographyListPref,
- wxT(""), &BusinessGeographyListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = GeneralRelatedList.begin();
- iter != GeneralRelatedList.end(); ++iter){
-
- ProcessSaveData(wxT("RELATED"), &strValue2, &boolValue2, &boolValue,
- &iter, &GeneralRelatedList, &ContactData,
- wxT("ALTID"), &GeneralRelatedListAltID,
- wxT("PID"), &GeneralRelatedListPID,
- wxT("LANGUAGE"), &GeneralRelatedListLanguage,
- wxT("TYPE"), &GeneralRelatedListRelType,
- wxT("PREF"), &GeneralRelatedListPref,
- wxT(""), &GeneralRelatedListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = GeneralWebsiteList.begin();
- iter != GeneralWebsiteList.end(); ++iter){
-
- ProcessSaveData(wxT("URL"), &strValue2, &boolValue2, &boolValue,
- &iter, &GeneralWebsiteList, &ContactData,
- wxT("ALTID"), &GeneralWebsiteListAltID,
- wxT("PID"), &GeneralWebsiteListPID,
- wxT("MEDIATYPE"), &GeneralWebsiteListMediatype,
- wxT("PREF"), &GeneralWebsiteListPref,
- wxT(""), &GeneralWebsiteListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = HomeWebsiteList.begin();
- iter != HomeWebsiteList.end(); ++iter){
-
- ProcessSaveData(wxT("URL;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &HomeWebsiteList, &ContactData,
- wxT("ALTID"), &HomeWebsiteListAltID,
- wxT("PID"), &HomeWebsiteListPID,
- wxT("MEDIATYPE"), &HomeWebsiteListMediatype,
- wxT("PREF"), &HomeWebsiteListPref,
- wxT(""), &HomeWebsiteListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = BusinessWebsiteList.begin();
- iter != BusinessWebsiteList.end(); ++iter){
-
- ProcessSaveData(wxT("URL;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &BusinessWebsiteList, &ContactData,
- wxT("ALTID"), &BusinessWebsiteListAltID,
- wxT("PID"), &BusinessWebsiteListPID,
- wxT("MEDIATYPE"), &BusinessWebsiteListMediatype,
- wxT("PREF"), &BusinessWebsiteListPref,
- wxT(""), &BusinessWebsiteListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = GeneralTitleList.begin();
- iter != GeneralTitleList.end(); ++iter){
-
- ProcessSaveData(wxT("TITLE"), &strValue2, &boolValue2, &boolValue,
- &iter, &GeneralTitleList, &ContactData,
- wxT("ALTID"), &GeneralTitleListAltID,
- wxT("PID"), &GeneralTitleListPID,
- wxT("LANGUAGE"), &GeneralTitleListLanguage,
- wxT("PREF"), &GeneralTitleListPref,
- wxT(""), &GeneralTitleListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = HomeTitleList.begin();
- iter != HomeTitleList.end(); ++iter){
-
- ProcessSaveData(wxT("TITLE;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &HomeTitleList, &ContactData,
- wxT("ALTID"), &HomeTitleListAltID,
- wxT("PID"), &HomeTitleListPID,
- wxT("LANGUAGE"), &HomeTitleListLanguage,
- wxT("PREF"), &HomeTitleListPref,
- wxT(""), &HomeTitleListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = BusinessTitleList.begin();
- iter != BusinessTitleList.end(); ++iter){
-
- ProcessSaveData(wxT("TITLE;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &BusinessTitleList, &ContactData,
- wxT("ALTID"), &BusinessTitleListAltID,
- wxT("PID"), &BusinessTitleListPID,
- wxT("LANGUAGE"), &BusinessTitleListLanguage,
- wxT("PREF"), &BusinessTitleListPref,
- wxT(""), &BusinessTitleListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = GeneralRoleList.begin();
- iter != GeneralRoleList.end(); ++iter){
-
- ProcessSaveData(wxT("ROLE"), &strValue2, &boolValue2, &boolValue,
- &iter, &GeneralRoleList, &ContactData,
- wxT("ALTID"), &GeneralRoleListAltID,
- wxT("PID"), &GeneralRoleListPID,
- wxT("LANGUAGE"), &GeneralRoleListLanguage,
- wxT("PREF"), &GeneralRoleListPref,
- wxT(""), &GeneralRoleListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = HomeRoleList.begin();
- iter != HomeRoleList.end(); ++iter){
-
- ProcessSaveData(wxT("ROLE;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &HomeRoleList, &ContactData,
- wxT("ALTID"), &HomeRoleListAltID,
- wxT("PID"), &HomeRoleListPID,
- wxT("LANGUAGE"), &HomeRoleListLanguage,
- wxT("PREF"), &HomeRoleListPref,
- wxT(""), &HomeRoleListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = BusinessRoleList.begin();
- iter != BusinessRoleList.end(); ++iter){
-
- ProcessSaveData(wxT("ROLE;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &BusinessRoleList, &ContactData,
- wxT("ALTID"), &BusinessRoleListAltID,
- wxT("PID"), &BusinessRoleListPID,
- wxT("LANGUAGE"), &BusinessRoleListLanguage,
- wxT("PREF"), &BusinessRoleListPref,
- wxT(""), &BusinessRoleListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = GeneralOrganisationsList.begin();
- iter != GeneralOrganisationsList.end(); ++iter){
-
- ProcessSaveData(wxT("ORG"), &strValue2, &boolValue2, &boolValue,
- &iter, &GeneralOrganisationsList, &ContactData,
- wxT("ALTID"), &GeneralOrganisationsListAltID,
- wxT("PID"), &GeneralOrganisationsListPID,
- wxT("LANGUAGE"), &GeneralOrganisationsListLanguage,
- wxT("SORT-AS"), &GeneralOrganisationsListSortAs,
- wxT("PREF"), &GeneralOrganisationsListPref,
- wxT(""), &GeneralOrganisationsListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = HomeOrganisationsList.begin();
- iter != HomeOrganisationsList.end(); ++iter){
-
- ProcessSaveData(wxT("ORG;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &HomeOrganisationsList, &ContactData,
- wxT("ALTID"), &HomeOrganisationsListAltID,
- wxT("PID"), &HomeOrganisationsListPID,
- wxT("LANGUAGE"), &HomeOrganisationsListLanguage,
- wxT("SORT-AS"), &HomeOrganisationsListSortAs,
- wxT("PREF"), &HomeOrganisationsListPref,
- wxT(""), &HomeOrganisationsListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = BusinessOrganisationsList.begin();
- iter != BusinessOrganisationsList.end(); ++iter){
-
- ProcessSaveData(wxT("ORG;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &BusinessOrganisationsList, &ContactData,
- wxT("ALTID"), &BusinessOrganisationsListAltID,
- wxT("PID"), &BusinessOrganisationsListPID,
- wxT("LANGUAGE"), &BusinessOrganisationsListLanguage,
- wxT("SORT-AS"), &BusinessOrganisationsListSortAs,
- wxT("PREF"), &BusinessOrganisationsListPref,
- wxT(""), &BusinessOrganisationsListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = GeneralNoteList.begin();
- iter != GeneralNoteList.end(); ++iter){
-
- ProcessSaveData(wxT("NOTE"), &strValue2, &boolValue2, &boolValue,
- &iter, &GeneralNoteList, &ContactData,
- wxT("ALTID"), &GeneralNoteListAltID,
- wxT("PID"), &GeneralNoteListPID,
- wxT("LANGUAGE"), &GeneralNoteListLanguage,
- wxT("PREF"), &GeneralNoteListPref,
- wxT(""), &GeneralNoteListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = HomeNoteList.begin();
- iter != HomeNoteList.end(); ++iter){
-
- ProcessSaveData(wxT("NOTE;TYPE=home"), &strValue2, &boolValue2, &boolValue,
- &iter, &HomeNoteList, &ContactData,
- wxT("ALTID"), &HomeNoteListAltID,
- wxT("PID"), &HomeNoteListPID,
- wxT("LANGUAGE"), &HomeNoteListLanguage,
- wxT("PREF"), &HomeNoteListPref,
- wxT(""), &HomeNoteListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = BusinessNoteList.begin();
- iter != BusinessNoteList.end(); ++iter){
-
- ProcessSaveData(wxT("NOTE;TYPE=work"), &strValue2, &boolValue2, &boolValue,
- &iter, &BusinessNoteList, &ContactData,
- wxT("ALTID"), &BusinessNoteListAltID,
- wxT("PID"), &BusinessNoteListPID,
- wxT("LANGUAGE"), &BusinessNoteListLanguage,
- wxT("PREF"), &BusinessNoteListPref,
- wxT(""), &BusinessNoteListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = CategoriesList.begin();
- iter != CategoriesList.end(); ++iter){
-
- ProcessSaveData(wxT("CATEGORIES"), &strValue2, &boolValue2, &boolValue,
- &iter, &CategoriesList, &ContactData,
- wxT("ALTID"), &CategoriesListAltID,
- wxT("PID"), &CategoriesListPID,
- wxT("TYPE"), &CategoriesListType,
- wxT("PREF"), &CategoriesListPref,
- wxT(""), &CategoriesListTokens );
-
- ResetSaveProcessData();
-
- }
-
- // Pictures.
-
- for (std::map<int, std::string>::iterator iter = PicturesList.begin();
- iter != PicturesList.end(); ++iter){
-
- int intValueIndex = iter->first;
-
- std::map<int, std::string>::iterator stdstriter;
- std::map<int, wxString>::iterator enciter;
-
- striter = PicturesListPictureType.find(intValueIndex);
- enciter = PicturesListPicEncType.find(intValueIndex);
-
- ProcessSaveData(wxT("PHOTO"), &strValue2, &boolValue2, &boolValue,
- &iter, &PicturesList, &striter,
- &enciter, &ContactData,
- wxT("ALTID"), &PicturesListAltID,
- wxT("PID"), &PicturesListPID,
- wxT("TYPE"), &PicturesListType,
- wxT("PREF"), &PicturesListPref,
- wxT(""), &PicturesListTokens);
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- // Logos.
-
- for (std::map<int, std::string>::iterator iter = LogosList.begin();
- iter != LogosList.end(); ++iter){
-
- int intValueIndex = iter->first;
-
- std::map<int, std::string>::iterator stdstriter;
- std::map<int, wxString>::iterator enciter;
-
- striter = LogosListPictureType.find(intValueIndex);
- enciter = LogosListPicEncType.find(intValueIndex);
-
- ProcessSaveData(wxT("LOGO"), &strValue2, &boolValue2, &boolValue,
- &iter, &LogosList, &striter,
- &enciter, &ContactData,
- wxT("ALTID"), &LogosListAltID,
- wxT("PID"), &LogosListPID,
- wxT("TYPE"), &LogosListType,
- wxT("PREF"), &LogosListPref,
- wxT(""), &LogosListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- // Sounds.
-
- for (std::map<int, std::string>::iterator iter = SoundsList.begin();
- iter != SoundsList.end(); ++iter){
-
- int intValueIndex = iter->first;
-
- std::map<int, std::string>::iterator stdstriter;
- std::map<int, wxString>::iterator enciter;
-
- striter = SoundsListAudioType.find(intValueIndex);
- enciter = SoundsListAudioEncType.find(intValueIndex);
-
- ProcessSaveData(wxT("SOUND"), &strValue2, &boolValue2, &boolValue,
- &iter, &SoundsList, &striter,
- &enciter, &ContactData,
- wxT("ALTID"), &SoundsListAltID,
- wxT("PID"), &SoundsListPID,
- wxT("TYPE"), &SoundsListType,
- wxT("PREF"), &SoundsListPref,
- wxT(""), &SoundsListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = CalendarList.begin();
- iter != CalendarList.end(); ++iter){
-
- ProcessSaveData(wxT("CALURI"), &strValue2, &boolValue2, &boolValue,
- &iter, &CalendarList, &ContactData,
- wxT("ALTID"), &CalendarListAltID,
- wxT("PID"), &CalendarListPID,
- wxT("MEDIATYPE"), &CalendarListMediatype,
- wxT("TYPE"), &CalendarListType,
- wxT("PREF"), &CalendarListPref,
- wxT(""), &CalendarListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = CalendarRequestList.begin();
- iter != CalendarRequestList.end(); ++iter){
-
- ProcessSaveData(wxT("CALADRURI"), &strValue2, &boolValue2, &boolValue,
- &iter, &CalendarRequestList, &ContactData,
- wxT("ALTID"), &CalendarRequestListAltID,
- wxT("PID"), &CalendarRequestListPID,
- wxT("MEDIATYPE"), &CalendarRequestListMediatype,
- wxT("TYPE"), &CalendarRequestListType,
- wxT("PREF"), &CalendarRequestListPref,
- wxT(""), &CalendarRequestListTokens );
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = FreeBusyList.begin();
- iter != FreeBusyList.end(); ++iter){
-
- ProcessSaveData(wxT("FBURL"), &strValue2, &boolValue2, &boolValue,
- &iter, &FreeBusyList, &ContactData,
- wxT("ALTID"), &FreeBusyListAltID,
- wxT("PID"), &FreeBusyListPID,
- wxT("MEDIATYPE"), &FreeBusyListMediatype,
- wxT("TYPE"), &FreeBusyListType,
- wxT("PREF"), &FreeBusyListPref,
- wxT(""), &FreeBusyListTokens );
-
- ResetSaveProcessData();
-
- }
-
- for (std::map<int, wxString>::iterator iter = KeyList.begin();
- iter != KeyList.end(); ++iter){
-
- intValue2 = iter->first;
-
- // Process Alternative ID.
-
- striter = KeyListAltID.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue3 = striter->second;
-
- if (!strValue3.IsEmpty()){
-
- strValue3.Trim();
- strValue3.Trim();
-
- if (boolValue2 == TRUE){
-
- strValue2.Append(wxT(";"));
-
- } else {
-
- boolValue2 = TRUE;
-
- }
-
- strValue2.Append(wxT("ALTID=") + strValue3);
-
- boolValue = TRUE;
-
- }
-
- }
-
- // Process PID.
-
- striter = KeyListPID.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue3 = striter->second;
-
- if (!strValue3.IsEmpty()){
-
- strValue3.Trim();
- strValue3.Trim();
-
- if (boolValue2 == TRUE){
-
- strValue2.Append(wxT(";"));
-
- } else {
-
- boolValue2 = TRUE;
-
- }
-
- strValue2.Append(wxT("PID=") + strValue3);
-
- boolValue = TRUE;
-
- }
-
- }
-
- // Process Type.
-
- striter = KeyListType.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue3 = striter->second;
-
- if (!strValue3.IsEmpty()){
-
- strValue3.Trim();
- strValue3.Trim();
-
- if (boolValue2 == TRUE){
-
- strValue2.Append(wxT(";"));
-
- } else {
-
- boolValue2 = TRUE;
-
- }
-
- strValue2.Append(wxT("TYPE=") + strValue3);
-
- boolValue = TRUE;
-
- }
-
- }
-
- intiter = KeyListPref.find(intValue2);
-
- if (intiter->first == intValue2){
-
- intValue3 = intiter->second;
-
- if (intValue3){
-
- if (boolValue2 == TRUE){
-
- strValue2.Append(wxT(";"));
-
- } else {
-
- boolValue2 = TRUE;
-
- }
-
- strValue2.Append(wxT("PREF=") + wxString::Format(wxT("%i"), intValue3));
-
- boolValue = TRUE;
-
- }
-
- }
-
- // Process Tokens.
-
- striter = KeyListTokens.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue3 = striter->second;
-
- if (!strValue3.IsEmpty()){
-
- strValue3.Trim();
- strValue3.Trim();
-
- if (boolValue2 == TRUE){
-
- strValue2.Append(wxT(";"));
-
- } else {
-
- boolValue2 = TRUE;
-
- }
-
- strValue2.Append(strValue3);
-
- boolValue = TRUE;
-
- }
-
- }
-
- // Get the key information.
-
- std::map<int, wxString>::iterator enciter;
-
- striter = KeyListDataType.find(intValue2);
- //enciter = KeyListAudioEncType.find(intValue2);
-
- wxString strValueData;
-
- strValueData = iter->second;
- //strValueData.insert(0, wxT("data:") + striter->second + wxT(";") + enciter->second + wxT(","));
- strValueData.insert(0, wxT("data:") + striter->second + wxT(";base64,"));
-
-
- // Add to the vCard.
-
- if (boolValue == TRUE){
-
- ContactData.AddRaw(wxT("KEY;") + strValue2, strValueData);
-
- } else {
-
- ContactData.Add(wxT("KEY"), strValueData, TRUE);
-
- }
-
- ResetSaveProcessData();
-
- }
-
- // Vendor specific items.
-
- ResetSaveProcessData();
-
- for (std::map<int,wxString>::iterator iter = VendorList.begin();
- iter != VendorList.end(); ++iter){
-
- intValue2 = iter->first;
-
- // Get the IANA PEN number.
-
- striter = VendorListPEN.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue2 = striter->second;
-
- }
-
- // Get the element name.
-
- striter = VendorListElement.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue3 = striter->second;
-
- }
-
- // Get the address.
-
- striter = VendorList.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue = striter->second;
-
- }
-
- // Add to the vCard.
-
- if (boolValue == TRUE){
-
- ContactData.AddRaw(wxT("VND-") + strValue2 + wxT("-") + strValue3, strValue);
-
- } else {
-
- ContactData.Add(wxT("VND-") + strValue2 + wxT("-") + strValue3, strValue, FALSE);
-
- }
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- // X-Tokens.
-
- for (std::map<int,wxString>::iterator iter = XTokenList.begin();
- iter != XTokenList.end(); ++iter){
-
- intValue2 = iter->first;
-
- // Get the element name.
-
- striter = XTokenListTokens.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue2 = striter->second;
-
- }
-
- // Get the address.
-
- striter = XTokenList.find(intValue2);
-
- if (striter->first == intValue2){
-
- strValue = striter->second;
-
- }
-
- // Add to the vCard.
-
- if (boolValue == TRUE){
-
- ContactData.AddRaw(wxT("X-") + strValue2, strValue);
-
- } else {
-
- ContactData.Add(wxT("X-") + strValue2, strValue, FALSE);
-
- }
-
- ResetSaveProcessData();
-
- }
-
- ResetSaveProcessData();
-
- if (FullNamesList.size() == 0){
-
- wxString FullName = cmbDisplayAs->GetValue();
- FullNamesList.insert(std::make_pair(0, FullName));
- FullNamesListAltID.insert(std::make_pair(0, wxT("")));
- FullNamesListPID.insert(std::make_pair(0, wxT("")));
- FullNamesListType.insert(std::make_pair(0, wxT("")));
- FullNamesListLanguage.insert(std::make_pair(0, wxT("")));
- FullNamesListPref.insert(std::make_pair(0, 0));
- FullNamesListTokens.insert(std::make_pair(0, wxT("")));
- FNFirst = FALSE;
-
- }
-
- for (std::map<int, wxString>::iterator iter = FullNamesList.begin();
- iter != FullNamesList.end(); ++iter){
-
- if (FNFirst == TRUE){
-
- iter->second = cmbDisplayAs->GetValue();
- FNFirst = FALSE;
-
- }
-
- std::map<int,wxString>::iterator mapS;
-
- mapS = FullNamesListTokens.find(iter->first);
-
- ProcessSaveData(wxT("FN"), &strValue2, &boolValue2, &boolValue,
- &iter, &FullNamesList, &ContactData,
- wxT("ALTID"), &FullNamesListAltID,
- wxT("PID"), &FullNamesListPID,
- wxT("TYPE"), &FullNamesListType,
- wxT("LANGUAGE"), &FullNamesListLanguage,
- wxT("PREF"), &FullNamesListPref,
- wxT(""), &FullNamesListTokens );
-
- // Get the address.
-
- ResetSaveProcessData();
-
- }
-
- //ContactData.Add(wxT("FN"), cmbDisplayAs->GetValue(), FALSE);
-
- // Insert revision (REV) date.
-
- // Get today's date and time.
-
- wxDateTime DateTimeNow = wxDateTime::Now();
-
- wxString DateRev;
-
- // Set year, month and date.
-
- int intYear = DateTimeNow.GetYear();
- int intMonth = DateTimeNow.GetMonth();
- int intDay = DateTimeNow.GetDay();
-
- DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intYear));
-
- if (intMonth < 10){
-
- DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intMonth));
-
- } else {
-
- DateRev.Append(wxString::Format(wxT("%i"), intMonth));
-
- }
-
- if (intDay < 10){
-
- DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intDay));
-
- } else {
-
- DateRev.Append(wxString::Format(wxT("%i"), intDay));
-
- }
-
- //DateRev.Append(wx);
- //DateRev.Append(wx);
- //DateRev.Append(wx);
- DateRev.Append(wxT("T"));
-
- // Set hour, minute and second.
-
- int intHour = DateTimeNow.GetHour();
- int intMinute = DateTimeNow.GetMinute();
- int intSecond = DateTimeNow.GetSecond();
-
- if (intHour < 10){
-
- DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intHour));
-
- } else {
-
- DateRev.Append(wxString::Format(wxT("%i"), intHour));
-
- }
-
- if (intMinute < 10){
-
- DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intMinute));
-
- } else {
-
- DateRev.Append(wxString::Format(wxT("%i"), intMinute));
-
- }
-
- if (intSecond < 10){
-
- DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intSecond));
-
- } else {
-
- DateRev.Append(wxString::Format(wxT("%i"), intSecond));
-
- }
-
- // DateRev.Append(wx);
- // DateRev.Append(wx);
- // DateRev.Append(wxString DateTimeNow->);
- DateRev.Append(wxT("Z"));
-
- ContactData.Add(wxT("UID"), UIDToken, FALSE);
-
- // End the vCard File.
-
- ContactData.Add(wxT("END"), wxT("VCARD"), FALSE);
-
- FMTimer.Stop();
- ContactData.WriteFile(FilenameFinal);
-
- vCard34Conv ConvFileFun;
-
- wxString wxSData;
-
- ConvFileFun.ConvertToV3(FilenameFinal, &wxSData);
-
- wxString AccountDirPrefix;
- wxString AccountDir;
- wxString PrefDir;
-
-#if defined(__HAIKU__)
-
- //preffilename = wxT("noo");
-
-#elif defined(__APPLE__)
-
- PrefDir = GetUserPrefDir();
-
- wxStringTokenizer wSTFilename(wxSContactFilename, wxT("/"));
-
-#elif defined(__WIN32__)
-
- PrefDir = GetUserPrefDir();
-
- wxStringTokenizer wSTFilename(wxSContactFilename, wxT("\\"));
-
-#else
-
- PrefDir = GetUserPrefDir();
-
- wxStringTokenizer wSTFilename(wxSContactFilename, wxT("/"));
-
-#endif
-
- XABPreferences PrefData(PrefDir);
-
- wxString AccountType;
-
- for (int i = 0; i < PrefData.accounts.GetCount(); i++){
-
- AccountDir = PrefData.accounts.GetAccountDirectory(i) + wxT(".carddav");
-
- if (AccountDir == wxSContactAccount){
-
- AccountDirPrefix = PrefData.accounts.GetAccountDirPrefix(i);
- AccountDirPrefix.Trim();
- AccountType = PrefData.accounts.GetAccountType(i);
- break;
-
- }
-
- }
-
- wxString wxSplitFilename;
- wxString wxSDataURL;
-
- while(wSTFilename.HasMoreTokens()){
-
- wxSplitFilename = wSTFilename.GetNextToken();
-
- }
-
- wxSDataURL = wxSplitFilename;
- //wxSDataURL.Append(wxSplitFilename);
-
- // Find out if the filename exists in the table.
-
- if (AccountType == wxT("CardDAV") || AccountType == wxT("carddav")){
-
- wxString ETagResult;
- wxString ETagOriginal;
-
- ETagDB *ETagDBPtr = NULL;
-
- ETagDBPtr = ETagTmrPtr->GetPointer(wxSContactAccount);
-
- wxString wxSETag = ETagDBPtr->GetETag(wxSplitFilename);
- wxString wxSETagOrig = ETagDBPtr->GetETagOriginal(wxSplitFilename);
-
- if (wxSETagOrig.IsEmpty()){
-
- // Generate the ETag.
-
- wxSETagOrig = wxString::Format(wxT("%X%X%X%X"), rand() % 1024, rand() % 1024, rand() % 1024, rand() % 1024);
-
- }
-
- if (wxSETag.IsEmpty()){
-
- // Update empty ETag.
-
- wxSETag = wxSETagOrig;
- ETagDBPtr->UpdateETag(wxSplitFilename, wxSETag, wxSETagOrig);
-
- }
- else {
-
- // Don't change original ETag.
-
- wxSETag = wxString::Format(wxT("%X%X%X%X"), rand() % 1024, rand() % 1024, rand() % 1024, rand() % 1024);
- ETagDBPtr->UpdateETag(wxSplitFilename, wxSETag);
-
- }
-
- if (EditMode == FALSE){
-
- ActMgrPtr->AddTask(0, cmbDisplayAs->GetValue(), wxSContactAccount, wxSDataURL, wxSplitFilename, FilenameFinal, wxSData);
- EditMode = TRUE;
- FMTimer.SetFilename(FilenameFinal);
- FMTimer.UpdateTimestamp();
- FMTimer.Start(10000, FALSE);
-
- }
- else {
-
- ActMgrPtr->AddTask(1, cmbDisplayAs->GetValue(), wxSContactAccount, wxSDataURL, wxSplitFilename, FilenameFinal, wxSData);
- FMTimer.UpdateTimestamp();
- FMTimer.Start(10000, FALSE);
-
- }
-
- }
-
- // Send a notification to update the main window
- // with the new details.
-
- UCNotif *ucd;
- ucd = new UCNotif;
-
- // TODO: Workout nickname settings by priority and
- // type.
-
- ucd->ContactAccount = wxSContactAccount;
- ucd->ContactFilename = FilenameFinal;
- ucd->ContactName = cmbDisplayAs->GetValue();
- ucd->ContactNameArray = ContactData.GetName();
-
- for (std::map<int,wxString>::iterator gniter = GeneralNicknamesList.begin();
- gniter != GeneralNicknamesList.end(); gniter++){
-
- ucd->ContactNickname = gniter->second;
- break;
-
- }
-
- wxCommandEvent event2(CE_UPDATECONTACTLIST);
- event2.SetClientData(ucd);
- wxPostEvent(MainPtr, event2);
-
-}
-
-void frmContactEditor::SaveCloseContact( wxCommandEvent& event )
-{