Mercurial > mercurial > hgweb_iklist.hg.cgi
comparison src/iklist.cpp @ 3:d3e201c48ff8 draft default tip
bug fix.
| author | pyon |
|---|---|
| date | Wed, 29 Sep 2021 22:04:51 +0900 |
| parents | c0f76f8e67fa |
| children |
comparison
equal
deleted
inserted
replaced
| 2:c0f76f8e67fa | 3:d3e201c48ff8 |
|---|---|
| 1 // Filename : iklist.cpp | 1 // Filename : iklist.cpp |
| 2 // Last Change: 2021-08-27 金 14:20:56. | 2 // Last Change: 2021-09-29 水 16:56:26. |
| 3 // | 3 // |
| 4 #include <wx/textfile.h> | 4 #include <wx/textfile.h> |
| 5 #include <wx/utils.h> | 5 #include <wx/utils.h> |
| 6 #include <wx/dir.h> | 6 #include <wx/dir.h> |
| 7 #include <wx/filefn.h> | 7 #include <wx/filefn.h> |
| 8 #include <wx/wfstream.h> | 8 #include <wx/wfstream.h> |
| 9 #include <wx/sstream.h> | |
| 9 #include <wx/txtstrm.h> | 10 #include <wx/txtstrm.h> |
| 10 #include <wx/fs_zip.h> | 11 #include <wx/fs_zip.h> |
| 11 #include <wx/filesys.h> | 12 #include <wx/filesys.h> |
| 12 #include <wx/datetime.h> | 13 #include <wx/datetime.h> |
| 13 #include <wx/msgdlg.h> | 14 #include <wx/msgdlg.h> |
| 37 m_searchCtrl->Connect(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEventHandler(MainFrame::OnSearch), NULL, this); | 38 m_searchCtrl->Connect(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEventHandler(MainFrame::OnSearch), NULL, this); |
| 38 m_searchCtrl->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(MainFrame::OnText), NULL, this); | 39 m_searchCtrl->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(MainFrame::OnText), NULL, this); |
| 39 m_searchCtrl->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(MainFrame::OnSearch), NULL, this); | 40 m_searchCtrl->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(MainFrame::OnSearch), NULL, this); |
| 40 m_textCtrl->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(MainFrame::OnTextEnter), NULL, this); | 41 m_textCtrl->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(MainFrame::OnTextEnter), NULL, this); |
| 41 m_button->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainFrame::OnClick), NULL, this); | 42 m_button->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainFrame::OnClick), NULL, this); |
| 42 m_choiceCity->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(MainFrame::OnCityChoice), NULL, this); | |
| 43 m_choiceKind->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(MainFrame::OnKindChoice), NULL, this); | |
| 44 m_dataViewListCtrl->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(MainFrame::OnListItemActivated), NULL, this); | 43 m_dataViewListCtrl->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(MainFrame::OnListItemActivated), NULL, this); |
| 45 } | 44 } |
| 46 | 45 |
| 47 MainFrame::~MainFrame() | 46 MainFrame::~MainFrame() |
| 48 { | 47 { |
| 151 } | 150 } |
| 152 //m_dataViewListCtrl->SetScrollPos(wxVERTICAL, 0, true); | 151 //m_dataViewListCtrl->SetScrollPos(wxVERTICAL, 0, true); |
| 153 m_dataViewListCtrl->Scroll(0, 0); | 152 m_dataViewListCtrl->Scroll(0, 0); |
| 154 m_statusBar->SetStatusText(wxString::Format(wxT(" %d found."), n), 0); | 153 m_statusBar->SetStatusText(wxString::Format(wxT(" %d found."), n), 0); |
| 155 } | 154 } |
| 156 #include <wx/sstream.h> | 155 |
| 157 wxString MainFrame::MakePDF(wxString index) | 156 wxString MainFrame::MakePDF(wxString index) |
| 158 { | 157 { |
| 159 wxString tmpdir; | 158 wxString tmpdir; |
| 160 wxGetEnv(wxT("TEMP"), &tmpdir); | 159 wxGetEnv(wxT("TEMP"), &tmpdir); |
| 161 wxString pdf = tmpdir + "/iklist-" + index + ".pdf"; | 160 wxString pdf = tmpdir + "/iklist-" + index + ".pdf"; |
| 299 m_textCtrl->Disconnect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(MainFrame::OnTextEnter), NULL, this); | 298 m_textCtrl->Disconnect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(MainFrame::OnTextEnter), NULL, this); |
| 300 m_button->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainFrame::OnClick), NULL, this); | 299 m_button->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainFrame::OnClick), NULL, this); |
| 301 m_textCtrl->Destroy(); | 300 m_textCtrl->Destroy(); |
| 302 m_button->Destroy(); | 301 m_button->Destroy(); |
| 303 m_searchCtrl->Show(); | 302 m_searchCtrl->Show(); |
| 303 m_choiceCity->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(MainFrame::OnCityChoice), NULL, this); | |
| 304 m_choiceKind->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(MainFrame::OnKindChoice), NULL, this); | |
| 304 this->Layout(); | 305 this->Layout(); |
| 305 | 306 |
| 306 SetList(); | 307 SetList(); |
| 307 } | 308 } |
| 308 | 309 |
