summaryrefslogtreecommitdiffstats
path: root/Project/ControlEditor.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-04-12 18:57:10 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-04-12 18:57:10 -0300
commit52931022eb25080e33f2362c3b0bd4361f0cdb0b (patch)
tree90d83cb3c68f66d41971099887c321e56dd6d00f /Project/ControlEditor.cpp
parentd2aa79321df798c297334dbcf4e56320b84400ba (diff)
downloadPSP.git-52931022eb25080e33f2362c3b0bd4361f0cdb0b.tar.gz
PSP.git-52931022eb25080e33f2362c3b0bd4361f0cdb0b.tar.xz
PSP.git-52931022eb25080e33f2362c3b0bd4361f0cdb0b.zip
Open control implementation
Diffstat (limited to 'Project/ControlEditor.cpp')
-rw-r--r--Project/ControlEditor.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/Project/ControlEditor.cpp b/Project/ControlEditor.cpp
index 4fedfa3..cb0edf3 100644
--- a/Project/ControlEditor.cpp
+++ b/Project/ControlEditor.cpp
@@ -718,3 +718,19 @@ void ControlEditor::OnExportClick(wxCommandEvent& event)
fileHandling.SaveControl(saveFileDialog.GetPath());
wxFileName fileName(saveFileDialog.GetPath());
}
+
+void ControlEditor::OnImportClick(wxCommandEvent& event)
+{
+ wxFileDialog openFileDialog(this, _("Open CTL file"), "", "", "CTL files (*.ctl)|*.ctl",
+ wxFD_OPEN | wxFD_FILE_MUST_EXIST);
+ if(openFileDialog.ShowModal() == wxID_CANCEL) return;
+
+ wxFileName fileName(openFileDialog.GetPath());
+
+ FileHanding fileHandling(this);
+ if(!fileHandling.OpenControl(fileName)) {
+ wxMessageDialog msgDialog(this, _("It was not possible to open the selected file."), _("Error"),
+ wxOK | wxCENTRE | wxICON_ERROR);
+ msgDialog.ShowModal();
+ }
+} \ No newline at end of file