Mercurial > mercurial > hgweb_mover.cgi
comparison src/myframe.cpp @ 5:3b734fd6ee2b
v0.2
| author | pyon@macmini |
|---|---|
| date | Thu, 06 Oct 2011 20:27:54 +0900 |
| parents | a505f7417742 |
| children | 99d612849255 |
comparison
equal
deleted
inserted
replaced
| 4:a505f7417742 | 5:3b734fd6ee2b |
|---|---|
| 1 // Filename : mainframe.cpp | 1 // Filename : mainframe.cpp |
| 2 // Last Change: 05-Oct-2011. | 2 // Last Change: 06-Oct-2011. |
| 3 // | 3 // |
| 4 #include "symbol.h" | 4 #include "symbol.h" |
| 5 #include "common.h" | 5 #include "common.h" |
| 6 #include "myframe.h" | 6 #include "myframe.h" |
| 7 #include "delwhite.h" | 7 #include "delwhite.h" |
| 168 EVT_MENU( ID_OPWORK, MyFrame::OnOpenWorkDir ) | 168 EVT_MENU( ID_OPWORK, MyFrame::OnOpenWorkDir ) |
| 169 EVT_BUTTON( ID_DTWHITE, MyFrame::OnDetectWhite ) | 169 EVT_BUTTON( ID_DTWHITE, MyFrame::OnDetectWhite ) |
| 170 EVT_BUTTON( ID_STDIR, MyFrame::SetDir ) | 170 EVT_BUTTON( ID_STDIR, MyFrame::SetDir ) |
| 171 EVT_BUTTON( ID_MKDIR, MyFrame::MakeDir ) | 171 EVT_BUTTON( ID_MKDIR, MyFrame::MakeDir ) |
| 172 EVT_BUTTON( ID_DOMOVE, MyFrame::MoveImages ) | 172 EVT_BUTTON( ID_DOMOVE, MyFrame::MoveImages ) |
| 173 EVT_LIST_ITEM_ACTIVATED( ID_LIST, MyFrame::OnOpenHhsDir ) | |
| 173 EVT_CLOSE( MyFrame::SaveConfig ) | 174 EVT_CLOSE( MyFrame::SaveConfig ) |
| 174 END_EVENT_TABLE() | 175 END_EVENT_TABLE() |
| 175 | 176 |
| 176 // Event Handlers | 177 // Event Handlers |
| 177 /* サイズ変更 */ | 178 /* サイズ変更 */ |
| 310 cout = dir.GetNext( &filename ); | 311 cout = dir.GetNext( &filename ); |
| 311 cnt++; | 312 cnt++; |
| 312 } | 313 } |
| 313 m_listCtrl->SetItem( r-1, 2, wxString::Format(wxT("%d"),cnt), -1 ); // ファイル数 | 314 m_listCtrl->SetItem( r-1, 2, wxString::Format(wxT("%d"),cnt), -1 ); // ファイル数 |
| 314 if ( cnt < 5 ) m_listCtrl->SetItemTextColour( r, *wxRED ); | 315 if ( cnt < 5 ) m_listCtrl->SetItemTextColour( r, *wxRED ); |
| 316 if ( cnt > 5 ) m_listCtrl->SetItemTextColour( r, *wxBLUE ); | |
| 315 | 317 |
| 316 wxString cmd = wxT("explorer ") + dirname; | 318 wxString cmd = wxT("explorer ") + dirname; |
| 317 wxExecute( cmd ); | 319 wxExecute( cmd ); |
| 320 } | |
| 321 | |
| 322 /* 被保険者のフォルダを開く */ | |
| 323 void MyFrame::OnOpenHhsDir(wxListEvent& WXUNUSED(event)) | |
| 324 { | |
| 325 wxString hhsdir = m_textCtrlMoveDir->GetValue(); | |
| 326 hhsdir.Append( wxFILE_SEP_PATH ); | |
| 327 long n = m_listCtrl->GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); | |
| 328 wxListItem item; | |
| 329 item.SetId(n); | |
| 330 m_listCtrl->GetColumn( 1, item ); | |
| 331 hhsdir.Append( item.GetText() ); | |
| 332 wxMessageBox(hhsdir); | |
| 333 //wxString execmd = wxT("explorer ") + hhsdir; | |
| 318 } | 334 } |
| 319 | 335 |
| 320 /* 作業フォルダを開く */ | 336 /* 作業フォルダを開く */ |
| 321 void MyFrame::OnOpenWorkDir(wxCommandEvent& WXUNUSED(event)) | 337 void MyFrame::OnOpenWorkDir(wxCommandEvent& WXUNUSED(event)) |
| 322 { | 338 { |
| 323 wxString workdir = m_dirPickerWork->GetPath(); | 339 wxString workdir = m_dirPickerWork->GetPath(); |
| 324 wxString execmd = wxT("explorer ") + workdir; | 340 wxString execmd = wxT("explorer ") + workdir; |
| 325 wxExecute( execmd ); | 341 wxExecute( execmd ); |
| 326 return; | |
| 327 } | 342 } |
| 328 | 343 |
| 329 | 344 |
| 330 /* 設定を保存 */ | 345 /* 設定を保存 */ |
| 331 void MyFrame::SaveConfig(wxCloseEvent& WXUNUSED(event)) | 346 void MyFrame::SaveConfig(wxCloseEvent& WXUNUSED(event)) |
