BEGIN_EVENT_TABLE(wxCDMFileDescriptionPanel, wxPanel)
EVT_BUTTON(ID_BUTTON_PREV, wxCDMFileDescriptionPanel::OnBtnReturn)
-EVT_MENU(ID_BUTTON_OPEN_FOLDER, wxCDMFileDescriptionPanel::OnBtnOpenFolder)
-EVT_MENU(ID_BUTTON_OPEN_COMMAND, wxCDMFileDescriptionPanel::OnBtnOpenWithCommand)
+EVT_BUTTON(ID_BUTTON_OPEN_FOLDER, wxCDMFileDescriptionPanel::OnBtnOpenFolder)
+EVT_BUTTON(ID_BUTTON_OPEN_COMMAND, wxCDMFileDescriptionPanel::OnBtnOpenWithCommand)
END_EVENT_TABLE()
wxCDMFileDescriptionPanel::wxCDMFileDescriptionPanel(
void wxCDMFileDescriptionPanel::OnBtnOpenFolder(wxCommandEvent& event)
{
- //TODO: implement method
- std::cerr << "Event OnBtnOpenContainingFolder not implemented" << std::endl;
- event.Skip();
+ std::string* result;
+ if(!this->file->OpenInFileExplorer(result))
+ wxMessageBox(crea::std2wx(*result),_T("Open Folder - Error!"),wxOK | wxICON_ERROR);
}
void wxCDMFileDescriptionPanel::OnBtnOpenWithCommand(wxCommandEvent& event)
{
- //TODO: implement method
- std::cerr << "Event OnBtnOpenWithCommand not implemented" << std::endl;
- event.Skip();
+ //get command
+ wxString commandEx = wxGetTextFromUser(
+ _T("Enter the command to execute file"),
+ _T("Execute File - creaDevManager"),
+ _T("")
+ );
+ //check name
+ if(commandEx.Len() > 0)
+ {
+ std::string* result;
+ if(!this->file->OpenFile(result, crea::wx2std(commandEx)))
+ wxMessageBox(crea::std2wx(*result),_T("Execute File - Error!"),wxOK | wxICON_ERROR);
+ }
}