changeset 7:bfa0800f1176

fix text-color
author pyon@macmini
date Sat, 08 Oct 2011 19:49:13 +0900
parents 99d612849255
children b59dfcc84d7a
files src/main.cpp src/myframe.cpp
diffstat 2 files changed, 8 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }
--- 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 );