#include "MainEntry.h" bool CLinuxPack::OnInit() { auto* frame = new CMainFrame(wxT("Linux二进制打包")); frame->Show(true); return true; } CMainEntry::CMainEntry(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name) : CMainWidget(parent, id, pos, size, style, name) { } CMainFrame::CMainFrame(const wxString& title) : wxFrame(nullptr, wxID_ANY, title) { entry_ = new CMainEntry(this, wxID_ANY); } void CMainFrame::selectBinaryFile(wxCommandEvent& event) { // btnSelectBinary->Bind(wxEVT_BUTTON, &CMainFrame::selectBinaryFile, this); wxFileDialog openFileDialog( this, _("Open file"), "", "", "Text files (*.txt)|*.txt|PDF files (*.pdf)|*.pdf|All files (*.*)|*.*", wxFD_OPEN | wxFD_FILE_MUST_EXIST); if (openFileDialog.ShowModal() == wxID_CANCEL) return; wxString filePath = openFileDialog.GetPath(); //text_ctrl_->SetValue(filePath); }