+ std::string* result;
+
+ if((int)((wxButton*)event.GetEventObject())->GetId() == (int)ID_BUTTON_EDIT_CMAKELISTSFILE)
+ {
+
+ if(!this->library->OpenCMakeListsFile(result))
+ wxMessageBox(crea::std2wx(*result),_T("Open CMakeLists File - Error!"),wxOK | wxICON_ERROR);
+
+ wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
+
+ if(this->library->GetCMakeLists() != NULL)
+ {
+ newEvent->SetClientData(this->library->GetCMakeLists());
+ newEvent->SetId(0);
+ wxPostEvent(this->GetParent(), *newEvent);
+ }
+ }
+ else if(((wxButton*)event.GetEventObject())->GetId() == ID_BUTTON_OPENPROJECT)
+ {
+ modelCDMIProjectTreeNode* node = this->library;
+ while (node != NULL && dynamic_cast<modelCDMLib*>(node) == NULL)
+ {
+ node = node->GetParent();
+ }
+ if (node != NULL)
+ {
+ if(!((modelCDMLib*)node)->OpenCMakeListsFile(result))
+ wxMessageBox(crea::std2wx(*result),_T("Open CMakeLists File - Error!"),wxOK | wxICON_ERROR);
+
+ wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
+
+ if(((modelCDMLib*)node)->GetCMakeLists() != NULL)
+ {
+ newEvent->SetClientData(((modelCDMLib*)node)->GetCMakeLists());
+ newEvent->SetId(0);
+ wxPostEvent(this->GetParent(), *newEvent);
+ }
+ }
+ else
+ {
+ wxMessageBox(crea::std2wx("No project CMakeLists file was found."),_T("Open CMakeLists File - Error!"),wxOK | wxICON_ERROR);
+ }
+ }