Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Improved importing support.
[xestiaab/.git] / source / import / frmImportResults.cpp
1 #include <map>
2 #include <wx/wx.h>
3 #include <wx/clipbrd.h>
4 #include <wx/dataobj.h>
6 #include "frmImportResults.h"
8 frmImportResults::frmImportResults( wxWindow* parent )
9 :
10 frmImportResultsADT( parent )
11 {
13 }
15 void frmImportResults::CopyClipboard( wxCommandEvent& event )
16 {
18         if (wxTheClipboard->Open()){
19         
20                 wxTextDataObject ResultData;
21         
22                 ResultData.SetText(txtResults->GetValue());
23                 
24                 wxTheClipboard->Clear();        
25                 wxTheClipboard->AddData(&ResultData);
26                 wxTheClipboard->Close();
27                 wxTheClipboard->Flush();
28         
29                 wxMessageBox(_("The results have been copied to the clipboard."), _("Results copied to clipboard"));
30         
31         } else {
32         
33                 wxMessageBox(_("The results have not been copied to the clipboard due to an error."), _("Results not copied to clipboard"));
34         
35         }
36         
37 }
39 void frmImportResults::CloseWindow( wxCommandEvent& event )
40 {
41         this->Close();
42 }
44 void frmImportResults::LoadData(std::map<int,wxString> *ResultDataInc, int ImportCount, int ImportErrorCount)
45 {
47         wxString ResultDataText;
48         
49         for (std::map<int,wxString>::iterator iter = ResultDataInc->begin(); 
50         iter != ResultDataInc->end(); iter++){
51         
52                 ResultDataText.Append(iter->second + wxT("\n"));
53         
54         }
55         
56         // Display the results in the form.
57         
58         txtResults->SetValue(ResultDataText);
59         lblText->SetLabel(wxString::Format(_("%i contacts imported. %i contacts had errors and could not be imported."), ImportCount, ImportErrorCount));
61 }
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy