summaryrefslogtreecommitdiffstats
path: root/Project/ImportForm.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2018-03-26 15:54:26 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2018-03-26 15:54:26 -0300
commit64ed394cdc4b3347768c2e1996518f02982b2ef5 (patch)
tree98248f9c8120cb3c04cadc14b68f0415bd7f6568 /Project/ImportForm.cpp
parente5a5041915127e72820a0478724a20dc41f0327e (diff)
downloadPSP.git-64ed394cdc4b3347768c2e1996518f02982b2ef5.tar.gz
PSP.git-64ed394cdc4b3347768c2e1996518f02982b2ef5.tar.xz
PSP.git-64ed394cdc4b3347768c2e1996518f02982b2ef5.zip
Import file GUI implemented
Diffstat (limited to 'Project/ImportForm.cpp')
-rw-r--r--Project/ImportForm.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/Project/ImportForm.cpp b/Project/ImportForm.cpp
new file mode 100644
index 0000000..eed2269
--- /dev/null
+++ b/Project/ImportForm.cpp
@@ -0,0 +1,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; }