AccName.clear();
}
+
+ DialogResult = FALSE;
}
void frmImportContacts::CloseWindow( wxCommandEvent& event )
{
+ DialogResult = FALSE;
this->Close();
}
void frmImportContacts::ImportContacts( wxCommandEvent& event )
{
+ DialogResult = TRUE;
this->Close();
}
return AccountType;
+}
+
+bool frmImportContacts::GetDialogResult(){
+
+ return DialogResult;
+
}
\ No newline at end of file
int AccountID;
int AccountNetID;
int AccountGrpID;
+ bool DialogResult;
protected:
// Handlers for frmImportContactsADT events.
void CloseWindow( wxCommandEvent& event );
~frmImportContacts();
void SetupList(std::map<int,ImportDataContact>* ContactDataInc);
void GetResults(std::map<int,ImportDataContact>* ContactDataInc);
+ bool GetDialogResult();
wxString GetAccount();
wxString GetAccountType();
+ wxString GetAccountDirName();
//// end generated class members
};
AccountName = frmIC->GetAccount();
AccountType = frmIC->GetAccountType();
+ if (frmIC->GetDialogResult() == FALSE){
+
+ // User decided not to import. Clean up the
+ // dialog.
+
+ delete frmIC;
+ frmIC = NULL;
+ frmMainPtrInc->ResumeAllTimers();
+ return;
+
+ }
+
delete frmIC;
frmIC = NULL;
if (AccountType != wxT("Local") && AccountType != wxT("local")){
- wxString *AccNamePostEventPtr = new wxString;
+ wxString AccNamePostEvent;
+
+ AccNamePostEvent.Clear();
+ AccNamePostEvent.Append(AccountName);
+ AccNamePostEvent.Trim();
wxCommandEvent accevent(SYNCACCOUNT);
- accevent.SetClientData(AccNamePostEventPtr);
+ accevent.SetString(AccNamePostEvent);
wxPostEvent(frmMainPtrInc, accevent);