+
+ wxCDMNewBlackBoxDialog* dialog = new wxCDMNewBlackBoxDialog(this);
+ long userResponse;
+ userResponse = dialog->ShowModal();
+
+ if(userResponse == wxID_FORWARD)
+ {
+ std::string* result;
+ //create black box
+ modelCDMIProjectTreeNode* blackBox = this->package->CreateBlackBox(
+ result,
+ crea::wx2std(dialog->GetBlackBoxName()),
+ crea::wx2std(dialog->GetBlackBoxType()),
+ crea::wx2std(dialog->GetBlackBoxFormat()),
+ crea::wx2std(dialog->GetBlackBoxCategories()),
+ crea::wx2std(dialog->GetBlackBoxAuthor()),
+ crea::wx2std(dialog->GetBlackBoxAuthorEmail()),
+ crea::wx2std(dialog->GetBlackBoxDescription())
+ );
+ //check black box created
+ if(blackBox == NULL)
+ {
+ wxMessageBox(crea::std2wx(*result),_T("New Black Box - Error!"),wxOK | wxICON_ERROR);
+ return;
+ }
+ wxMessageBox(crea::std2wx("Black box successfully created."),_T("New Black Box - Success!"),wxOK | wxICON_INFORMATION);
+
+ //refreshing tree and description
+ //send event instead of calling parent to avoid crashing
+
+ ((wxCDMMainFrame*)this->GetParent())->RefreshProject();
+
+ wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
+ newEvent->SetId(1);
+ newEvent->SetClientData(blackBox);
+ newEvent->SetString(wxT("blackbox"));
+ newEvent->SetClientData(blackBox);
+ wxPostEvent(this->GetParent(), *newEvent);
+ }
+}
+
+void
+wxCDMPackageDescriptionPanel::OnBtnConfigurePackage(wxCommandEvent& event)
+{
+ wxCDMPackageConfigurationDialog* dialog = new wxCDMPackageConfigurationDialog(this,this->package);
+ long userResponse;
+ userResponse = dialog->ShowModal();