summaryrefslogtreecommitdiffstats
path: root/Project/ElementForm.cpp
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2016-10-27 17:26:24 -0200
committerThales1330 <thaleslima.ufu@gmail.com>2016-10-27 17:26:24 -0200
commit02c5a1d22a078c132aca40ea14b95800dd8257e9 (patch)
tree39f576cc3c66931c3448b85833a5f048a40b7802 /Project/ElementForm.cpp
parent0e3a45462bf8ce31be988679fd380baeecfb1b95 (diff)
downloadPSP.git-02c5a1d22a078c132aca40ea14b95800dd8257e9.tar.gz
PSP.git-02c5a1d22a078c132aca40ea14b95800dd8257e9.tar.xz
PSP.git-02c5a1d22a078c132aca40ea14b95800dd8257e9.zip
All elements forms implemented
Diffstat (limited to 'Project/ElementForm.cpp')
-rw-r--r--Project/ElementForm.cpp427
1 files changed, 292 insertions, 135 deletions
diff --git a/Project/ElementForm.cpp b/Project/ElementForm.cpp
index 1b430b6..489405f 100644
--- a/Project/ElementForm.cpp
+++ b/Project/ElementForm.cpp
@@ -382,7 +382,7 @@ BusFormBase::~BusFormBase()
}
-GeneratorFormBase::GeneratorFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
+SyncMachineFormBase::SyncMachineFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxDialog(parent, id, title, pos, size, style)
{
if ( !bBitmapLoaded ) {
@@ -745,7 +745,7 @@ GeneratorFormBase::GeneratorFormBase(wxWindow* parent, wxWindowID id, const wxSt
}
#endif
- SetName(wxT("GeneratorFormBase"));
+ SetName(wxT("SyncMachineFormBase"));
SetSize(-1,-1);
if (GetSizer()) {
GetSizer()->Fit(this);
@@ -763,21 +763,21 @@ GeneratorFormBase::GeneratorFormBase(wxWindow* parent, wxWindowID id, const wxSt
}
#endif
// Connect events
- m_checkBoxMaxReactive->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(GeneratorFormBase::OnCheckMaxReactive), NULL, this);
- m_checkBoxMinReactive->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(GeneratorFormBase::OnCheckMinReactive), NULL, this);
- m_buttonStab->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneratorFormBase::OnStabilityButtonClick), NULL, this);
- m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneratorFormBase::OnOKButtonClick), NULL, this);
- m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneratorFormBase::OnCancelButtonClick), NULL, this);
+ m_checkBoxMaxReactive->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnCheckMaxReactive), NULL, this);
+ m_checkBoxMinReactive->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnCheckMinReactive), NULL, this);
+ m_buttonStab->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnStabilityButtonClick), NULL, this);
+ m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnOKButtonClick), NULL, this);
+ m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnCancelButtonClick), NULL, this);
}
-GeneratorFormBase::~GeneratorFormBase()
+SyncMachineFormBase::~SyncMachineFormBase()
{
- m_checkBoxMaxReactive->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(GeneratorFormBase::OnCheckMaxReactive), NULL, this);
- m_checkBoxMinReactive->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(GeneratorFormBase::OnCheckMinReactive), NULL, this);
- m_buttonStab->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneratorFormBase::OnStabilityButtonClick), NULL, this);
- m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneratorFormBase::OnOKButtonClick), NULL, this);
- m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneratorFormBase::OnCancelButtonClick), NULL, this);
+ m_checkBoxMaxReactive->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnCheckMaxReactive), NULL, this);
+ m_checkBoxMinReactive->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnCheckMinReactive), NULL, this);
+ m_buttonStab->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnStabilityButtonClick), NULL, this);
+ m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnOKButtonClick), NULL, this);
+ m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnCancelButtonClick), NULL, this);
}
@@ -1993,7 +1993,7 @@ TransformerFormBase::~TransformerFormBase()
}
-SwitchingFormBase::SwitchingFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
+LoadFormBase::LoadFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxDialog(parent, id, title, pos, size, style)
{
if ( !bBitmapLoaded ) {
@@ -2006,81 +2006,131 @@ SwitchingFormBase::SwitchingFormBase(wxWindow* parent, wxWindowID id, const wxSt
wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
this->SetSizer(boxSizerLvl1_1);
- wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxHORIZONTAL);
+ m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
+ m_notebook->SetName(wxT("m_notebook"));
- boxSizerLvl1_1->Add(boxSizerLvl2_1, 0, wxALL, WXC_FROM_DIP(5));
+ boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
- wxBoxSizer* boxSizerLvl3_1 = new wxBoxSizer(wxVERTICAL);
+ m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
+ m_notebook->AddPage(m_panelGeneral, _("General"), false);
- boxSizerLvl2_1->Add(boxSizerLvl3_1, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
+ wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
+ m_panelGeneral->SetSizer(boxSizerLvl2_1);
- wxArrayString m_pgMgrSwitchingsPropArr;
- wxUnusedVar(m_pgMgrSwitchingsPropArr);
- wxArrayInt m_pgMgrSwitchingsPropIntArr;
- wxUnusedVar(m_pgMgrSwitchingsPropIntArr);
- m_pgMgrSwitchingsProp = new wxPropertyGridManager(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxPG_STATIC_LAYOUT|wxPG_SPLITTER_AUTO_CENTER|wxPG_BOLD_MODIFIED);
+ m_staticTextName = new wxStaticText(m_panelGeneral, wxID_ANY, _("Name"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
- boxSizerLvl3_1->Add(m_pgMgrSwitchingsProp, 1, wxALL, WXC_FROM_DIP(5));
+ boxSizerLvl2_1->Add(m_staticTextName, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
- m_pgPropTitle = m_pgMgrSwitchingsProp->Append( new wxPropertyCategory( _("Switching properties") ) );
- m_pgPropTitle->SetHelpString(wxT(""));
+ m_textCtrlName = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+ #if wxVERSION_NUMBER >= 3000
+ m_textCtrlName->SetHint(wxT(""));
+ #endif
- m_pgMgrSwitchingsPropArr.Clear();
- m_pgMgrSwitchingsPropIntArr.Clear();
- m_pgMgrSwitchingsPropArr.Add(_("Insert"));
- m_pgMgrSwitchingsPropArr.Add(_("Remove"));
- m_pgPropType = m_pgMgrSwitchingsProp->Append( new wxEnumProperty( _("Type"), wxPG_LABEL, m_pgMgrSwitchingsPropArr, m_pgMgrSwitchingsPropIntArr, 0) );
- m_pgPropType->SetHelpString(wxT(""));
+ boxSizerLvl2_1->Add(m_textCtrlName, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+ m_textCtrlName->SetMinSize(wxSize(300,-1));
- m_pgPropTime = m_pgMgrSwitchingsProp->Append( new wxFloatProperty( _("Time (s)"), wxPG_LABEL, 0) );
- m_pgPropTime->SetHelpString(wxT(""));
- m_pgMgrSwitchingsProp->SetMinSize(wxSize(150,-1));
+ wxGridSizer* gridSizerLvl3_1 = new wxGridSizer(0, 2, 0, 0);
- wxBoxSizer* boxSizerLvl3_3 = new wxBoxSizer(wxVERTICAL);
+ boxSizerLvl2_1->Add(gridSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5));
- boxSizerLvl2_1->Add(boxSizerLvl3_3, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+ wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxVERTICAL);
- m_buttonInsert = new wxButton(this, wxID_ANY, _("Add"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+ gridSizerLvl3_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5));
- boxSizerLvl3_3->Add(m_buttonInsert, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
+ m_staticTextActivePower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Active power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
- m_buttonRemove = new wxButton(this, wxID_ANY, _("Remove"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+ boxSizerLvl4_1->Add(m_staticTextActivePower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
- boxSizerLvl3_3->Add(m_buttonRemove, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
+ wxBoxSizer* boxSizerLvl5_1 = new wxBoxSizer(wxHORIZONTAL);
- m_buttonUp = new wxButton(this, wxID_ANY, _("Up"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+ boxSizerLvl4_1->Add(boxSizerLvl5_1, 0, wxEXPAND, WXC_FROM_DIP(5));
- boxSizerLvl3_3->Add(m_buttonUp, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
+ m_textCtrlActivePower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+ #if wxVERSION_NUMBER >= 3000
+ m_textCtrlActivePower->SetHint(wxT(""));
+ #endif
- m_buttonDown = new wxButton(this, wxID_ANY, _("Down"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+ boxSizerLvl5_1->Add(m_textCtrlActivePower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
- boxSizerLvl3_3->Add(m_buttonDown, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
+ wxArrayString m_choiceActivePowerArr;
+ m_choiceActivePowerArr.Add(wxT("p.u."));
+ m_choiceActivePowerArr.Add(wxT("W"));
+ m_choiceActivePowerArr.Add(wxT("kW"));
+ m_choiceActivePowerArr.Add(wxT("MW"));
+ m_choiceActivePower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceActivePowerArr, 0);
+ m_choiceActivePower->SetSelection(3);
- wxBoxSizer* boxSizerLvl3_2 = new wxBoxSizer(wxVERTICAL);
+ boxSizerLvl5_1->Add(m_choiceActivePower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
- boxSizerLvl2_1->Add(boxSizerLvl3_2, 0, wxALL, WXC_FROM_DIP(5));
+ wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL);
- m_staticTextSwList = new wxStaticText(this, wxID_ANY, _("Switching list"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+ gridSizerLvl3_1->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5));
- boxSizerLvl3_2->Add(m_staticTextSwList, 0, wxLEFT|wxRIGHT|wxTOP, WXC_FROM_DIP(5));
+ m_staticTextReactivePower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Reactive power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
- m_listCtrlSwitchings = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxLC_REPORT);
+ boxSizerLvl4_2->Add(m_staticTextReactivePower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
- boxSizerLvl3_2->Add(m_listCtrlSwitchings, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
+ wxBoxSizer* boxSizerLvl5_2 = new wxBoxSizer(wxHORIZONTAL);
+
+ boxSizerLvl4_2->Add(boxSizerLvl5_2, 0, wxEXPAND, WXC_FROM_DIP(5));
+
+ m_textCtrlReactivePower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+ #if wxVERSION_NUMBER >= 3000
+ m_textCtrlReactivePower->SetHint(wxT(""));
+ #endif
+
+ boxSizerLvl5_2->Add(m_textCtrlReactivePower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ wxArrayString m_choiceReactivePowerArr;
+ m_choiceReactivePowerArr.Add(wxT("p.u."));
+ m_choiceReactivePowerArr.Add(wxT("VAr"));
+ m_choiceReactivePowerArr.Add(wxT("kVAr"));
+ m_choiceReactivePowerArr.Add(wxT("MVAr"));
+ m_choiceReactivePower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceReactivePowerArr, 0);
+ m_choiceReactivePower->SetSelection(3);
+
+ boxSizerLvl5_2->Add(m_choiceReactivePower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
+
+ m_staticTextType = new wxStaticText(m_panelGeneral, wxID_ANY, _("Load type"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+
+ boxSizerLvl2_1->Add(m_staticTextType, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ wxArrayString m_choiceTypeArr;
+ m_choiceTypeArr.Add(wxT("Constant power"));
+ m_choiceTypeArr.Add(wxT("Constant impedance"));
+ m_choiceType = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceTypeArr, 0);
+ m_choiceType->SetSelection(0);
+
+ boxSizerLvl2_1->Add(m_choiceType, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
- boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
+ boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
+
+ m_buttonStabButton = new wxButton(this, wxID_ANY, _("Stability"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+
+ boxSizerBottomButtons->Add(m_buttonStabButton, 0, wxALL|wxALIGN_LEFT, WXC_FROM_DIP(5));
+
+ boxSizerBottomButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
- m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+ m_ButtonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
- boxSizerBottomButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
+ boxSizerBottomButtons->Add(m_ButtonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
- SetName(wxT("SwitchingFormBase"));
+
+ #if wxVERSION_NUMBER >= 2900
+ if(!wxPersistenceManager::Get().Find(m_notebook)){
+ wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
+ } else {
+ wxPersistenceManager::Get().Restore(m_notebook);
+ }
+ #endif
+
+ SetName(wxT("LoadFormBase"));
SetSize(-1,-1);
if (GetSizer()) {
GetSizer()->Fit(this);
@@ -2098,31 +2148,21 @@ SwitchingFormBase::SwitchingFormBase(wxWindow* parent, wxWindowID id, const wxSt
}
#endif
// Connect events
- m_pgMgrSwitchingsProp->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(SwitchingFormBase::OnChangeProperties), NULL, this);
- m_buttonInsert->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnInsertButtonClick), NULL, this);
- m_buttonRemove->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnRemoveButtonClick), NULL, this);
- m_buttonUp->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnUpButtonClick), NULL, this);
- m_buttonDown->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnDownButtonClick), NULL, this);
- m_listCtrlSwitchings->Connect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(SwitchingFormBase::OnSelectItem), NULL, this);
- m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnOKButtonClick), NULL, this);
- m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnCancelButtonClick), NULL, this);
+ m_buttonStabButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnStabilityButtonClick), NULL, this);
+ m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnOnButtonClick), NULL, this);
+ m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnCancelButtonClick), NULL, this);
}
-SwitchingFormBase::~SwitchingFormBase()
+LoadFormBase::~LoadFormBase()
{
- m_pgMgrSwitchingsProp->Disconnect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(SwitchingFormBase::OnChangeProperties), NULL, this);
- m_buttonInsert->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnInsertButtonClick), NULL, this);
- m_buttonRemove->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnRemoveButtonClick), NULL, this);
- m_buttonUp->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnUpButtonClick), NULL, this);
- m_buttonDown->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnDownButtonClick), NULL, this);
- m_listCtrlSwitchings->Disconnect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(SwitchingFormBase::OnSelectItem), NULL, this);
- m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnOKButtonClick), NULL, this);
- m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnCancelButtonClick), NULL, this);
+ m_buttonStabButton->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnStabilityButtonClick), NULL, this);
+ m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnOnButtonClick), NULL, this);
+ m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnCancelButtonClick), NULL, this);
}
-LoadFormBase::LoadFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
+ReactiveShuntElementFormBase::ReactiveShuntElementFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxDialog(parent, id, title, pos, size, style)
{
if ( !bBitmapLoaded ) {
@@ -2162,35 +2202,6 @@ LoadFormBase::LoadFormBase(wxWindow* parent, wxWindowID id, const wxString& titl
boxSizerLvl2_1->Add(gridSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5));
- wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxVERTICAL);
-
- gridSizerLvl3_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5));
-
- m_staticTextActivePower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Active power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
-
- boxSizerLvl4_1->Add(m_staticTextActivePower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
-
- wxBoxSizer* boxSizerLvl5_1 = new wxBoxSizer(wxHORIZONTAL);
-
- boxSizerLvl4_1->Add(boxSizerLvl5_1, 0, wxEXPAND, WXC_FROM_DIP(5));
-
- m_textCtrlActivePower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
- #if wxVERSION_NUMBER >= 3000
- m_textCtrlActivePower->SetHint(wxT(""));
- #endif
-
- boxSizerLvl5_1->Add(m_textCtrlActivePower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
-
- wxArrayString m_choiceActivePowerArr;
- m_choiceActivePowerArr.Add(wxT("p.u."));
- m_choiceActivePowerArr.Add(wxT("W"));
- m_choiceActivePowerArr.Add(wxT("kW"));
- m_choiceActivePowerArr.Add(wxT("MW"));
- m_choiceActivePower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceActivePowerArr, 0);
- m_choiceActivePower->SetSelection(3);
-
- boxSizerLvl5_1->Add(m_choiceActivePower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
-
wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL);
gridSizerLvl3_1->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5));
@@ -2220,18 +2231,6 @@ LoadFormBase::LoadFormBase(wxWindow* parent, wxWindowID id, const wxString& titl
boxSizerLvl5_2->Add(m_choiceReactivePower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
- m_staticTextType = new wxStaticText(m_panelGeneral, wxID_ANY, _("Load type"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
-
- boxSizerLvl2_1->Add(m_staticTextType, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
-
- wxArrayString m_choiceTypeArr;
- m_choiceTypeArr.Add(wxT("Constant power"));
- m_choiceTypeArr.Add(wxT("Constant impedance"));
- m_choiceType = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceTypeArr, 0);
- m_choiceType->SetSelection(0);
-
- boxSizerLvl2_1->Add(m_choiceType, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
-
wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
@@ -2246,9 +2245,9 @@ LoadFormBase::LoadFormBase(wxWindow* parent, wxWindowID id, const wxString& titl
boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
- m_ButtonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+ m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
- boxSizerBottomButtons->Add(m_ButtonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
+ boxSizerBottomButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
#if wxVERSION_NUMBER >= 2900
@@ -2259,7 +2258,7 @@ LoadFormBase::LoadFormBase(wxWindow* parent, wxWindowID id, const wxString& titl
}
#endif
- SetName(wxT("LoadFormBase"));
+ SetName(wxT("ReactiveShuntElementFormBase"));
SetSize(-1,-1);
if (GetSizer()) {
GetSizer()->Fit(this);
@@ -2277,21 +2276,150 @@ LoadFormBase::LoadFormBase(wxWindow* parent, wxWindowID id, const wxString& titl
}
#endif
// Connect events
- m_buttonStabButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnStabilityButtonClick), NULL, this);
- m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnOnButtonClick), NULL, this);
- m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnCancelButtonClick), NULL, this);
+ m_buttonStabButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnStabilityButtonClick), NULL, this);
+ m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnOKButtonClick), NULL, this);
+ m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnCancelButtonClick), NULL, this);
}
-LoadFormBase::~LoadFormBase()
+ReactiveShuntElementFormBase::~ReactiveShuntElementFormBase()
{
- m_buttonStabButton->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnStabilityButtonClick), NULL, this);
- m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnOnButtonClick), NULL, this);
- m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnCancelButtonClick), NULL, this);
+ m_buttonStabButton->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnStabilityButtonClick), NULL, this);
+ m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnOKButtonClick), NULL, this);
+ m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnCancelButtonClick), NULL, this);
}
-ReactiveShuntElementFormBase::ReactiveShuntElementFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
+SwitchingFormBase::SwitchingFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
+ : wxDialog(parent, id, title, pos, size, style)
+{
+ if ( !bBitmapLoaded ) {
+ // We need to initialise the default bitmap handler
+ wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
+ wxC9EE9InitBitmapResources();
+ bBitmapLoaded = true;
+ }
+
+ wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
+ this->SetSizer(boxSizerLvl1_1);
+
+ wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxHORIZONTAL);
+
+ boxSizerLvl1_1->Add(boxSizerLvl2_1, 0, wxALL, WXC_FROM_DIP(5));
+
+ wxBoxSizer* boxSizerLvl3_1 = new wxBoxSizer(wxVERTICAL);
+
+ boxSizerLvl2_1->Add(boxSizerLvl3_1, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
+
+ wxArrayString m_pgMgrSwitchingsPropArr;
+ wxUnusedVar(m_pgMgrSwitchingsPropArr);
+ wxArrayInt m_pgMgrSwitchingsPropIntArr;
+ wxUnusedVar(m_pgMgrSwitchingsPropIntArr);
+ m_pgMgrSwitchingsProp = new wxPropertyGridManager(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxPG_STATIC_LAYOUT|wxPG_SPLITTER_AUTO_CENTER|wxPG_BOLD_MODIFIED);
+
+ boxSizerLvl3_1->Add(m_pgMgrSwitchingsProp, 1, wxALL, WXC_FROM_DIP(5));
+
+ m_pgPropTitle = m_pgMgrSwitchingsProp->Append( new wxPropertyCategory( _("Switching properties") ) );
+ m_pgPropTitle->SetHelpString(wxT(""));
+
+ m_pgMgrSwitchingsPropArr.Clear();
+ m_pgMgrSwitchingsPropIntArr.Clear();
+ m_pgMgrSwitchingsPropArr.Add(_("Insert"));
+ m_pgMgrSwitchingsPropArr.Add(_("Remove"));
+ m_pgPropType = m_pgMgrSwitchingsProp->Append( new wxEnumProperty( _("Type"), wxPG_LABEL, m_pgMgrSwitchingsPropArr, m_pgMgrSwitchingsPropIntArr, 0) );
+ m_pgPropType->SetHelpString(wxT(""));
+
+ m_pgPropTime = m_pgMgrSwitchingsProp->Append( new wxFloatProperty( _("Time (s)"), wxPG_LABEL, 0) );
+ m_pgPropTime->SetHelpString(wxT(""));
+ m_pgMgrSwitchingsProp->SetMinSize(wxSize(150,-1));
+
+ wxBoxSizer* boxSizerLvl3_3 = new wxBoxSizer(wxVERTICAL);
+
+ boxSizerLvl2_1->Add(boxSizerLvl3_3, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ m_buttonInsert = new wxButton(this, wxID_ANY, _("Add"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+
+ boxSizerLvl3_3->Add(m_buttonInsert, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
+
+ m_buttonRemove = new wxButton(this, wxID_ANY, _("Remove"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+
+ boxSizerLvl3_3->Add(m_buttonRemove, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
+
+ m_buttonUp = new wxButton(this, wxID_ANY, _("Up"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+
+ boxSizerLvl3_3->Add(m_buttonUp, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
+
+ m_buttonDown = new wxButton(this, wxID_ANY, _("Down"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+
+ boxSizerLvl3_3->Add(m_buttonDown, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
+
+ wxBoxSizer* boxSizerLvl3_2 = new wxBoxSizer(wxVERTICAL);
+
+ boxSizerLvl2_1->Add(boxSizerLvl3_2, 0, wxALL, WXC_FROM_DIP(5));
+
+ m_staticTextSwList = new wxStaticText(this, wxID_ANY, _("Switching list"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+
+ boxSizerLvl3_2->Add(m_staticTextSwList, 0, wxLEFT|wxRIGHT|wxTOP, WXC_FROM_DIP(5));
+
+ m_listCtrlSwitchings = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxLC_REPORT);
+
+ boxSizerLvl3_2->Add(m_listCtrlSwitchings, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
+
+ wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
+
+ boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
+
+ m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+
+ boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
+
+ m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+
+ boxSizerBottomButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
+
+ SetName(wxT("SwitchingFormBase"));
+ SetSize(-1,-1);
+ if (GetSizer()) {
+ GetSizer()->Fit(this);
+ }
+ if(GetParent()) {
+ CentreOnParent(wxBOTH);
+ } else {
+ CentreOnScreen(wxBOTH);
+ }
+#if wxVERSION_NUMBER >= 2900
+ if(!wxPersistenceManager::Get().Find(this)) {
+ wxPersistenceManager::Get().RegisterAndRestore(this);
+ } else {
+ wxPersistenceManager::Get().Restore(this);
+ }
+#endif
+ // Connect events
+ m_pgMgrSwitchingsProp->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(SwitchingFormBase::OnChangeProperties), NULL, this);
+ m_buttonInsert->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnInsertButtonClick), NULL, this);
+ m_buttonRemove->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnRemoveButtonClick), NULL, this);
+ m_buttonUp->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnUpButtonClick), NULL, this);
+ m_buttonDown->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnDownButtonClick), NULL, this);
+ m_listCtrlSwitchings->Connect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(SwitchingFormBase::OnSelectItem), NULL, this);
+ m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnOKButtonClick), NULL, this);
+ m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnCancelButtonClick), NULL, this);
+
+}
+
+SwitchingFormBase::~SwitchingFormBase()
+{
+ m_pgMgrSwitchingsProp->Disconnect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(SwitchingFormBase::OnChangeProperties), NULL, this);
+ m_buttonInsert->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnInsertButtonClick), NULL, this);
+ m_buttonRemove->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnRemoveButtonClick), NULL, this);
+ m_buttonUp->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnUpButtonClick), NULL, this);
+ m_buttonDown->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnDownButtonClick), NULL, this);
+ m_listCtrlSwitchings->Disconnect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(SwitchingFormBase::OnSelectItem), NULL, this);
+ m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnOKButtonClick), NULL, this);
+ m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnCancelButtonClick), NULL, this);
+
+}
+
+IndMotorFormBase::IndMotorFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxDialog(parent, id, title, pos, size, style)
{
if ( !bBitmapLoaded ) {
@@ -2331,6 +2459,35 @@ ReactiveShuntElementFormBase::ReactiveShuntElementFormBase(wxWindow* parent, wxW
boxSizerLvl2_1->Add(gridSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5));
+ wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxVERTICAL);
+
+ gridSizerLvl3_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5));
+
+ m_staticTextActivePower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Active power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+
+ boxSizerLvl4_1->Add(m_staticTextActivePower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ wxBoxSizer* boxSizerLvl5_1 = new wxBoxSizer(wxHORIZONTAL);
+
+ boxSizerLvl4_1->Add(boxSizerLvl5_1, 0, wxEXPAND, WXC_FROM_DIP(5));
+
+ m_textCtrlActivePower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+ #if wxVERSION_NUMBER >= 3000
+ m_textCtrlActivePower->SetHint(wxT(""));
+ #endif
+
+ boxSizerLvl5_1->Add(m_textCtrlActivePower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ wxArrayString m_choiceActivePowerArr;
+ m_choiceActivePowerArr.Add(wxT("p.u."));
+ m_choiceActivePowerArr.Add(wxT("W"));
+ m_choiceActivePowerArr.Add(wxT("kW"));
+ m_choiceActivePowerArr.Add(wxT("MW"));
+ m_choiceActivePower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceActivePowerArr, 0);
+ m_choiceActivePower->SetSelection(3);
+
+ boxSizerLvl5_1->Add(m_choiceActivePower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
+
wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL);
gridSizerLvl3_1->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5));
@@ -2374,9 +2531,9 @@ ReactiveShuntElementFormBase::ReactiveShuntElementFormBase(wxWindow* parent, wxW
boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
- m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+ m_ButtonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
- boxSizerBottomButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
+ boxSizerBottomButtons->Add(m_ButtonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
#if wxVERSION_NUMBER >= 2900
@@ -2387,7 +2544,7 @@ ReactiveShuntElementFormBase::ReactiveShuntElementFormBase(wxWindow* parent, wxW
}
#endif
- SetName(wxT("ReactiveShuntElementFormBase"));
+ SetName(wxT("IndMotorFormBase"));
SetSize(-1,-1);
if (GetSizer()) {
GetSizer()->Fit(this);
@@ -2405,16 +2562,16 @@ ReactiveShuntElementFormBase::ReactiveShuntElementFormBase(wxWindow* parent, wxW
}
#endif
// Connect events
- m_buttonStabButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnStabilityButtonClick), NULL, this);
- m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnOKButtonClick), NULL, this);
- m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnCancelButtonClick), NULL, this);
+ m_buttonStabButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IndMotorFormBase::OnStabilityButtonClick), NULL, this);
+ m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IndMotorFormBase::OnOKButtonClick), NULL, this);
+ m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IndMotorFormBase::OnCancelButtonClick), NULL, this);
}
-ReactiveShuntElementFormBase::~ReactiveShuntElementFormBase()
+IndMotorFormBase::~IndMotorFormBase()
{
- m_buttonStabButton->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnStabilityButtonClick), NULL, this);
- m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnOKButtonClick), NULL, this);
- m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnCancelButtonClick), NULL, this);
+ m_buttonStabButton->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IndMotorFormBase::OnStabilityButtonClick), NULL, this);
+ m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IndMotorFormBase::OnOKButtonClick), NULL, this);
+ m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IndMotorFormBase::OnCancelButtonClick), NULL, this);
}