diff src/myframe.cpp @ 7:bfa0800f1176

fix text-color
author pyon@macmini
date Sat, 08 Oct 2011 19:49:13 +0900
parents 99d612849255
children b59dfcc84d7a
line wrap: on
line diff
--- 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 );