#include #include #include #include #include "frmImportResults.h" frmImportResults::frmImportResults( wxWindow* parent ) : frmImportResultsADT( parent ) { } void frmImportResults::CopyClipboard( wxCommandEvent& event ) { if (wxTheClipboard->Open()){ wxTextDataObject ResultData; ResultData.SetText(txtResults->GetValue()); wxTheClipboard->Clear(); wxTheClipboard->AddData(&ResultData); wxTheClipboard->Close(); wxTheClipboard->Flush(); wxMessageBox(_("The results have been copied to the clipboard."), _("Results copied to clipboard")); } else { wxMessageBox(_("The results have not been copied to the clipboard due to an error."), _("Results not copied to clipboard")); } } void frmImportResults::CloseWindow( wxCommandEvent& event ) { this->Close(); } void frmImportResults::LoadData(std::map *ResultDataInc, int ImportCount, int ImportErrorCount) { wxString ResultDataText; for (std::map::iterator iter = ResultDataInc->begin(); iter != ResultDataInc->end(); iter++){ ResultDataText.Append(iter->second + wxT("\n")); } // Display the results in the form. txtResults->SetValue(ResultDataText); lblText->SetLabel(wxString::Format(_("%i contacts imported. %i contacts had errors and could not be imported."), ImportCount, ImportErrorCount)); }