summaryrefslogtreecommitdiffstats
path: root/Project/TransformerForm.cpp
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2016-10-14 17:45:25 -0300
committerThales1330 <thaleslima.ufu@gmail.com>2016-10-14 17:45:25 -0300
commitd60de5e4c4774c5b840c5cab2cb629a5bbe9df42 (patch)
tree48e2bf736271e137af90ec1ffc1dcf7a21aeb2a7 /Project/TransformerForm.cpp
parent3596d19f6d804a9610545ce39f07e421d1dc716e (diff)
downloadPSP.git-d60de5e4c4774c5b840c5cab2cb629a5bbe9df42.tar.gz
PSP.git-d60de5e4c4774c5b840c5cab2cb629a5bbe9df42.tar.xz
PSP.git-d60de5e4c4774c5b840c5cab2cb629a5bbe9df42.zip
Switching implemented
Diffstat (limited to 'Project/TransformerForm.cpp')
-rw-r--r--Project/TransformerForm.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/Project/TransformerForm.cpp b/Project/TransformerForm.cpp
new file mode 100644
index 0000000..3af782c
--- /dev/null
+++ b/Project/TransformerForm.cpp
@@ -0,0 +1,37 @@
+#include "TransformerForm.h"
+#include "SwitchingForm.h"
+#include "Transformer.h"
+
+TransformerForm::TransformerForm(wxWindow* parent, Transformer* transformer)
+ : TransformerFormBase(parent)
+{
+ m_parent = parent;
+ m_transformer = transformer;
+}
+
+TransformerForm::~TransformerForm()
+{
+}
+
+void TransformerForm::OnCancelButtonClick(wxCommandEvent& event)
+{
+ EndModal(wxID_CANCEL);
+}
+void TransformerForm::OnOKButtonClick(wxCommandEvent& event)
+{
+ if(ValidateData()) EndModal(wxID_OK);
+}
+void TransformerForm::OnStabilityButtonClick(wxCommandEvent& event)
+{
+ if(ValidateData()) {
+ SwitchingForm swForm(m_parent, m_transformer);
+ swForm.SetTitle(_("Transfomer: Switching"));
+ swForm.ShowModal();
+ EndModal(wxID_OK);
+ }
+}
+
+bool TransformerForm::ValidateData()
+{
+ return true;
+}