blob: eed22699bfb358153eb86e3e458d79a43918d249 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#include "ImportForm.h"
#include "Workspace.h"
ImportForm::ImportForm(wxWindow* parent, Workspace* workspace) : ImportFormBase(parent)
{
SetInitialSize();
m_parent = parent;
m_workspace = workspace;
}
ImportForm::~ImportForm() {}
void ImportForm::OnButtonCancelClick(wxCommandEvent& event)
{
EndModal(wxID_CANCEL);
if(m_workspace) delete m_workspace;
}
void ImportForm::OnButtonOKClick(wxCommandEvent& event)
{
if(ImportSelectedFiles())
EndModal(wxID_OK);
else {
// Error message
wxMessageDialog msgDialog(this, _("It was not possible to import the selected files."), _("Error"),
wxOK | wxCENTRE | wxICON_ERROR);
msgDialog.ShowModal();
}
}
bool ImportForm::ImportSelectedFiles() { return true; }
|