# HG changeset patch # User pyon@macmini # Date 1318070953 -32400 # Node ID bfa0800f11764c6da35cff769a3265e089a284da # Parent 99d612849255443d1bc176f0efb30dd54fbe0813 fix text-color diff -r 99d612849255 -r bfa0800f1176 src/main.cpp --- a/src/main.cpp Sat Oct 08 17:00:33 2011 +0900 +++ b/src/main.cpp Sat Oct 08 19:49:13 2011 +0900 @@ -26,15 +26,14 @@ ConfInit(); - /* MyFrame *mainframe = new MyFrame( NULL, ID_MAIN, wxT("A Mover") ); mainframe->SetSize( rect ); mainframe->SetMinSize( wxSize( 580, 680 ) ); mainframe->Show(true); - */ + /* TestFrame *tf = new TestFrame( NULL, ID_TEST, wxT("A Test") ); tf->Show(true); - + */ return true; } diff -r 99d612849255 -r bfa0800f1176 src/myframe.cpp --- a/src/myframe.cpp Sat Oct 08 17:00:33 2011 +0900 +++ b/src/myframe.cpp Sat Oct 08 19:49:13 2011 +0900 @@ -296,24 +296,23 @@ wxMkdir( d ); m_listCtrl->InsertItem( r, wxString::Format(wxT("%d"),r+1) ); m_listCtrl->SetItem( r, 1, hhs, -1 ); // 被保険者番号 - m_listCtrl->SetItem( r-1, 2, wxString::Format(wxT("%d"),cnt), -1 ); // ファイル数 if ( r % 2 ) m_listCtrl->SetItemBackgroundColour( r, wxColour(wxT("WHEAT")) ); r++; - cnt=0; + cnt=1; } if ( hhs.IsEmpty() ) { - wxMessageBox(wxT("マークシートの画像ファイルを確認してください.")); + wxMessageBox(wxT("1枚目のマークシートの画像ファイルを確認してください.")); return; } wxString to = dirname + wxFILE_SEP_PATH + hhs + wxFILE_SEP_PATH + filename; wxRenameFile( from, to, false ); + m_listCtrl->SetItem( r-1, 2, wxString::Format(wxT("%d"),cnt), -1 ); // ファイル数 + if ( cnt < 5 ) m_listCtrl->SetItemTextColour( r, *wxRED ); + if ( cnt > 5 ) m_listCtrl->SetItemTextColour( r, *wxBLUE ); + cnt++; // write log cout = dir.GetNext( &filename ); - cnt++; } - m_listCtrl->SetItem( r-1, 2, wxString::Format(wxT("%d"),cnt), -1 ); // ファイル数 - if ( cnt < 5 ) m_listCtrl->SetItemTextColour( r, *wxRED ); - if ( cnt > 5 ) m_listCtrl->SetItemTextColour( r, *wxBLUE ); wxString cmd = wxT("explorer ") + dirname; wxExecute( cmd );